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 java.io.Serializable;
24 import java.util.ArrayList;
25 import java.util.HashMap;
26 import java.util.List;
29 import javax.persistence.Id;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
32 import org.apache.commons.lang3.builder.HashCodeBuilder;
33 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
34 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
35 import org.onap.so.db.catalog.beans.OrchestrationStatus;
37 import com.fasterxml.jackson.annotation.JsonProperty;
38 import com.fasterxml.jackson.annotation.JsonRootName;
40 @JsonRootName("vf-module")
41 public class VfModule implements Serializable, ShallowCopy<VfModule> {
43 private static final long serialVersionUID = 6570087672008609773L;
46 @JsonProperty("vf-module-id")
47 private String vfModuleId;
48 @JsonProperty("vf-module-name")
49 private String vfModuleName;
50 @JsonProperty("orchestration-status")
51 private OrchestrationStatus orchestrationStatus;
52 @JsonProperty("cloud-params")
53 private Map<String, String> cloudParams = new HashMap<>();
54 @JsonProperty("cascaded")
55 private Boolean cascaded;
56 @JsonProperty("heat-stack-id")
57 private String heatStackId;
58 @JsonProperty("contrail-service-instance-fqdn")
59 private String contrailServiceInstanceFqdn;
60 @JsonProperty("module-index")
61 private Integer moduleIndex;
62 @JsonProperty("selflink")
63 private String selflink;
64 @JsonProperty("vnfcs")
65 private List<Vnfc> vnfcs = new ArrayList<>();
66 @JsonProperty("model-info-vf-module")
67 private ModelInfoVfModule modelInfoVfModule;
69 public ModelInfoVfModule getModelInfoVfModule() {
70 return modelInfoVfModule;
72 public void setModelInfoVfModule(ModelInfoVfModule modelInfoVfModule) {
73 this.modelInfoVfModule = modelInfoVfModule;
75 public String getHeatStackId() {
78 public void setHeatStackId(String heatStackId) {
79 this.heatStackId = heatStackId;
81 public String getContrailServiceInstanceFqdn() {
82 return contrailServiceInstanceFqdn;
84 public void setContrailServiceInstanceFqdn(String contrailServiceInstanceFqdn) {
85 this.contrailServiceInstanceFqdn = contrailServiceInstanceFqdn;
87 public Integer getModuleIndex() {
90 public void setModuleIndex(Integer moduleIndex) {
91 this.moduleIndex = moduleIndex;
93 public String getSelflink() {
96 public void setSelflink(String selflink) {
97 this.selflink = selflink;
99 public String getVfModuleId() {
102 public void setVfModuleId(String vfModuleId) {
103 this.vfModuleId = vfModuleId;
105 public String getVfModuleName() {
108 public void setVfModuleName(String vfModuleName) {
109 this.vfModuleName = vfModuleName;
111 public OrchestrationStatus getOrchestrationStatus() {
112 return orchestrationStatus;
114 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
115 this.orchestrationStatus = orchestrationStatus;
117 public Map<String, String> getCloudParams() {
120 public void setCloudParams(Map<String, String> cloudParams) {
121 this.cloudParams = cloudParams;
123 public Boolean isCascaded() {
126 public void setCascaded(boolean cascaded) {
127 this.cascaded = cascaded;
129 public List<Vnfc> getVnfcs() {
133 public boolean equals(final Object other) {
134 if (!(other instanceof VfModule)) {
137 VfModule castOther = (VfModule) other;
138 return new EqualsBuilder().append(vfModuleId, castOther.vfModuleId).isEquals();
141 public int hashCode() {
142 return new HashCodeBuilder().append(vfModuleId).toHashCode();