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;
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;
37 @JsonRootName("configuration")
38 public class Configuration implements Serializable, ShallowCopy<Configuration> {
39 private static final long serialVersionUID = 4525487672816730299L;
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<>();
67 private List<Evc> evcs = new ArrayList<>();
69 private Vnfc vnfc = new Vnfc();
70 @JsonProperty("model-info-configuration")
71 private ModelInfoConfiguration modelInfoConfiguration;
73 @JsonProperty("related-configuration")
74 private Configuration relatedConfiguration;
76 @JsonProperty("l3-network")
77 private L3Network network;
79 @JsonProperty("l-interface")
80 private LInterface lInterface;
82 public ModelInfoConfiguration getModelInfoConfiguration() {
83 return modelInfoConfiguration;
86 public void setModelInfoConfiguration(ModelInfoConfiguration modelInfoConfiguration) {
87 this.modelInfoConfiguration = modelInfoConfiguration;
90 public List<ForwarderEvc> getForwarderEvcs() {
94 public Vnfc getVnfc() {
98 public void setVnfc(Vnfc vnfc) {
102 public List<Evc> getEvcs() {
106 public String getConfigurationId() {
107 return configurationId;
110 public void setConfigurationId(String configurationId) {
111 this.configurationId = configurationId;
114 public String getManagementOption() {
115 return managementOption;
118 public void setManagementOption(String managementOption) {
119 this.managementOption = managementOption;
122 public String getConfigurationName() {
123 return configurationName;
126 public void setConfigurationName(String configurationName) {
127 this.configurationName = configurationName;
130 public String getConfigurationType() {
131 return configurationType;
134 public void setConfigurationType(String configurationType) {
135 this.configurationType = configurationType;
138 public String getConfigurationSubType() {
139 return configurationSubType;
142 public void setConfigurationSubType(String configurationSubType) {
143 this.configurationSubType = configurationSubType;
146 public String getOperationalStatus() {
147 return operationalStatus;
150 public void setOperationalStatus(String operationalStatus) {
151 this.operationalStatus = operationalStatus;
154 public String getConfigurationSelflink() {
155 return configurationSelflink;
158 public void setConfigurationSelflink(String configurationSelflink) {
159 this.configurationSelflink = configurationSelflink;
162 public OrchestrationStatus getOrchestrationStatus() {
163 return orchestrationStatus;
166 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
167 this.orchestrationStatus = orchestrationStatus;
170 public String getTunnelBandwidth() {
171 return tunnelBandwidth;
174 public void setTunnelBandwidth(String tunnelBandwidth) {
175 this.tunnelBandwidth = tunnelBandwidth;
178 public String getVendorAllowedMaxBandwidth() {
179 return vendorAllowedMaxBandwidth;
182 public void setVendorAllowedMaxBandwidth(String vendorAllowedMaxBandwidth) {
183 this.vendorAllowedMaxBandwidth = vendorAllowedMaxBandwidth;
186 public Metadata getMetadata() {
190 public void setMetadata(Metadata metadata) {
191 this.metadata = metadata;
194 public Configuration getRelatedConfiguration() {
195 return relatedConfiguration;
198 public void setRelatedConfiguration(Configuration relatedConfiguration) {
199 this.relatedConfiguration = relatedConfiguration;
202 public void setForwarderEvcs(List<ForwarderEvc> forwarderEvcs) {
203 this.forwarderEvcs = forwarderEvcs;
206 public void setEvcs(List<Evc> evcs) {
210 public L3Network getNetwork() {
214 public void setNetwork(L3Network network) {
215 this.network = network;
218 public LInterface getlInterface() {
222 public void setlInterface(LInterface lInterface) {
223 this.lInterface = lInterface;
227 public boolean equals(final Object other) {
228 if (!(other instanceof Configuration)) {
231 Configuration castOther = (Configuration) other;
232 return new EqualsBuilder().append(configurationId, castOther.configurationId).isEquals();
236 public int hashCode() {
237 return new HashCodeBuilder().append(configurationId).toHashCode();