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