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;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonRootName;
29 import org.apache.commons.lang3.builder.EqualsBuilder;
30 import org.apache.commons.lang3.builder.HashCodeBuilder;
31 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
33 import javax.persistence.Id;
35 @JsonRootName("l-interface")
36 public class LInterface implements Serializable, ShallowCopy<LInterface>{
38 private static final long serialVersionUID = 5629921809747079453L;
41 @JsonProperty("interface-name")
42 private String interfaceName;
43 @JsonProperty("interface-role")
44 private String interfaceRole;
45 @JsonProperty("v6-wan-link-ip")
46 private String v6WanLinkIp;
47 @JsonProperty("self-link")
48 private String selflink;
49 @JsonProperty("interface-id")
50 private String interfaceId;
51 @JsonProperty("macaddr")
52 private String macaddr;
53 @JsonProperty("network-name")
54 private String networkName;
55 @JsonProperty("management-option")
56 private String managementOption;
57 @JsonProperty("interface-description")
58 private String interfaceDescription;
59 @JsonProperty("is-port-mirrored")
60 private Boolean isPortMirrored;
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("allowed-address-pairs")
68 private String allowedAddressPairs;
69 @JsonProperty("vlans")
70 private List<Vlan> vlans = new ArrayList<Vlan>();
71 @JsonProperty("sriov-vfs")
72 private List<SriovVf> sriovVfs = new ArrayList<SriovVf>();
73 @JsonProperty("l-interfaces")
74 private List<LInterface> lInterfaces = new ArrayList<LInterface>();
75 @JsonProperty("l3-interface-ipv4-address-list")
76 private List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>();
77 @JsonProperty("l3-interface-ipv6-address-list")
78 private List<L3InterfaceIpv6AddressList> l3InterfaceIpv6AddressList = new ArrayList<L3InterfaceIpv6AddressList>();
80 public String getInterfaceName() {
83 public void setInterfaceName(String interfaceName) {
84 this.interfaceName = interfaceName;
86 public String getInterfaceRole() {
89 public void setInterfaceRole(String interfaceRole) {
90 this.interfaceRole = interfaceRole;
92 public String getV6WanLinkIp() {
95 public void setV6WanLinkIp(String v6WanLinkIp) {
96 this.v6WanLinkIp = v6WanLinkIp;
98 public String getSelflink() {
101 public void setSelflink(String selflink) {
102 this.selflink = selflink;
104 public String getInterfaceId() {
107 public void setInterfaceId(String interfaceId) {
108 this.interfaceId = interfaceId;
110 public String getMacaddr() {
113 public void setMacaddr(String macaddr) {
114 this.macaddr = macaddr;
116 public String getNetworkName() {
119 public void setNetworkName(String networkName) {
120 this.networkName = networkName;
122 public String getManagementOption() {
123 return managementOption;
125 public void setManagementOption(String managementOption) {
126 this.managementOption = managementOption;
128 public String getInterfaceDescription() {
129 return interfaceDescription;
131 public void setInterfaceDescription(String interfaceDescription) {
132 this.interfaceDescription = interfaceDescription;
134 public Boolean isIsPortMirrored() {
135 return isPortMirrored;
137 public void setPortMirrored(Boolean isPortMirrored) {
138 this.isPortMirrored = isPortMirrored;
140 public Boolean isInMaint() {
143 public void setInMaint(boolean inMaint) {
144 this.inMaint = inMaint;
146 public String getProvStatus() {
149 public void setProvStatus(String provStatus) {
150 this.provStatus = provStatus;
152 public Boolean isIsIpUnnumbered() {
153 return isIpUnnumbered;
155 public void setIpUnnumbered(Boolean isIpUnnumbered) {
156 this.isIpUnnumbered = isIpUnnumbered;
158 public String getAllowedAddressPairs() {
159 return allowedAddressPairs;
161 public void setAllowedAddressPairs(String allowedAddressPairs) {
162 this.allowedAddressPairs = allowedAddressPairs;
164 public List<Vlan> getVlans() {
167 public List<SriovVf> getSriovVfs() {
170 public List<LInterface> getlInterfaces() {
173 public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() {
174 return l3InterfaceIpv4AddressList;
176 public List<L3InterfaceIpv6AddressList> getL3InterfaceIpv6AddressList() {
177 return l3InterfaceIpv6AddressList;
180 public boolean equals(final Object other) {
181 if (!(other instanceof LInterface)) {
184 LInterface castOther = (LInterface) other;
185 return new EqualsBuilder().append(interfaceName, castOther.interfaceName).isEquals();
188 public int hashCode() {
189 return new HashCodeBuilder().append(interfaceName).toHashCode();