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("lag-interface")
36 public class LagInterface implements Serializable, ShallowCopy<LagInterface>{
38 private static final long serialVersionUID = -7493461787172382640L;
41 @JsonProperty("interface-name")
42 private String interfaceName;
43 @JsonProperty("interface-description")
44 private String interfaceDescription;
45 @JsonProperty("speed-value")
46 private String speedValue;
47 @JsonProperty("speed-units")
48 private String speedUnits;
49 @JsonProperty("interface-id")
50 private String interfaceId;
51 @JsonProperty("interface-role")
52 private String interfaceRole;
53 @JsonProperty("prov-status")
54 private String provStatus;
55 @JsonProperty("in-maint")
56 private boolean inMaint;
57 @JsonProperty("l-interfaces")
58 private List<LInterface> lInterfaces = new ArrayList<>();
60 public String getInterfaceName() {
63 public void setInterfaceName(String interfaceName) {
64 this.interfaceName = interfaceName;
66 public String getInterfaceDescription() {
67 return interfaceDescription;
69 public void setInterfaceDescription(String interfaceDescription) {
70 this.interfaceDescription = interfaceDescription;
72 public String getSpeedValue() {
75 public void setSpeedValue(String speedValue) {
76 this.speedValue = speedValue;
78 public String getSpeedUnits() {
81 public void setSpeedUnits(String speedUnits) {
82 this.speedUnits = speedUnits;
84 public String getInterfaceId() {
87 public void setInterfaceId(String interfaceId) {
88 this.interfaceId = interfaceId;
90 public String getInterfaceRole() {
93 public void setInterfaceRole(String interfaceRole) {
94 this.interfaceRole = interfaceRole;
96 public String getProvStatus() {
99 public void setProvStatus(String provStatus) {
100 this.provStatus = provStatus;
102 public boolean isInMaint() {
105 public void setInMaint(boolean inMaint) {
106 this.inMaint = inMaint;
108 public List<LInterface> getlInterfaces() {
112 public boolean equals(final Object other) {
113 if (!(other instanceof LagInterface)) {
116 LagInterface castOther = (LagInterface) other;
117 return new EqualsBuilder().append(interfaceName, castOther.interfaceName).isEquals();
120 public int hashCode() {
121 return new HashCodeBuilder().append(interfaceName).toHashCode();