Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / LagInterface.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("lag-interface")
34 public class LagInterface implements Serializable, ShallowCopy<LagInterface> {
35
36     private static final long serialVersionUID = -7493461787172382640L;
37
38     @Id
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<>();
57
58     public String getInterfaceName() {
59         return interfaceName;
60     }
61
62     public void setInterfaceName(String interfaceName) {
63         this.interfaceName = interfaceName;
64     }
65
66     public String getInterfaceDescription() {
67         return interfaceDescription;
68     }
69
70     public void setInterfaceDescription(String interfaceDescription) {
71         this.interfaceDescription = interfaceDescription;
72     }
73
74     public String getSpeedValue() {
75         return speedValue;
76     }
77
78     public void setSpeedValue(String speedValue) {
79         this.speedValue = speedValue;
80     }
81
82     public String getSpeedUnits() {
83         return speedUnits;
84     }
85
86     public void setSpeedUnits(String speedUnits) {
87         this.speedUnits = speedUnits;
88     }
89
90     public String getInterfaceId() {
91         return interfaceId;
92     }
93
94     public void setInterfaceId(String interfaceId) {
95         this.interfaceId = interfaceId;
96     }
97
98     public String getInterfaceRole() {
99         return interfaceRole;
100     }
101
102     public void setInterfaceRole(String interfaceRole) {
103         this.interfaceRole = interfaceRole;
104     }
105
106     public String getProvStatus() {
107         return provStatus;
108     }
109
110     public void setProvStatus(String provStatus) {
111         this.provStatus = provStatus;
112     }
113
114     public Boolean isInMaint() {
115         return inMaint;
116     }
117
118     public void setInMaint(boolean inMaint) {
119         this.inMaint = inMaint;
120     }
121
122     public List<LInterface> getlInterfaces() {
123         return lInterfaces;
124     }
125
126     @Override
127     public boolean equals(final Object other) {
128         if (!(other instanceof LagInterface)) {
129             return false;
130         }
131         LagInterface castOther = (LagInterface) other;
132         return new EqualsBuilder().append(interfaceName, castOther.interfaceName).isEquals();
133     }
134
135     @Override
136     public int hashCode() {
137         return new HashCodeBuilder().append(interfaceName).toHashCode();
138     }
139 }