Containerization feature of SO
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / VolumeGroup.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.so.bpmn.servicedecomposition.bbobjects;
22
23 import java.io.Serializable;
24 import java.util.HashMap;
25 import java.util.Map;
26
27 import javax.persistence.Id;
28
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;
33
34 import com.fasterxml.jackson.annotation.JsonProperty;
35 import com.fasterxml.jackson.annotation.JsonRootName;
36 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
37
38 @JsonRootName("volume-group")
39 public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> {
40
41         private static final long serialVersionUID = 870124265764370922L;
42         
43         @Id
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;
60
61         public ModelInfoVfModule getModelInfoVfModule() {
62                 return modelInfoVfModule;
63         }
64         public void setModelInfoVfModule(ModelInfoVfModule modelInfoVfModule) {
65                 this.modelInfoVfModule = modelInfoVfModule;
66         }
67         public String getHeatStackId() {
68                 return heatStackId;
69         }
70         public void setHeatStackId(String heatStackId) {
71                 this.heatStackId = heatStackId;
72         }
73         public String getVolumeGroupId() {
74                 return volumeGroupId;
75         }
76         public void setVolumeGroupId(String volumeGroupId) {
77                 this.volumeGroupId = volumeGroupId;
78         }
79         public String getVolumeGroupName() {
80                 return volumeGroupName;
81         }
82         public void setVolumeGroupName(String volumeGroupName) {
83                 this.volumeGroupName = volumeGroupName;
84         }
85         public String getVnfType() {
86                 return vnfType;
87         }
88         public void setVnfType(String vnfType) {
89                 this.vnfType = vnfType;
90         }
91         public OrchestrationStatus getOrchestrationStatus() {
92                 return orchestrationStatus;
93         }
94         public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
95                 this.orchestrationStatus = orchestrationStatus;
96         }
97         public Map<String, String> getCloudParams() {
98                 return cloudParams;
99         }
100         public void setCloudParams(Map<String, String> cloudParams) {
101                 this.cloudParams = cloudParams;
102         }
103         public boolean isCascaded() {
104                 return cascaded;
105         }
106         public void setCascaded(boolean cascaded) {
107                 this.cascaded = cascaded;
108         }
109         @Override
110         public boolean equals(final Object other) {
111                 if (!(other instanceof VolumeGroup)) {
112                         return false;
113                 }
114                 VolumeGroup castOther = (VolumeGroup) other;
115                 return new EqualsBuilder().append(volumeGroupId, castOther.volumeGroupId).isEquals();
116         }
117         @Override
118         public int hashCode() {
119                 return new HashCodeBuilder().append(volumeGroupId).toHashCode();
120         }
121 }