Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / Subnet.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.openstack.beans;
22
23
24
25 import java.io.Serializable;
26 import java.util.List;
27 import javax.xml.bind.annotation.XmlTransient;
28
29 public class Subnet implements Serializable {
30
31     /**
32      * 
33      */
34     private static final long serialVersionUID = -530027355187604839L;
35
36     private String subnetName;
37
38     private String neutronId;
39
40     private String subnetId; // value from aai
41
42     private String cidr; // Only field required
43
44     private String gatewayIp;
45
46     private String ipVersion = "4";
47
48     private Boolean enableDHCP = false;
49
50     private Boolean addrFromStart = true;
51
52     private List<HostRoute> hostRoutes;
53
54     private List<Pool> allocationPools;
55
56     private List<String> dnsNameServers;
57
58     private Integer subnetSequence;
59
60     public Integer getSubnetSequence() {
61         return subnetSequence;
62     }
63
64     public void setSubnetSequence(Integer subnetSequence) {
65         this.subnetSequence = subnetSequence;
66     }
67
68     public Subnet() {}
69
70     public String getSubnetName() {
71         return subnetName;
72     }
73
74     public void setSubnetName(String subnetName) {
75         this.subnetName = subnetName;
76     }
77
78     public List<Pool> getAllocationPools() {
79         return allocationPools;
80     }
81
82     /**
83      * @return the cidr
84      */
85     public String getCidr() {
86         return cidr;
87     }
88
89     /**
90      * @return the dnsNames
91      */
92     public List<String> getDnsNameServers() {
93         return dnsNameServers;
94     }
95
96
97     public Boolean getEnableDHCP() {
98         return enableDHCP;
99     }
100
101     public Boolean getAddrFromStart() {
102         return addrFromStart;
103     }
104
105     public void setAddrFromStart(Boolean addrFromStart) {
106         this.addrFromStart = addrFromStart;
107     }
108
109     /**
110      * @return the gw
111      */
112     public String getGatewayIp() {
113         return gatewayIp;
114     }
115
116     /**
117      * @return the hostRoutes
118      */
119     public List<HostRoute> getHostRoutes() {
120         return hostRoutes;
121     }
122
123     /**
124      * @return the NeutronId
125      */
126     @XmlTransient
127     public String getNeutronId() {
128         return neutronId;
129     }
130
131     /**
132      * @return the ipversion
133      */
134     public String getIpVersion() {
135         return ipVersion;
136     }
137
138     /**
139      * @return the name
140      */
141     public String getSubnetId() {
142         return subnetId;
143     }
144
145     public void setAllocationPools(List<Pool> allocationPools) {
146         this.allocationPools = allocationPools;
147     }
148
149     /**
150      * @param cidr the cidr to set
151      */
152     public void setCidr(String cidr) {
153         this.cidr = cidr;
154     }
155
156     /**
157      * @param dnsNames the dnsNames to set
158      */
159     public void setDnsNameServers(List<String> dnsNameServers) {
160         this.dnsNameServers = dnsNameServers;
161     }
162
163     /**
164      * @param enableDHCP the enableDHCP to set
165      */
166     public void setEnableDHCP(Boolean enableDHCP) {
167         this.enableDHCP = enableDHCP;
168     }
169
170     /**
171      * @param gw the gw to set
172      */
173     public void setGatewayIp(String gatewayIp) {
174         this.gatewayIp = gatewayIp;
175     }
176
177     /**
178      * @param hostRoutes the hostRoutes to set
179      */
180     public void setHostRoutes(List<HostRoute> hostRoutes) {
181         this.hostRoutes = hostRoutes;
182     }
183
184     /**
185      * @param neutronId the id to set
186      */
187     public void setNeutronId(String neutronId) {
188         this.neutronId = neutronId;
189     }
190
191     /**
192      * @param ipversion the ipversion to set
193      */
194     public void setIpVersion(String ipVersion) {
195         this.ipVersion = ipVersion;
196     }
197
198     /**
199      * @param name the name to set
200      */
201     public void setSubnetId(String subnetId) {
202         this.subnetId = subnetId;
203     }
204
205     @Override
206     public String toString() {
207         return "Subnet [subnetName=" + subnetName + ", neutronId=" + neutronId + ", subnetId=" + subnetId + ", cidr="
208                 + cidr + ", gatewayIp=" + gatewayIp + ", ipVersion=" + ipVersion + ", enableDHCP=" + enableDHCP
209                 + ", addrFromStart=" + addrFromStart + ", hostRoutes=" + hostRoutes + ", allocationPools="
210                 + allocationPools + ", dnsNameServers=" + dnsNameServers + "]";
211     }
212
213 }