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;
26 import javax.persistence.Id;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28 import org.apache.commons.lang3.builder.HashCodeBuilder;
29 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
30 import org.onap.so.db.catalog.beans.OrchestrationStatus;
31 import com.fasterxml.jackson.annotation.JsonProperty;
32 import com.fasterxml.jackson.annotation.JsonRootName;
33 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
35 @JsonRootName("volume-group")
36 public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> {
38 private static final long serialVersionUID = 870124265764370922L;
41 @JsonProperty("volume-group-id")
42 private String volumeGroupId;
43 @JsonProperty("volume-group-name")
44 private String volumeGroupName;
45 @JsonProperty("vnf-type")
46 private String vnfType;
47 @JsonProperty("orchestration-status")
48 private OrchestrationStatus orchestrationStatus;
49 @JsonProperty("cloud-params")
50 private Map<String, String> cloudParams = new HashMap<>();
51 @JsonProperty("cascaded")
52 private Boolean cascaded;
53 @JsonProperty("heat-stack-id")
54 private String heatStackId;
55 @JsonProperty("model-info-vf-module")
56 private ModelInfoVfModule modelInfoVfModule;
58 public ModelInfoVfModule getModelInfoVfModule() {
59 return modelInfoVfModule;
62 public void setModelInfoVfModule(ModelInfoVfModule modelInfoVfModule) {
63 this.modelInfoVfModule = modelInfoVfModule;
66 public String getHeatStackId() {
70 public void setHeatStackId(String heatStackId) {
71 this.heatStackId = heatStackId;
74 public String getVolumeGroupId() {
78 public void setVolumeGroupId(String volumeGroupId) {
79 this.volumeGroupId = volumeGroupId;
82 public String getVolumeGroupName() {
83 return volumeGroupName;
86 public void setVolumeGroupName(String volumeGroupName) {
87 this.volumeGroupName = volumeGroupName;
90 public String getVnfType() {
94 public void setVnfType(String vnfType) {
95 this.vnfType = vnfType;
98 public OrchestrationStatus getOrchestrationStatus() {
99 return orchestrationStatus;
102 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
103 this.orchestrationStatus = orchestrationStatus;
106 public Map<String, String> getCloudParams() {
110 public void setCloudParams(Map<String, String> cloudParams) {
111 this.cloudParams = cloudParams;
114 public Boolean isCascaded() {
118 public void setCascaded(boolean cascaded) {
119 this.cascaded = cascaded;
123 public boolean equals(final Object other) {
124 if (!(other instanceof VolumeGroup)) {
127 VolumeGroup castOther = (VolumeGroup) other;
128 return new EqualsBuilder().append(volumeGroupId, castOther.volumeGroupId).isEquals();
132 public int hashCode() {
133 return new HashCodeBuilder().append(volumeGroupId).toHashCode();