Reformat common-be
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / GroupInstanceDataDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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 package org.openecomp.sdc.be.datatypes.elements;
21
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.Map;
25 import lombok.NoArgsConstructor;
26 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
27 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
28
29 @NoArgsConstructor
30 public class GroupInstanceDataDefinition extends ToscaDataDefinition {
31
32     public GroupInstanceDataDefinition(Map<String, Object> gi) {
33         super(gi);
34     }
35
36     public GroupInstanceDataDefinition(GroupInstanceDataDefinition other) {
37         this.setUniqueId(other.getUniqueId());
38         this.setName(other.getName());
39         this.setGroupUid(other.getGroupUid());
40         this.setCreationTime(other.getCreationTime());
41         this.setModificationTime(other.getModificationTime());
42         this.setPosX(other.getPosX());
43         this.setPosY(other.getPosY());
44         this.setPropertyValueCounter(other.getPropertyValueCounter());
45         this.setNormalizedName(other.getNormalizedName());
46         this.setCustomizationUUID(other.getCustomizationUUID());
47         this.setGroupName(other.getGroupName());
48         this.setInvariantUUID(other.getInvariantUUID());
49         this.setType(other.getType());
50         this.setGroupUUID(other.getGroupUUID());
51         this.setVersion(other.getVersion());
52         this.setDescription(other.getDescription());
53         if (other.getArtifacts() != null) {
54             this.setArtifacts(new ArrayList<>(other.getArtifacts()));
55         }
56         if (other.getArtifactsUuid() != null) {
57             this.setArtifactsUuid(new ArrayList<>(other.getArtifactsUuid()));
58         }
59         if (other.getGroupInstanceArtifacts() != null) {
60             this.setGroupInstanceArtifacts(new ArrayList<>(other.getGroupInstanceArtifacts()));
61         }
62         if (other.getGroupInstanceArtifactsUuid() != null) {
63             this.setGroupInstanceArtifactsUuid(new ArrayList<>(other.getGroupInstanceArtifactsUuid()));
64         }
65         if (other.getProperties() != null) {
66             this.setProperties(new ArrayList<>(other.getProperties()));
67         }
68     }
69
70     public String getUniqueId() {
71         return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
72     }
73
74     public void setUniqueId(String uniqueId) {
75         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
76     }
77
78     public String getNormalizedName() {
79         return (String) getToscaPresentationValue(JsonPresentationFields.NORMALIZED_NAME);
80     }
81
82     public void setNormalizedName(String normalizedName) {
83         setToscaPresentationValue(JsonPresentationFields.NORMALIZED_NAME, normalizedName);
84     }
85
86     public String getGroupUid() {
87         return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_UNIQUE_ID);
88     }
89
90     public void setGroupUid(String groupUid) {
91         setToscaPresentationValue(JsonPresentationFields.GROUP_UNIQUE_ID, groupUid);
92     }
93
94     public Long getCreationTime() {
95         return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_TIME);
96     }
97
98     public void setCreationTime(Long creationTime) {
99         setToscaPresentationValue(JsonPresentationFields.CREATION_TIME, creationTime);
100     }
101
102     public Long getModificationTime() {
103         return (Long) getToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME);
104     }
105
106     public void setModificationTime(Long modificationTime) {
107         setToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME, modificationTime);
108     }
109
110     public String getPosX() {
111         return (String) getToscaPresentationValue(JsonPresentationFields.POS_X);
112     }
113
114     public void setPosX(String posX) {
115         setToscaPresentationValue(JsonPresentationFields.POS_X, posX);
116     }
117
118     public String getPosY() {
119         return (String) getToscaPresentationValue(JsonPresentationFields.POS_Y);
120     }
121
122     public void setPosY(String posY) {
123         setToscaPresentationValue(JsonPresentationFields.POS_Y, posY);
124     }
125
126     public Integer getPropertyValueCounter() {
127         return (Integer) getToscaPresentationValue(JsonPresentationFields.PROPERTY_VALUE_COUNTER);
128     }
129
130     public void setPropertyValueCounter(Integer propertyValueCounter) {
131         setToscaPresentationValue(JsonPresentationFields.PROPERTY_VALUE_COUNTER, propertyValueCounter);
132     }
133
134     public String getCustomizationUUID() {
135         return (String) getToscaPresentationValue(JsonPresentationFields.CUSTOMIZATION_UUID);
136     }
137
138     public void setCustomizationUUID(String customizationUUID) {
139         setToscaPresentationValue(JsonPresentationFields.CUSTOMIZATION_UUID, customizationUUID);
140     }
141
142     public String getGroupName() {
143         return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_NAME);
144     }
145
146     public void setGroupName(String groupName) {
147         setToscaPresentationValue(JsonPresentationFields.GROUP_NAME, groupName);
148     }
149
150     public String getInvariantUUID() {
151         return (String) getToscaPresentationValue(JsonPresentationFields.INVARIANT_UUID);
152     }
153
154     public void setInvariantUUID(String invariantUUID) {
155         setToscaPresentationValue(JsonPresentationFields.INVARIANT_UUID, invariantUUID);
156     }
157
158     @Override
159     public String getType() {
160         return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
161     }
162
163     @Override
164     public void setType(String type) {
165         setToscaPresentationValue(JsonPresentationFields.TYPE, type);
166     }
167
168     public String getGroupUUID() {
169         return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_UUID);
170     }
171
172     public void setGroupUUID(String groupUUID) {
173         setToscaPresentationValue(JsonPresentationFields.GROUP_UUID, groupUUID);
174     }
175
176     @Override
177     public String getVersion() {
178         return (String) getToscaPresentationValue(JsonPresentationFields.VERSION);
179     }
180
181     public void setVersion(String version) {
182         setToscaPresentationValue(JsonPresentationFields.VERSION, version);
183     }
184
185     public String getDescription() {
186         return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
187     }
188
189     public void setDescription(String description) {
190         setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
191     }
192
193     @SuppressWarnings("unchecked")
194     public List<String> getArtifacts() {
195         return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS);
196     }
197
198     public void setArtifacts(List<String> artifacts) {
199         setToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS, artifacts);
200     }
201
202     @SuppressWarnings("unchecked")
203     public List<String> getArtifactsUuid() {
204         return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS_UUID);
205     }
206
207     public void setArtifactsUuid(List<String> artifactsUuid) {
208         setToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS_UUID, artifactsUuid);
209     }
210
211     @SuppressWarnings("unchecked")
212     public List<String> getGroupInstanceArtifacts() {
213         return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS);
214     }
215
216     public void setGroupInstanceArtifacts(List<String> groupInstanceArtifacts) {
217         setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS, groupInstanceArtifacts);
218     }
219
220     @SuppressWarnings("unchecked")
221     public List<String> getGroupInstanceArtifactsUuid() {
222         return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS_UUID);
223     }
224
225     public void setGroupInstanceArtifactsUuid(List<String> groupInstanceArtifactsUuid) {
226         setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS_UUID, groupInstanceArtifactsUuid);
227     }
228
229     @SuppressWarnings("unchecked")
230     public List<PropertyDataDefinition> getProperties() {
231         return (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_PROPERTIES);
232     }
233
234     public void setProperties(List<PropertyDataDefinition> properties) {
235         setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_PROPERTIES, properties);
236     }
237 }