2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.so.bpmn.servicedecomposition.bbobjects;
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;
33 @JsonRootName("l-interface")
34 public class LInterface implements Serializable, ShallowCopy<LInterface> {
36 private static final long serialVersionUID = 5629921809747079453L;
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>();
78 public String getInterfaceName() {
82 public void setInterfaceName(String interfaceName) {
83 this.interfaceName = interfaceName;
86 public String getInterfaceRole() {
90 public void setInterfaceRole(String interfaceRole) {
91 this.interfaceRole = interfaceRole;
94 public String getV6WanLinkIp() {
98 public void setV6WanLinkIp(String v6WanLinkIp) {
99 this.v6WanLinkIp = v6WanLinkIp;
102 public String getSelflink() {
106 public void setSelflink(String selflink) {
107 this.selflink = selflink;
110 public String getInterfaceId() {
114 public void setInterfaceId(String interfaceId) {
115 this.interfaceId = interfaceId;
118 public String getMacaddr() {
122 public void setMacaddr(String macaddr) {
123 this.macaddr = macaddr;
126 public String getNetworkName() {
130 public void setNetworkName(String networkName) {
131 this.networkName = networkName;
134 public String getManagementOption() {
135 return managementOption;
138 public void setManagementOption(String managementOption) {
139 this.managementOption = managementOption;
142 public String getInterfaceDescription() {
143 return interfaceDescription;
146 public void setInterfaceDescription(String interfaceDescription) {
147 this.interfaceDescription = interfaceDescription;
150 public Boolean isIsPortMirrored() {
151 return isPortMirrored;
154 public void setPortMirrored(Boolean isPortMirrored) {
155 this.isPortMirrored = isPortMirrored;
158 public Boolean isInMaint() {
162 public void setInMaint(boolean inMaint) {
163 this.inMaint = inMaint;
166 public String getProvStatus() {
170 public void setProvStatus(String provStatus) {
171 this.provStatus = provStatus;
174 public Boolean isIsIpUnnumbered() {
175 return isIpUnnumbered;
178 public void setIpUnnumbered(Boolean isIpUnnumbered) {
179 this.isIpUnnumbered = isIpUnnumbered;
182 public String getAllowedAddressPairs() {
183 return allowedAddressPairs;
186 public void setAllowedAddressPairs(String allowedAddressPairs) {
187 this.allowedAddressPairs = allowedAddressPairs;
190 public List<Vlan> getVlans() {
194 public List<SriovVf> getSriovVfs() {
198 public List<LInterface> getlInterfaces() {
202 public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() {
203 return l3InterfaceIpv4AddressList;
206 public List<L3InterfaceIpv6AddressList> getL3InterfaceIpv6AddressList() {
207 return l3InterfaceIpv6AddressList;
211 public boolean equals(final Object other) {
212 if (!(other instanceof LInterface)) {
215 LInterface castOther = (LInterface) other;
216 return new EqualsBuilder().append(interfaceName, castOther.interfaceName).isEquals();
220 public int hashCode() {
221 return new HashCodeBuilder().append(interfaceName).toHashCode();