Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / adapters / network / beans / ContrailSubnet.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.adapters.network.beans;
22
23 import java.util.ArrayList;
24 import java.util.List;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26
27 public class ContrailSubnet {
28
29     @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet")
30     private ContrailSubnetIp subnet = new ContrailSubnetIp();
31
32     @JsonProperty("network_ipam_refs_data_ipam_subnets_default_gateway")
33     private String defaultGateway;
34
35     @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_name")
36     private String subnetName;
37
38     @JsonProperty("network_ipam_refs_data_ipam_subnets_enable_dhcp")
39     private Boolean enableDhcp;
40
41     @JsonProperty("network_ipam_refs_data_ipam_subnets_addr_from_start")
42     private Boolean addrFromStart = true;
43     /**
44      * future - leave this commented private String subnet_uuid; private String dns_server_address; private List<String>
45      * dns_nameservers; private String dhcp_option_list;
46      **/
47
48     @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools")
49     private List<ContrailSubnetPool> allocationPools = new ArrayList<>();
50
51     @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes")
52     private ContrailSubnetHostRoutes hostRoutes = new ContrailSubnetHostRoutes();
53
54     public ContrailSubnet() {
55         super();
56     }
57
58     public String getDefaultGateway() {
59         return defaultGateway;
60     }
61
62     public void setDefaultGateway(String defaultGateway) {
63         this.defaultGateway = defaultGateway;
64     }
65
66     public ContrailSubnetIp getSubnet() {
67         return subnet;
68     }
69
70     public void setSubnet(ContrailSubnetIp subnet) {
71         this.subnet = subnet;
72     }
73
74     public Boolean isEnableDhcp() {
75         return enableDhcp;
76     }
77
78     public void setEnableDhcp(Boolean enableDhcp) {
79         this.enableDhcp = enableDhcp;
80     }
81
82     public String getSubnetName() {
83         return subnetName;
84     }
85
86     public void setSubnetName(String subnetName) {
87         this.subnetName = subnetName;
88     }
89
90     public List<ContrailSubnetPool> getAllocationPools() {
91         return allocationPools;
92     }
93
94     public void setAllocationPools(List<ContrailSubnetPool> allocationPools) {
95         this.allocationPools = allocationPools;
96     }
97
98     public Boolean isAddrFromStart() {
99         return addrFromStart;
100     }
101
102     public void setAddrFromStart(Boolean addrFromStart) {
103         this.addrFromStart = addrFromStart;
104     }
105
106     public ContrailSubnetHostRoutes getHostRoutes() {
107         return hostRoutes;
108     }
109
110     public void setHostRoutes(ContrailSubnetHostRoutes hostRoutes) {
111         this.hostRoutes = hostRoutes;
112     }
113
114     @Override
115     public String toString() {
116         StringBuilder buf = new StringBuilder();
117         for (ContrailSubnetPool pool : allocationPools) {
118             buf.append(pool.toString());
119         }
120         return "ContrailSubnet [subnet=" + subnet.toString() + " default_gateway=" + defaultGateway + " enable_dhcp="
121                 + enableDhcp + " addr_from_start=" + addrFromStart + " subnet_name=" + subnetName + " allocation_pools="
122                 + buf + " ]";
123     }
124
125 }