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