bcff93c5aff26a1b70050cc88790064f3738b736
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / Configuration.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 com.fasterxml.jackson.annotation.JsonProperty;
24 import com.fasterxml.jackson.annotation.JsonRootName;
25 import org.apache.commons.lang3.builder.EqualsBuilder;
26 import org.apache.commons.lang3.builder.HashCodeBuilder;
27 import org.onap.so.bpmn.servicedecomposition.Metadata;
28 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoConfiguration;
29 import org.onap.so.db.catalog.beans.OrchestrationStatus;
30
31 import javax.persistence.Id;
32 import java.io.Serializable;
33 import java.util.ArrayList;
34 import java.util.List;
35 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
36
37 @JsonRootName("configuration")
38 public class Configuration implements Serializable, ShallowCopy<Configuration> {
39         private static final long serialVersionUID = 4525487672816730299L;
40
41         @Id
42         @JsonProperty("configuration-id")
43         private String configurationId;
44         @JsonProperty("orchestration-status")
45         private OrchestrationStatus orchestrationStatus;
46         @JsonProperty("tunnel-bandwidth")
47         private String tunnelBandwidth;
48         @JsonProperty("vendor-allowed-max-bandwidth")
49         private String vendorAllowedMaxBandwidth;
50         @JsonProperty("management-option")
51         private String managementOption;
52         @JsonProperty("configuration-name")
53         private String configurationName;
54         @JsonProperty("configuration-type")
55         private String configurationType;
56         @JsonProperty("configuration-sub-type")
57         private String configurationSubType;
58         @JsonProperty("operational-status")
59         private String operationalStatus;
60         @JsonProperty("configuration-selflink")
61         private String configurationSelflink;
62         @JsonProperty("metadata")
63         private Metadata metadata;
64         @JsonProperty("forwarder-evcs")
65         private List<ForwarderEvc> forwarderEvcs = new ArrayList<ForwarderEvc>();
66         @JsonProperty("evcs")
67         private List<Evc> evcs = new ArrayList<Evc>();
68         @JsonProperty("model-info-configuration")
69         private ModelInfoConfiguration modelInfoConfiguration;
70         
71         @JsonProperty("related-configuration")
72         private Configuration relatedConfiguration;
73         
74         @JsonProperty("l3-network")
75         private L3Network network;
76         
77         @JsonProperty("l-interface")
78         private LInterface lInterface;
79
80         public ModelInfoConfiguration getModelInfoConfiguration() {
81                 return modelInfoConfiguration;
82         }
83
84         public void setModelInfoConfiguration(ModelInfoConfiguration modelInfoConfiguration) {
85                 this.modelInfoConfiguration = modelInfoConfiguration;
86         }
87
88         public List<ForwarderEvc> getForwarderEvcs() {
89                 return forwarderEvcs;
90         }
91
92         public List<Evc> getEvcs() {
93                 return evcs;
94         }
95
96         public String getConfigurationId() {
97                 return configurationId;
98         }
99
100         public void setConfigurationId(String configurationId) {
101                 this.configurationId = configurationId;
102         }
103
104         public String getManagementOption() {
105                 return managementOption;
106         }
107
108         public void setManagementOption(String managementOption) {
109                 this.managementOption = managementOption;
110         }
111
112         public String getConfigurationName() {
113                 return configurationName;
114         }
115
116         public void setConfigurationName(String configurationName) {
117                 this.configurationName = configurationName;
118         }
119
120         public String getConfigurationType() {
121                 return configurationType;
122         }
123
124         public void setConfigurationType(String configurationType) {
125                 this.configurationType = configurationType;
126         }
127
128         public String getConfigurationSubType() {
129                 return configurationSubType;
130         }
131
132         public void setConfigurationSubType(String configurationSubType) {
133                 this.configurationSubType = configurationSubType;
134         }
135
136         public String getOperationalStatus() {
137                 return operationalStatus;
138         }
139
140         public void setOperationalStatus(String operationalStatus) {
141                 this.operationalStatus = operationalStatus;
142         }
143
144         public String getConfigurationSelflink() {
145                 return configurationSelflink;
146         }
147
148         public void setConfigurationSelflink(String configurationSelflink) {
149                 this.configurationSelflink = configurationSelflink;
150         }
151
152         public OrchestrationStatus getOrchestrationStatus() {
153                 return orchestrationStatus;
154         }
155         
156         public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
157                 this.orchestrationStatus = orchestrationStatus;
158         }
159
160         public String getTunnelBandwidth() {
161                 return tunnelBandwidth;
162         }
163
164         public void setTunnelBandwidth(String tunnelBandwidth) {
165                 this.tunnelBandwidth = tunnelBandwidth;
166         }
167
168         public String getVendorAllowedMaxBandwidth() {
169                 return vendorAllowedMaxBandwidth;
170         }
171
172         public void setVendorAllowedMaxBandwidth(String vendorAllowedMaxBandwidth) {
173                 this.vendorAllowedMaxBandwidth = vendorAllowedMaxBandwidth;
174         }
175
176         public Metadata getMetadata() {
177                 return metadata;
178         }
179
180         public void setMetadata(Metadata metadata) {
181                 this.metadata = metadata;
182         }
183
184         public Configuration getRelatedConfiguration() {
185                 return relatedConfiguration;
186         }
187
188         public void setRelatedConfiguration(Configuration relatedConfiguration) {
189                 this.relatedConfiguration = relatedConfiguration;
190         }
191
192         public void setForwarderEvcs(List<ForwarderEvc> forwarderEvcs) {
193                 this.forwarderEvcs = forwarderEvcs;
194         }
195
196         public void setEvcs(List<Evc> evcs) {
197                 this.evcs = evcs;
198         }
199
200         public L3Network getNetwork() {
201                 return network;
202         }
203
204         public void setNetwork(L3Network network) {
205                 this.network = network;
206         }
207
208         public LInterface getlInterface() {
209                 return lInterface;
210         }
211
212         public void setlInterface(LInterface lInterface) {
213                 this.lInterface = lInterface;
214         }
215
216         @Override
217         public boolean equals(final Object other) {
218                 if (!(other instanceof Configuration)) {
219                         return false;
220                 }
221                 Configuration castOther = (Configuration) other;
222                 return new EqualsBuilder().append(configurationId, castOther.configurationId).isEquals();
223         }
224
225         @Override
226         public int hashCode() {
227                 return new HashCodeBuilder().append(configurationId).toHashCode();
228         }
229         
230 }