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("lag-interface")
34 public class LagInterface implements Serializable, ShallowCopy<LagInterface> {
36 private static final long serialVersionUID = -7493461787172382640L;
39 @JsonProperty("interface-name")
40 private String interfaceName;
41 @JsonProperty("interface-description")
42 private String interfaceDescription;
43 @JsonProperty("speed-value")
44 private String speedValue;
45 @JsonProperty("speed-units")
46 private String speedUnits;
47 @JsonProperty("interface-id")
48 private String interfaceId;
49 @JsonProperty("interface-role")
50 private String interfaceRole;
51 @JsonProperty("prov-status")
52 private String provStatus;
53 @JsonProperty("in-maint")
54 private Boolean inMaint;
55 @JsonProperty("l-interfaces")
56 private List<LInterface> lInterfaces = new ArrayList<>();
58 public String getInterfaceName() {
62 public void setInterfaceName(String interfaceName) {
63 this.interfaceName = interfaceName;
66 public String getInterfaceDescription() {
67 return interfaceDescription;
70 public void setInterfaceDescription(String interfaceDescription) {
71 this.interfaceDescription = interfaceDescription;
74 public String getSpeedValue() {
78 public void setSpeedValue(String speedValue) {
79 this.speedValue = speedValue;
82 public String getSpeedUnits() {
86 public void setSpeedUnits(String speedUnits) {
87 this.speedUnits = speedUnits;
90 public String getInterfaceId() {
94 public void setInterfaceId(String interfaceId) {
95 this.interfaceId = interfaceId;
98 public String getInterfaceRole() {
102 public void setInterfaceRole(String interfaceRole) {
103 this.interfaceRole = interfaceRole;
106 public String getProvStatus() {
110 public void setProvStatus(String provStatus) {
111 this.provStatus = provStatus;
114 public Boolean isInMaint() {
118 public void setInMaint(boolean inMaint) {
119 this.inMaint = inMaint;
122 public List<LInterface> getlInterfaces() {
127 public boolean equals(final Object other) {
128 if (!(other instanceof LagInterface)) {
131 LagInterface castOther = (LagInterface) other;
132 return new EqualsBuilder().append(interfaceName, castOther.interfaceName).isEquals();
136 public int hashCode() {
137 return new HashCodeBuilder().append(interfaceName).toHashCode();