Added vnfc support to BB layer
[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<>();
66         @JsonProperty("evcs")
67         private List<Evc> evcs = new ArrayList<>();
68         @JsonProperty("vnfc")
69         private Vnfc vnfc = new Vnfc();
70         @JsonProperty("model-info-configuration")
71         private ModelInfoConfiguration modelInfoConfiguration;
72         
73         @JsonProperty("related-configuration")
74         private Configuration relatedConfiguration;
75         
76         @JsonProperty("l3-network")
77         private L3Network network;
78         
79         @JsonProperty("l-interface")
80         private LInterface lInterface;
81
82         public ModelInfoConfiguration getModelInfoConfiguration() {
83                 return modelInfoConfiguration;
84         }
85
86         public void setModelInfoConfiguration(ModelInfoConfiguration modelInfoConfiguration) {
87                 this.modelInfoConfiguration = modelInfoConfiguration;
88         }
89
90         public List<ForwarderEvc> getForwarderEvcs() {
91                 return forwarderEvcs;
92         }
93         
94         public Vnfc getVnfc() {
95                 return vnfc;
96         }
97
98         public void setVnfc(Vnfc vnfc) {
99                 this.vnfc = vnfc;
100         }
101
102         public List<Evc> getEvcs() {
103                 return evcs;
104         }
105
106         public String getConfigurationId() {
107                 return configurationId;
108         }
109
110         public void setConfigurationId(String configurationId) {
111                 this.configurationId = configurationId;
112         }
113
114         public String getManagementOption() {
115                 return managementOption;
116         }
117
118         public void setManagementOption(String managementOption) {
119                 this.managementOption = managementOption;
120         }
121
122         public String getConfigurationName() {
123                 return configurationName;
124         }
125
126         public void setConfigurationName(String configurationName) {
127                 this.configurationName = configurationName;
128         }
129
130         public String getConfigurationType() {
131                 return configurationType;
132         }
133
134         public void setConfigurationType(String configurationType) {
135                 this.configurationType = configurationType;
136         }
137
138         public String getConfigurationSubType() {
139                 return configurationSubType;
140         }
141
142         public void setConfigurationSubType(String configurationSubType) {
143                 this.configurationSubType = configurationSubType;
144         }
145
146         public String getOperationalStatus() {
147                 return operationalStatus;
148         }
149
150         public void setOperationalStatus(String operationalStatus) {
151                 this.operationalStatus = operationalStatus;
152         }
153
154         public String getConfigurationSelflink() {
155                 return configurationSelflink;
156         }
157
158         public void setConfigurationSelflink(String configurationSelflink) {
159                 this.configurationSelflink = configurationSelflink;
160         }
161
162         public OrchestrationStatus getOrchestrationStatus() {
163                 return orchestrationStatus;
164         }
165         
166         public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
167                 this.orchestrationStatus = orchestrationStatus;
168         }
169
170         public String getTunnelBandwidth() {
171                 return tunnelBandwidth;
172         }
173
174         public void setTunnelBandwidth(String tunnelBandwidth) {
175                 this.tunnelBandwidth = tunnelBandwidth;
176         }
177
178         public String getVendorAllowedMaxBandwidth() {
179                 return vendorAllowedMaxBandwidth;
180         }
181
182         public void setVendorAllowedMaxBandwidth(String vendorAllowedMaxBandwidth) {
183                 this.vendorAllowedMaxBandwidth = vendorAllowedMaxBandwidth;
184         }
185
186         public Metadata getMetadata() {
187                 return metadata;
188         }
189
190         public void setMetadata(Metadata metadata) {
191                 this.metadata = metadata;
192         }
193
194         public Configuration getRelatedConfiguration() {
195                 return relatedConfiguration;
196         }
197
198         public void setRelatedConfiguration(Configuration relatedConfiguration) {
199                 this.relatedConfiguration = relatedConfiguration;
200         }
201
202         public void setForwarderEvcs(List<ForwarderEvc> forwarderEvcs) {
203                 this.forwarderEvcs = forwarderEvcs;
204         }
205
206         public void setEvcs(List<Evc> evcs) {
207                 this.evcs = evcs;
208         }
209
210         public L3Network getNetwork() {
211                 return network;
212         }
213
214         public void setNetwork(L3Network network) {
215                 this.network = network;
216         }
217
218         public LInterface getlInterface() {
219                 return lInterface;
220         }
221
222         public void setlInterface(LInterface lInterface) {
223                 this.lInterface = lInterface;
224         }
225
226         @Override
227         public boolean equals(final Object other) {
228                 if (!(other instanceof Configuration)) {
229                         return false;
230                 }
231                 Configuration castOther = (Configuration) other;
232                 return new EqualsBuilder().append(configurationId, castOther.configurationId).isEquals();
233         }
234
235         @Override
236         public int hashCode() {
237                 return new HashCodeBuilder().append(configurationId).toHashCode();
238         }
239         
240 }