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<ForwarderEvc>();
67 private List<Evc> evcs = new ArrayList<Evc>();
68 @JsonProperty("model-info-configuration")
69 private ModelInfoConfiguration modelInfoConfiguration;
71 @JsonProperty("related-configuration")
72 private Configuration relatedConfiguration;
74 @JsonProperty("l3-network")
75 private L3Network network;
77 @JsonProperty("l-interface")
78 private LInterface lInterface;
80 public ModelInfoConfiguration getModelInfoConfiguration() {
81 return modelInfoConfiguration;
84 public void setModelInfoConfiguration(ModelInfoConfiguration modelInfoConfiguration) {
85 this.modelInfoConfiguration = modelInfoConfiguration;
88 public List<ForwarderEvc> getForwarderEvcs() {
92 public List<Evc> getEvcs() {
96 public String getConfigurationId() {
97 return configurationId;
100 public void setConfigurationId(String configurationId) {
101 this.configurationId = configurationId;
104 public String getManagementOption() {
105 return managementOption;
108 public void setManagementOption(String managementOption) {
109 this.managementOption = managementOption;
112 public String getConfigurationName() {
113 return configurationName;
116 public void setConfigurationName(String configurationName) {
117 this.configurationName = configurationName;
120 public String getConfigurationType() {
121 return configurationType;
124 public void setConfigurationType(String configurationType) {
125 this.configurationType = configurationType;
128 public String getConfigurationSubType() {
129 return configurationSubType;
132 public void setConfigurationSubType(String configurationSubType) {
133 this.configurationSubType = configurationSubType;
136 public String getOperationalStatus() {
137 return operationalStatus;
140 public void setOperationalStatus(String operationalStatus) {
141 this.operationalStatus = operationalStatus;
144 public String getConfigurationSelflink() {
145 return configurationSelflink;
148 public void setConfigurationSelflink(String configurationSelflink) {
149 this.configurationSelflink = configurationSelflink;
152 public OrchestrationStatus getOrchestrationStatus() {
153 return orchestrationStatus;
156 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
157 this.orchestrationStatus = orchestrationStatus;
160 public String getTunnelBandwidth() {
161 return tunnelBandwidth;
164 public void setTunnelBandwidth(String tunnelBandwidth) {
165 this.tunnelBandwidth = tunnelBandwidth;
168 public String getVendorAllowedMaxBandwidth() {
169 return vendorAllowedMaxBandwidth;
172 public void setVendorAllowedMaxBandwidth(String vendorAllowedMaxBandwidth) {
173 this.vendorAllowedMaxBandwidth = vendorAllowedMaxBandwidth;
176 public Metadata getMetadata() {
180 public void setMetadata(Metadata metadata) {
181 this.metadata = metadata;
184 public Configuration getRelatedConfiguration() {
185 return relatedConfiguration;
188 public void setRelatedConfiguration(Configuration relatedConfiguration) {
189 this.relatedConfiguration = relatedConfiguration;
192 public void setForwarderEvcs(List<ForwarderEvc> forwarderEvcs) {
193 this.forwarderEvcs = forwarderEvcs;
196 public void setEvcs(List<Evc> evcs) {
200 public L3Network getNetwork() {
204 public void setNetwork(L3Network network) {
205 this.network = network;
208 public LInterface getlInterface() {
212 public void setlInterface(LInterface lInterface) {
213 this.lInterface = lInterface;
217 public boolean equals(final Object other) {
218 if (!(other instanceof Configuration)) {
221 Configuration castOther = (Configuration) other;
222 return new EqualsBuilder().append(configurationId, castOther.configurationId).isEquals();
226 public int hashCode() {
227 return new HashCodeBuilder().append(configurationId).toHashCode();