Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / 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.bpmn.servicedecomposition.bbobjects;
22
23 import java.io.Serializable;
24 import java.util.ArrayList;
25 import java.util.List;
26 import org.apache.commons.lang3.builder.EqualsBuilder;
27 import org.apache.commons.lang3.builder.HashCodeBuilder;
28 import org.onap.so.db.catalog.beans.OrchestrationStatus;
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonRootName;
31 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
32 import javax.persistence.Id;
33
34 @JsonRootName("subnet")
35 public class Subnet implements Serializable, ShallowCopy<Subnet> {
36
37     private static final long serialVersionUID = -6789344717555598319L;
38
39     @Id
40     @JsonProperty("subnet-id")
41     private String subnetId;
42     @JsonProperty("subnet-name")
43     private String subnetName;
44     @JsonProperty("neutron-subnet-id")
45     private String neutronSubnetId;
46     @JsonProperty("gateway-address")
47     private String gatewayAddress;
48     @JsonProperty("network-start-address")
49     private String networkStartAddress;
50     @JsonProperty("cidr-mask")
51     private String cidrMask;
52     @JsonProperty("ip-version")
53     private String ipVersion;
54     @JsonProperty("orchestration-status")
55     private OrchestrationStatus orchestrationStatus;
56     @JsonProperty("dhcp-enabled")
57     private Boolean dhcpEnabled;
58     @JsonProperty("dhcp-start")
59     private String dhcpStart;
60     @JsonProperty("dhcp-end")
61     private String dhcpEnd;
62     @JsonProperty("subnet-role")
63     private String subnetRole;
64     @JsonProperty("ip-assignment-direction")
65     private String ipAssignmentDirection;
66     @JsonProperty("subnet-sequence")
67     private Integer subnetSequence;
68     @JsonProperty("host-routes")
69     private List<HostRoute> hostRoutes = new ArrayList<>();
70
71     public String getSubnetId() {
72         return subnetId;
73     }
74
75     public void setSubnetId(String subnetId) {
76         this.subnetId = subnetId;
77     }
78
79     public String getSubnetName() {
80         return subnetName;
81     }
82
83     public void setSubnetName(String subnetName) {
84         this.subnetName = subnetName;
85     }
86
87     public String getNeutronSubnetId() {
88         return neutronSubnetId;
89     }
90
91     public void setNeutronSubnetId(String neutronSubnetId) {
92         this.neutronSubnetId = neutronSubnetId;
93     }
94
95     public String getGatewayAddress() {
96         return gatewayAddress;
97     }
98
99     public void setGatewayAddress(String gatewayAddress) {
100         this.gatewayAddress = gatewayAddress;
101     }
102
103     public String getNetworkStartAddress() {
104         return networkStartAddress;
105     }
106
107     public void setNetworkStartAddress(String networkStartAddress) {
108         this.networkStartAddress = networkStartAddress;
109     }
110
111     public String getCidrMask() {
112         return cidrMask;
113     }
114
115     public void setCidrMask(String cidrMask) {
116         this.cidrMask = cidrMask;
117     }
118
119     public String getIpVersion() {
120         return ipVersion;
121     }
122
123     public void setIpVersion(String ipVersion) {
124         this.ipVersion = ipVersion;
125     }
126
127     public OrchestrationStatus getOrchestrationStatus() {
128         return orchestrationStatus;
129     }
130
131     public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
132         this.orchestrationStatus = orchestrationStatus;
133     }
134
135     public Boolean isDhcpEnabled() {
136         return dhcpEnabled;
137     }
138
139     public void setDhcpEnabled(Boolean dhcpEnabled) {
140         this.dhcpEnabled = dhcpEnabled;
141     }
142
143     public String getDhcpStart() {
144         return dhcpStart;
145     }
146
147     public void setDhcpStart(String dhcpStart) {
148         this.dhcpStart = dhcpStart;
149     }
150
151     public String getDhcpEnd() {
152         return dhcpEnd;
153     }
154
155     public void setDhcpEnd(String dhcpEnd) {
156         this.dhcpEnd = dhcpEnd;
157     }
158
159     public String getSubnetRole() {
160         return subnetRole;
161     }
162
163     public void setSubnetRole(String subnetRole) {
164         this.subnetRole = subnetRole;
165     }
166
167     public String getIpAssignmentDirection() {
168         return ipAssignmentDirection;
169     }
170
171     public void setIpAssignmentDirection(String ipAssignmentDirection) {
172         this.ipAssignmentDirection = ipAssignmentDirection;
173     }
174
175     public Integer getSubnetSequence() {
176         return subnetSequence;
177     }
178
179     public void setSubnetSequence(Integer subnetSequence) {
180         this.subnetSequence = subnetSequence;
181     }
182
183     public List<HostRoute> getHostRoutes() {
184         return hostRoutes;
185     }
186
187     @Override
188     public boolean equals(final Object other) {
189         if (!(other instanceof Subnet)) {
190             return false;
191         }
192         Subnet castOther = (Subnet) other;
193         return new EqualsBuilder().append(subnetId, castOther.subnetId).isEquals();
194     }
195
196     @Override
197     public int hashCode() {
198         return new HashCodeBuilder().append(subnetId).toHashCode();
199     }
200 }