Merge "Remove repeated conditional test in ​buildServiceErrorResponse"
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / Vlan.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("vlan")
35 public class Vlan implements Serializable, ShallowCopy<Vlan> {
36
37     private static final long serialVersionUID = 1260512753640402946L;
38
39     @Id
40     @JsonProperty("vlan-interface")
41     private String vlanInterface;
42     @JsonProperty("vlan-id-inner")
43     private Long vlanIdInner;
44     @JsonProperty("vlan-id-outer")
45     private Long vlanIdOuter;
46     @JsonProperty("speed-value")
47     private String speedValue;
48     @JsonProperty("speed-units")
49     private String speedUnits;
50     @JsonProperty("vlan-description")
51     private String vlanDescription;
52     @JsonProperty("backdoor-connection")
53     private String backdoorConnection;
54     @JsonProperty("vpn-key")
55     private String vpnKey;
56     @JsonProperty("orchestration-status")
57     private OrchestrationStatus orchestrationStatus;
58     @JsonProperty("in-maint")
59     private Boolean inMaint;
60     @JsonProperty("prov-status")
61     private String provStatus;
62     @JsonProperty("is-ip-unnumbered")
63     private Boolean isIpUnnumbered;
64     @JsonProperty("l3-interface-ipv4-address-list")
65     private List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>();
66     @JsonProperty("l3-interface-ipv6-address-list")
67     private List<L3InterfaceIpv6AddressList> l3InterfaceIpv6AddressList = new ArrayList<L3InterfaceIpv6AddressList>();
68
69     public String getVlanInterface() {
70         return vlanInterface;
71     }
72
73     public void setVlanInterface(String vlanInterface) {
74         this.vlanInterface = vlanInterface;
75     }
76
77     public Long getVlanIdInner() {
78         return vlanIdInner;
79     }
80
81     public void setVlanIdInner(Long vlanIdInner) {
82         this.vlanIdInner = vlanIdInner;
83     }
84
85     public Long getVlanIdOuter() {
86         return vlanIdOuter;
87     }
88
89     public void setVlanIdOuter(Long vlanIdOuter) {
90         this.vlanIdOuter = vlanIdOuter;
91     }
92
93     public String getSpeedValue() {
94         return speedValue;
95     }
96
97     public void setSpeedValue(String speedValue) {
98         this.speedValue = speedValue;
99     }
100
101     public String getSpeedUnits() {
102         return speedUnits;
103     }
104
105     public void setSpeedUnits(String speedUnits) {
106         this.speedUnits = speedUnits;
107     }
108
109     public String getVlanDescription() {
110         return vlanDescription;
111     }
112
113     public void setVlanDescription(String vlanDescription) {
114         this.vlanDescription = vlanDescription;
115     }
116
117     public String getBackdoorConnection() {
118         return backdoorConnection;
119     }
120
121     public void setBackdoorConnection(String backdoorConnection) {
122         this.backdoorConnection = backdoorConnection;
123     }
124
125     public String getVpnKey() {
126         return vpnKey;
127     }
128
129     public void setVpnKey(String vpnKey) {
130         this.vpnKey = vpnKey;
131     }
132
133     public OrchestrationStatus getOrchestrationStatus() {
134         return orchestrationStatus;
135     }
136
137     public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
138         this.orchestrationStatus = orchestrationStatus;
139     }
140
141     public Boolean isInMaint() {
142         return inMaint;
143     }
144
145     public void setInMaint(boolean inMaint) {
146         this.inMaint = inMaint;
147     }
148
149     public String getProvStatus() {
150         return provStatus;
151     }
152
153     public void setProvStatus(String provStatus) {
154         this.provStatus = provStatus;
155     }
156
157     public Boolean isIsIpUnnumbered() {
158         return isIpUnnumbered;
159     }
160
161     public void setIpUnnumbered(Boolean isIpUnnumbered) {
162         this.isIpUnnumbered = isIpUnnumbered;
163     }
164
165     public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() {
166         return l3InterfaceIpv4AddressList;
167     }
168
169     public List<L3InterfaceIpv6AddressList> getL3InterfaceIpv6AddressList() {
170         return l3InterfaceIpv6AddressList;
171     }
172
173     @Override
174     public boolean equals(final Object other) {
175         if (!(other instanceof Vlan)) {
176             return false;
177         }
178         Vlan castOther = (Vlan) other;
179         return new EqualsBuilder().append(vlanInterface, castOther.vlanInterface).isEquals();
180     }
181
182     @Override
183     public int hashCode() {
184         return new HashCodeBuilder().append(vlanInterface).toHashCode();
185     }
186 }