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.HashMap;
27 import javax.persistence.Id;
29 import org.apache.commons.lang3.builder.EqualsBuilder;
30 import org.apache.commons.lang3.builder.HashCodeBuilder;
31 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
32 import org.onap.so.db.catalog.beans.OrchestrationStatus;
34 import com.fasterxml.jackson.annotation.JsonProperty;
35 import com.fasterxml.jackson.annotation.JsonRootName;
36 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
38 @JsonRootName("vf-module")
39 public class VfModule implements Serializable, ShallowCopy<VfModule> {
41 private static final long serialVersionUID = 6570087672008609773L;
44 @JsonProperty("vf-module-id")
45 private String vfModuleId;
46 @JsonProperty("vf-module-name")
47 private String vfModuleName;
48 @JsonProperty("orchestration-status")
49 private OrchestrationStatus orchestrationStatus;
50 @JsonProperty("cloud-params")
51 private Map<String, String> cloudParams = new HashMap<>();
52 @JsonProperty("cascaded")
53 private boolean cascaded;
54 @JsonProperty("heat-stack-id")
55 private String heatStackId;
56 @JsonProperty("contrail-service-instance-fqdn")
57 private String contrailServiceInstanceFqdn;
58 @JsonProperty("module-index")
59 private Integer moduleIndex;
60 @JsonProperty("selflink")
61 private String selflink;
62 @JsonProperty("model-info-vf-module")
63 private ModelInfoVfModule modelInfoVfModule;
65 public ModelInfoVfModule getModelInfoVfModule() {
66 return modelInfoVfModule;
68 public void setModelInfoVfModule(ModelInfoVfModule modelInfoVfModule) {
69 this.modelInfoVfModule = modelInfoVfModule;
71 public String getHeatStackId() {
74 public void setHeatStackId(String heatStackId) {
75 this.heatStackId = heatStackId;
77 public String getContrailServiceInstanceFqdn() {
78 return contrailServiceInstanceFqdn;
80 public void setContrailServiceInstanceFqdn(String contrailServiceInstanceFqdn) {
81 this.contrailServiceInstanceFqdn = contrailServiceInstanceFqdn;
83 public Integer getModuleIndex() {
86 public void setModuleIndex(Integer moduleIndex) {
87 this.moduleIndex = moduleIndex;
89 public String getSelflink() {
92 public void setSelflink(String selflink) {
93 this.selflink = selflink;
95 public String getVfModuleId() {
98 public void setVfModuleId(String vfModuleId) {
99 this.vfModuleId = vfModuleId;
101 public String getVfModuleName() {
104 public void setVfModuleName(String vfModuleName) {
105 this.vfModuleName = vfModuleName;
107 public OrchestrationStatus getOrchestrationStatus() {
108 return orchestrationStatus;
110 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
111 this.orchestrationStatus = orchestrationStatus;
113 public Map<String, String> getCloudParams() {
116 public void setCloudParams(Map<String, String> cloudParams) {
117 this.cloudParams = cloudParams;
119 public boolean isCascaded() {
122 public void setCascaded(boolean cascaded) {
123 this.cascaded = cascaded;
126 public boolean equals(final Object other) {
127 if (!(other instanceof VfModule)) {
130 VfModule castOther = (VfModule) other;
131 return new EqualsBuilder().append(vfModuleId, castOther.vfModuleId).isEquals();
134 public int hashCode() {
135 return new HashCodeBuilder().append(vfModuleId).toHashCode();