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 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 import javax.persistence.Id;
31 import java.io.Serializable;
32 import java.util.ArrayList;
33 import java.util.List;
34 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
36 @JsonRootName("configuration")
37 public class Configuration implements Serializable, ShallowCopy<Configuration> {
38 private static final long serialVersionUID = 4525487672816730299L;
41 @JsonProperty("configuration-id")
42 private String configurationId;
43 @JsonProperty("orchestration-status")
44 private OrchestrationStatus orchestrationStatus;
45 @JsonProperty("tunnel-bandwidth")
46 private String tunnelBandwidth;
47 @JsonProperty("vendor-allowed-max-bandwidth")
48 private String vendorAllowedMaxBandwidth;
49 @JsonProperty("management-option")
50 private String managementOption;
51 @JsonProperty("configuration-name")
52 private String configurationName;
53 @JsonProperty("configuration-type")
54 private String configurationType;
55 @JsonProperty("configuration-sub-type")
56 private String configurationSubType;
57 @JsonProperty("operational-status")
58 private String operationalStatus;
59 @JsonProperty("configuration-selflink")
60 private String configurationSelflink;
61 @JsonProperty("metadata")
62 private Metadata metadata;
63 @JsonProperty("forwarder-evcs")
64 private List<ForwarderEvc> forwarderEvcs = new ArrayList<>();
66 private List<Evc> evcs = new ArrayList<>();
68 private Vnfc vnfc = new Vnfc();
69 @JsonProperty("model-info-configuration")
70 private ModelInfoConfiguration modelInfoConfiguration;
72 @JsonProperty("related-configuration")
73 private Configuration relatedConfiguration;
75 @JsonProperty("l3-network")
76 private L3Network network;
78 @JsonProperty("l-interface")
79 private LInterface lInterface;
81 public ModelInfoConfiguration getModelInfoConfiguration() {
82 return modelInfoConfiguration;
85 public void setModelInfoConfiguration(ModelInfoConfiguration modelInfoConfiguration) {
86 this.modelInfoConfiguration = modelInfoConfiguration;
89 public List<ForwarderEvc> getForwarderEvcs() {
93 public Vnfc getVnfc() {
97 public void setVnfc(Vnfc vnfc) {
101 public List<Evc> getEvcs() {
105 public String getConfigurationId() {
106 return configurationId;
109 public void setConfigurationId(String configurationId) {
110 this.configurationId = configurationId;
113 public String getManagementOption() {
114 return managementOption;
117 public void setManagementOption(String managementOption) {
118 this.managementOption = managementOption;
121 public String getConfigurationName() {
122 return configurationName;
125 public void setConfigurationName(String configurationName) {
126 this.configurationName = configurationName;
129 public String getConfigurationType() {
130 return configurationType;
133 public void setConfigurationType(String configurationType) {
134 this.configurationType = configurationType;
137 public String getConfigurationSubType() {
138 return configurationSubType;
141 public void setConfigurationSubType(String configurationSubType) {
142 this.configurationSubType = configurationSubType;
145 public String getOperationalStatus() {
146 return operationalStatus;
149 public void setOperationalStatus(String operationalStatus) {
150 this.operationalStatus = operationalStatus;
153 public String getConfigurationSelflink() {
154 return configurationSelflink;
157 public void setConfigurationSelflink(String configurationSelflink) {
158 this.configurationSelflink = configurationSelflink;
161 public OrchestrationStatus getOrchestrationStatus() {
162 return orchestrationStatus;
165 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
166 this.orchestrationStatus = orchestrationStatus;
169 public String getTunnelBandwidth() {
170 return tunnelBandwidth;
173 public void setTunnelBandwidth(String tunnelBandwidth) {
174 this.tunnelBandwidth = tunnelBandwidth;
177 public String getVendorAllowedMaxBandwidth() {
178 return vendorAllowedMaxBandwidth;
181 public void setVendorAllowedMaxBandwidth(String vendorAllowedMaxBandwidth) {
182 this.vendorAllowedMaxBandwidth = vendorAllowedMaxBandwidth;
185 public Metadata getMetadata() {
189 public void setMetadata(Metadata metadata) {
190 this.metadata = metadata;
193 public Configuration getRelatedConfiguration() {
194 return relatedConfiguration;
197 public void setRelatedConfiguration(Configuration relatedConfiguration) {
198 this.relatedConfiguration = relatedConfiguration;
201 public void setForwarderEvcs(List<ForwarderEvc> forwarderEvcs) {
202 this.forwarderEvcs = forwarderEvcs;
205 public void setEvcs(List<Evc> evcs) {
209 public L3Network getNetwork() {
213 public void setNetwork(L3Network network) {
214 this.network = network;
217 public LInterface getlInterface() {
221 public void setlInterface(LInterface lInterface) {
222 this.lInterface = lInterface;
226 public boolean equals(final Object other) {
227 if (!(other instanceof Configuration)) {
230 Configuration castOther = (Configuration) other;
231 return new EqualsBuilder().append(configurationId, castOther.configurationId).isEquals();
235 public int hashCode() {
236 return new HashCodeBuilder().append(configurationId).toHashCode();