Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / LInterface.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 com.fasterxml.jackson.annotation.JsonProperty;
27 import com.fasterxml.jackson.annotation.JsonRootName;
28 import org.apache.commons.lang3.builder.EqualsBuilder;
29 import org.apache.commons.lang3.builder.HashCodeBuilder;
30 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
31 import javax.persistence.Id;
32
33 @JsonRootName("l-interface")
34 public class LInterface implements Serializable, ShallowCopy<LInterface> {
35
36     private static final long serialVersionUID = 5629921809747079453L;
37
38     @Id
39     @JsonProperty("interface-name")
40     private String interfaceName;
41     @JsonProperty("interface-role")
42     private String interfaceRole;
43     @JsonProperty("v6-wan-link-ip")
44     private String v6WanLinkIp;
45     @JsonProperty("self-link")
46     private String selflink;
47     @JsonProperty("interface-id")
48     private String interfaceId;
49     @JsonProperty("macaddr")
50     private String macaddr;
51     @JsonProperty("network-name")
52     private String networkName;
53     @JsonProperty("management-option")
54     private String managementOption;
55     @JsonProperty("interface-description")
56     private String interfaceDescription;
57     @JsonProperty("is-port-mirrored")
58     private Boolean isPortMirrored;
59     @JsonProperty("in-maint")
60     private Boolean inMaint;
61     @JsonProperty("prov-status")
62     private String provStatus;
63     @JsonProperty("is-ip-unnumbered")
64     private Boolean isIpUnnumbered;
65     @JsonProperty("allowed-address-pairs")
66     private String allowedAddressPairs;
67     @JsonProperty("vlans")
68     private List<Vlan> vlans = new ArrayList<Vlan>();
69     @JsonProperty("sriov-vfs")
70     private List<SriovVf> sriovVfs = new ArrayList<SriovVf>();
71     @JsonProperty("l-interfaces")
72     private List<LInterface> lInterfaces = new ArrayList<LInterface>();
73     @JsonProperty("l3-interface-ipv4-address-list")
74     private List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>();
75     @JsonProperty("l3-interface-ipv6-address-list")
76     private List<L3InterfaceIpv6AddressList> l3InterfaceIpv6AddressList = new ArrayList<L3InterfaceIpv6AddressList>();
77
78     public String getInterfaceName() {
79         return interfaceName;
80     }
81
82     public void setInterfaceName(String interfaceName) {
83         this.interfaceName = interfaceName;
84     }
85
86     public String getInterfaceRole() {
87         return interfaceRole;
88     }
89
90     public void setInterfaceRole(String interfaceRole) {
91         this.interfaceRole = interfaceRole;
92     }
93
94     public String getV6WanLinkIp() {
95         return v6WanLinkIp;
96     }
97
98     public void setV6WanLinkIp(String v6WanLinkIp) {
99         this.v6WanLinkIp = v6WanLinkIp;
100     }
101
102     public String getSelflink() {
103         return selflink;
104     }
105
106     public void setSelflink(String selflink) {
107         this.selflink = selflink;
108     }
109
110     public String getInterfaceId() {
111         return interfaceId;
112     }
113
114     public void setInterfaceId(String interfaceId) {
115         this.interfaceId = interfaceId;
116     }
117
118     public String getMacaddr() {
119         return macaddr;
120     }
121
122     public void setMacaddr(String macaddr) {
123         this.macaddr = macaddr;
124     }
125
126     public String getNetworkName() {
127         return networkName;
128     }
129
130     public void setNetworkName(String networkName) {
131         this.networkName = networkName;
132     }
133
134     public String getManagementOption() {
135         return managementOption;
136     }
137
138     public void setManagementOption(String managementOption) {
139         this.managementOption = managementOption;
140     }
141
142     public String getInterfaceDescription() {
143         return interfaceDescription;
144     }
145
146     public void setInterfaceDescription(String interfaceDescription) {
147         this.interfaceDescription = interfaceDescription;
148     }
149
150     public Boolean isIsPortMirrored() {
151         return isPortMirrored;
152     }
153
154     public void setPortMirrored(Boolean isPortMirrored) {
155         this.isPortMirrored = isPortMirrored;
156     }
157
158     public Boolean isInMaint() {
159         return inMaint;
160     }
161
162     public void setInMaint(boolean inMaint) {
163         this.inMaint = inMaint;
164     }
165
166     public String getProvStatus() {
167         return provStatus;
168     }
169
170     public void setProvStatus(String provStatus) {
171         this.provStatus = provStatus;
172     }
173
174     public Boolean isIsIpUnnumbered() {
175         return isIpUnnumbered;
176     }
177
178     public void setIpUnnumbered(Boolean isIpUnnumbered) {
179         this.isIpUnnumbered = isIpUnnumbered;
180     }
181
182     public String getAllowedAddressPairs() {
183         return allowedAddressPairs;
184     }
185
186     public void setAllowedAddressPairs(String allowedAddressPairs) {
187         this.allowedAddressPairs = allowedAddressPairs;
188     }
189
190     public List<Vlan> getVlans() {
191         return vlans;
192     }
193
194     public List<SriovVf> getSriovVfs() {
195         return sriovVfs;
196     }
197
198     public List<LInterface> getlInterfaces() {
199         return lInterfaces;
200     }
201
202     public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() {
203         return l3InterfaceIpv4AddressList;
204     }
205
206     public List<L3InterfaceIpv6AddressList> getL3InterfaceIpv6AddressList() {
207         return l3InterfaceIpv6AddressList;
208     }
209
210     @Override
211     public boolean equals(final Object other) {
212         if (!(other instanceof LInterface)) {
213             return false;
214         }
215         LInterface castOther = (LInterface) other;
216         return new EqualsBuilder().append(interfaceName, castOther.interfaceName).isEquals();
217     }
218
219     @Override
220     public int hashCode() {
221         return new HashCodeBuilder().append(interfaceName).toHashCode();
222     }
223 }