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("volume-group")
39 public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> {
41 private static final long serialVersionUID = 870124265764370922L;
44 @JsonProperty("volume-group-id")
45 private String volumeGroupId;
46 @JsonProperty("volume-group-name")
47 private String volumeGroupName;
48 @JsonProperty("vnf-type")
49 private String vnfType;
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("model-info-vf-module")
59 private ModelInfoVfModule modelInfoVfModule;
61 public ModelInfoVfModule getModelInfoVfModule() {
62 return modelInfoVfModule;
64 public void setModelInfoVfModule(ModelInfoVfModule modelInfoVfModule) {
65 this.modelInfoVfModule = modelInfoVfModule;
67 public String getHeatStackId() {
70 public void setHeatStackId(String heatStackId) {
71 this.heatStackId = heatStackId;
73 public String getVolumeGroupId() {
76 public void setVolumeGroupId(String volumeGroupId) {
77 this.volumeGroupId = volumeGroupId;
79 public String getVolumeGroupName() {
80 return volumeGroupName;
82 public void setVolumeGroupName(String volumeGroupName) {
83 this.volumeGroupName = volumeGroupName;
85 public String getVnfType() {
88 public void setVnfType(String vnfType) {
89 this.vnfType = vnfType;
91 public OrchestrationStatus getOrchestrationStatus() {
92 return orchestrationStatus;
94 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
95 this.orchestrationStatus = orchestrationStatus;
97 public Map<String, String> getCloudParams() {
100 public void setCloudParams(Map<String, String> cloudParams) {
101 this.cloudParams = cloudParams;
103 public boolean isCascaded() {
106 public void setCascaded(boolean cascaded) {
107 this.cascaded = cascaded;
110 public boolean equals(final Object other) {
111 if (!(other instanceof VolumeGroup)) {
114 VolumeGroup castOther = (VolumeGroup) other;
115 return new EqualsBuilder().append(volumeGroupId, castOther.volumeGroupId).isEquals();
118 public int hashCode() {
119 return new HashCodeBuilder().append(volumeGroupId).toHashCode();