5927a5abe78a6ec04d404278748e6e328d201d78
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / ArtifactDataDefinition.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 java.util.ArrayList;
24 import java.util.List;
25 import java.util.Map;
26 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
27 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
28 import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
29 import org.openecomp.sdc.common.api.ArtifactTypeEnum;
30
31 public class ArtifactDataDefinition extends ToscaDataDefinition {
32
33     public ArtifactDataDefinition() {
34         setArtifactVersion("0");
35     }
36
37     public ArtifactDataDefinition(Map<String, Object> art) {
38         super(art);
39         setArtifactVersion("0");
40     }
41
42
43     public ArtifactDataDefinition(ArtifactDataDefinition a) {
44         this.setUniqueId(a.getUniqueId());
45         this.setArtifactType(a.getArtifactType());
46         this.setArtifactRef(a.getArtifactRef());
47         this.setArtifactName(a.getArtifactName());
48         this.setArtifactRepository(a.getArtifactRepository());
49         this.setArtifactChecksum(a.getArtifactChecksum());
50         this.setUserIdCreator(a.getUserIdCreator());
51         this.setUserIdLastUpdater(a.getUserIdLastUpdater());
52         this.setCreatorFullName(a.getCreatorFullName());
53         this.setUpdaterFullName(a.getUpdaterFullName());
54         this.setCreationDate(a.getCreationDate());
55         this.setLastUpdateDate(a.getLastUpdateDate());
56         this.setDescription(a.getDescription());
57         this.setEsId(a.getEsId());
58         this.setArtifactLabel(a.getArtifactLabel());
59         this.setArtifactCreator(a.getArtifactCreator());
60         this.setMandatory(a.getMandatory());
61         this.setArtifactDisplayName(a.getArtifactDisplayName());
62         this.setApiUrl(a.getApiUrl());
63         this.setServiceApi(a.getServiceApi());
64         this.setArtifactGroupType(a.getArtifactGroupType());
65         this.setTimeout(a.getTimeout());
66         this.setArtifactVersion(a.getArtifactVersion());
67         this.setArtifactUUID(a.getArtifactUUID());
68         this.setPayloadUpdateDate(a.getPayloadUpdateDate());
69         this.setHeatParamsUpdateDate(a.getHeatParamsUpdateDate());
70         this.setGenerated(a.getGenerated());
71         this.setDuplicated(a.getDuplicated());
72         if (a.getRequiredArtifacts() != null) {
73             this.setRequiredArtifacts(new ArrayList<>(a.getRequiredArtifacts()));
74         }
75         if (a.getHeatParameters() != null) {
76             this.setHeatParameters(new ArrayList<>(a.getHeatParameters()));
77         }
78         this.setGeneratedFromId(a.getGeneratedFromId());
79         this.setIsFromCsar(a.getIsFromCsar());
80         if (a.getProperties() != null) {
81             this.setProperties(new ArrayList<>(a.getProperties()));
82         }
83
84     }
85
86     public String getArtifactName() {
87         return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
88
89     }
90
91     public String getArtifactType() {
92         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE);
93     }
94
95     public boolean isHeatEnvType() {
96         return ArtifactTypeEnum.HEAT_ENV.getType().equals(getArtifactType());
97     }
98
99     public void setArtifactType(String artifactType) {
100         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE, artifactType);
101
102     }
103
104     public String getArtifactRef() {
105         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_REF);
106
107     }
108
109     public void setArtifactRef(String artifactRef) {
110         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_REF, artifactRef);
111     }
112
113     public String getArtifactRepository() {
114         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_REPOSITORY);
115
116     }
117
118     public void setArtifactRepository(String artifactRepository) {
119         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_REPOSITORY, artifactRepository);
120     }
121
122     public void setArtifactName(String artifactName) {
123         setToscaPresentationValue(JsonPresentationFields.NAME, artifactName);
124
125     }
126
127     public String getArtifactChecksum() {
128         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_CHECKSUM);
129     }
130
131     public void setArtifactChecksum(String artifactChecksum) {
132         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_CHECKSUM, artifactChecksum);
133     }
134
135     public String getUserIdCreator() {
136
137         return (String) getToscaPresentationValue(JsonPresentationFields.USER_ID_CREATOR);
138     }
139
140     public void setUserIdCreator(String userIdCreator) {
141         setToscaPresentationValue(JsonPresentationFields.USER_ID_CREATOR, userIdCreator);
142     }
143
144     public String getUserIdLastUpdater() {
145         return (String) getToscaPresentationValue(JsonPresentationFields.USER_ID_LAST_UPDATER);
146     }
147
148     public void setUserIdLastUpdater(String userIdLastUpdater) {
149         setToscaPresentationValue(JsonPresentationFields.USER_ID_LAST_UPDATER, userIdLastUpdater);
150     }
151
152     public String getCreatorFullName() {
153         return (String) getToscaPresentationValue(JsonPresentationFields.CREATOR_FULL_NAME);
154     }
155
156     public void setCreatorFullName(String creatorFullName) {
157         setToscaPresentationValue(JsonPresentationFields.CREATOR_FULL_NAME, creatorFullName);
158     }
159
160     public String getUpdaterFullName() {
161         return (String) getToscaPresentationValue(JsonPresentationFields.UPDATER_FULL_NAME);
162     }
163
164     public void setUpdaterFullName(String updaterFullName) {
165         setToscaPresentationValue(JsonPresentationFields.UPDATER_FULL_NAME, updaterFullName);
166     }
167
168     public Long getCreationDate() {
169         return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_DATE);
170     }
171
172     public void setCreationDate(Long creationDate) {
173         setToscaPresentationValue(JsonPresentationFields.CREATION_DATE, creationDate);
174     }
175
176     public Long getLastUpdateDate() {
177         return (Long) getToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE);
178     }
179
180     public void setLastUpdateDate(Long lastUpdateDate) {
181         setToscaPresentationValue(JsonPresentationFields.LAST_UPDATE_DATE, lastUpdateDate);
182     }
183
184     public String getUniqueId() {
185         return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
186     }
187
188     public void setUniqueId(String uniqueId) {
189         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
190     }
191
192     public String getDescription() {
193         return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
194     }
195
196     public void setDescription(String description) {
197         setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
198     }
199
200     public String getArtifactLabel() {
201         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_LABEL);
202     }
203
204     public void setArtifactLabel(String artifactLabel) {
205         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_LABEL, artifactLabel);
206     }
207
208     public String getEsId() {
209         return (String) getToscaPresentationValue(JsonPresentationFields.ES_ID);
210     }
211
212     public boolean hasNoMandatoryEsId() {
213         return getEsId() == null && getMandatory();
214     }
215
216     public void setEsId(String esId) {
217         setToscaPresentationValue(JsonPresentationFields.ES_ID, esId);
218     }
219
220     public String getArtifactCreator() {
221         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_CREATOR);
222     }
223
224     public void setArtifactCreator(String artifactCreator) {
225         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_CREATOR, artifactCreator);
226     }
227
228     public Boolean getMandatory() {
229         Boolean isMandatory = (Boolean) getToscaPresentationValue(JsonPresentationFields.IS_ABSTRACT);
230         return isMandatory == null ? Boolean.FALSE : isMandatory;
231     }
232
233     public void setMandatory(Boolean mandatory) {
234         setToscaPresentationValue(JsonPresentationFields.IS_ABSTRACT, mandatory);
235     }
236
237     public String getArtifactDisplayName() {
238         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_DISPLAY_NAME);
239     }
240
241     public void setArtifactDisplayName(String artifactDisplayName) {
242         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_DISPLAY_NAME, artifactDisplayName);
243     }
244
245     public String getApiUrl() {
246         return (String) getToscaPresentationValue(JsonPresentationFields.API_URL);
247     }
248
249     public void setApiUrl(String apiUrl) {
250         setToscaPresentationValue(JsonPresentationFields.API_URL, apiUrl);
251     }
252
253     public Boolean getServiceApi() {
254         Boolean serviceApi = (Boolean) getToscaPresentationValue(JsonPresentationFields.SERVICE_API);
255         return serviceApi == null ? Boolean.FALSE : serviceApi;
256     }
257
258     public void setServiceApi(Boolean serviceApi) {
259         setToscaPresentationValue(JsonPresentationFields.SERVICE_API, serviceApi);
260     }
261
262     public ArtifactGroupTypeEnum getArtifactGroupType() {
263         ArtifactGroupTypeEnum artifactGroupType = null;
264         String groupType = (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_GROUP_TYPE);
265         if (groupType != null && !groupType.isEmpty()) {
266             artifactGroupType = ArtifactGroupTypeEnum.findType(groupType);
267         }
268         return artifactGroupType;
269     }
270
271     public void setArtifactGroupType(ArtifactGroupTypeEnum artifactGroupType) {
272         if (artifactGroupType != null) {
273             setToscaPresentationValue(JsonPresentationFields.ARTIFACT_GROUP_TYPE, artifactGroupType.getType());
274         }
275     }
276
277     public Integer getTimeout() {
278         return (Integer) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_TIMEOUT);
279     }
280
281     public void setTimeout(Integer timeout) {
282         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_TIMEOUT, timeout);
283     }
284
285     public String getArtifactVersion() {
286         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_VERSION);
287     }
288
289     public void setArtifactVersion(String artifactVersion) {
290         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_VERSION, artifactVersion);
291     }
292
293     public String getArtifactUUID() {
294         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_UUID);
295     }
296
297     public void setArtifactUUID(String artifactUUID) {
298         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_UUID, artifactUUID);
299     }
300
301     public Long getPayloadUpdateDate() {
302         return (Long) getToscaPresentationValue(JsonPresentationFields.PAYLOAD_UPDATE_DATE);
303     }
304
305     public void setPayloadUpdateDate(Long payloadUpdateDate) {
306         setToscaPresentationValue(JsonPresentationFields.PAYLOAD_UPDATE_DATE, payloadUpdateDate);
307     }
308
309     public Long getHeatParamsUpdateDate() {
310         return (Long) getToscaPresentationValue(JsonPresentationFields.HEAT_PARAMS_UPDATE_DATE);
311     }
312
313     public void setHeatParamsUpdateDate(Long heatParamsUpdateDate) {
314         setToscaPresentationValue(JsonPresentationFields.HEAT_PARAMS_UPDATE_DATE, heatParamsUpdateDate);
315     }
316
317     public List<String> getRequiredArtifacts() {
318         return (List<String>) getToscaPresentationValue(JsonPresentationFields.REQUIRED_ARTIFACTS);
319     }
320
321     public void setRequiredArtifacts(List<String> requiredArtifacts) {
322         setToscaPresentationValue(JsonPresentationFields.REQUIRED_ARTIFACTS, requiredArtifacts);
323     }
324
325     public Boolean getGenerated() {
326         Boolean generated = (Boolean) getToscaPresentationValue(JsonPresentationFields.GENERATED);
327         return generated == null ? Boolean.FALSE : generated;
328     }
329
330     public void setGenerated(Boolean generated) {
331         setToscaPresentationValue(JsonPresentationFields.GENERATED, generated);
332     }
333
334     public Boolean getDuplicated() {
335         Boolean duplicated = (Boolean) getToscaPresentationValue(JsonPresentationFields.DUPLICATED);
336         return duplicated == null ? Boolean.FALSE : duplicated;
337     }
338
339     public void setDuplicated(Boolean duplicated) {
340         setToscaPresentationValue(JsonPresentationFields.DUPLICATED, duplicated);
341     }
342
343     public List<HeatParameterDataDefinition> getHeatParameters() {
344         return (List<HeatParameterDataDefinition>) getToscaPresentationValue(JsonPresentationFields.HEAT_PARAMETERS);
345     }
346
347     public void setHeatParameters(List<HeatParameterDataDefinition> properties) {
348         setToscaPresentationValue(JsonPresentationFields.HEAT_PARAMETERS, properties);
349     }
350
351     public String getGeneratedFromId() {
352         return (String) getToscaPresentationValue(JsonPresentationFields.GENERATED_FROM_ID);
353     }
354
355     public boolean getIsFromCsar() {
356         Boolean isFromCsar = (Boolean) getToscaPresentationValue(JsonPresentationFields.IS_FROM_CSAR);
357         return isFromCsar == null ? Boolean.FALSE : isFromCsar;
358     }
359
360     public void setIsFromCsar(Boolean isFromCsar) {
361         setToscaPresentationValue(JsonPresentationFields.IS_FROM_CSAR, isFromCsar);
362     }
363
364     public void setGeneratedFromId(String generatedFromId) {
365         setToscaPresentationValue(JsonPresentationFields.GENERATED_FROM_ID, generatedFromId);
366     }
367
368
369     public List<PropertyDataDefinition> getProperties() {
370         return (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
371     }
372     
373     public void addProperty(final PropertyDataDefinition property) {
374         List<PropertyDataDefinition> properties =  (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
375         if (properties == null) {
376             properties = new ArrayList<>();
377             setProperties(properties);
378         }
379         properties.add(property);
380     }
381
382     private void setProperties(final List<PropertyDataDefinition> properties) {
383         setToscaPresentationValue(JsonPresentationFields.PROPERTIES, properties);
384     }
385
386     @Override
387     public String toString() {
388         return "ArtifactDataDefinition [uniqueId=" + getUniqueId() + ", artifactType=" + getArtifactType() + ", artifactRef=" + getArtifactRef() + ", artifactName=" + getArtifactName() + ", artifactRepository=" + getArtifactRepository() + ", artifactChecksum="
389                 + getArtifactChecksum() + ", userIdCreator=" + getUserIdCreator() + ", userIdLastUpdater=" + getUserIdLastUpdater() + ", creatorFullName=" + getCreatorFullName() + ", updaterFullName=" + getUpdaterFullName() + ", creationDate=" + getCreationDate()
390                 + ", lastUpdateDate=" + getLastUpdateDate() + ", esId=" + getEsId() + ", artifactLabel=" + getArtifactLabel() + ", artifactCreator=" + getArtifactCreator() + ", description=" + getDescription() + ", mandatory=" + getMandatory() + ", artifactDisplayName="
391                 + getArtifactDisplayName() + ", apiUrl=" + getApiUrl() + ", serviceApi=" + getServiceApi() + ", artifactGroupType=" + getArtifactGroupType() + ", timeout=" + getTimeout() + ", artifactVersion=" + getArtifactVersion() + ", artifactUUID=" + getArtifactUUID()
392                 + ", payloadUpdateDate=" + getPayloadUpdateDate() + ", heatParamsUpdateDate=" + getHeatParamsUpdateDate() + ", requiredArtifacts=" + getRequiredArtifacts() + "]";
393     }
394
395     @Override
396     public int hashCode() {
397         final int prime = 31;
398         int result = 1;
399
400         String apiUrl = getApiUrl();
401         String artifactChecksum = getArtifactChecksum();
402         String artifactCreator = getArtifactCreator();
403         String artifactDisplayName = getArtifactDisplayName();
404         ArtifactGroupTypeEnum artifactGroupType = getArtifactGroupType();
405         String artifactLabel = getArtifactLabel();
406         String artifactName = getArtifactName();
407         String artifactRef = getArtifactRef();
408         String artifactRepository = getArtifactRepository();
409         String artifactType = getArtifactType();
410
411         String artifactUUID = getArtifactUUID();
412         String artifactVersion = getArtifactVersion();
413         String userIdCreator = getUserIdCreator();
414         String userIdLastUpdater = getUserIdLastUpdater();
415         Long creationDate = getCreationDate();
416
417         String creatorFullName = getCreatorFullName();
418         String description = getDescription();
419         String esId = getEsId();
420         Long heatParamsUpdateDate = getHeatParamsUpdateDate();
421         Long lastUpdateDate = getLastUpdateDate();
422         Boolean mandatory = getMandatory();
423
424         Long payloadUpdateDate = getPayloadUpdateDate();
425         List<String> requiredArtifacts = getRequiredArtifacts();
426         Boolean serviceApi = getServiceApi();
427         Integer timeout = getTimeout();
428         String uniqueId = getUniqueId();
429         String updaterFullName = getUpdaterFullName();
430
431         result = prime * result + ((apiUrl == null) ? 0 : apiUrl.hashCode());
432         result = prime * result + ((artifactChecksum == null) ? 0 : artifactChecksum.hashCode());
433         result = prime * result + ((artifactCreator == null) ? 0 : artifactCreator.hashCode());
434         result = prime * result + ((artifactDisplayName == null) ? 0 : artifactDisplayName.hashCode());
435         result = prime * result + ((artifactGroupType == null) ? 0 : artifactGroupType.hashCode());
436         result = prime * result + ((artifactLabel == null) ? 0 : artifactLabel.hashCode());
437         result = prime * result + ((artifactName == null) ? 0 : artifactName.hashCode());
438         result = prime * result + ((artifactRef == null) ? 0 : artifactRef.hashCode());
439         result = prime * result + ((artifactRepository == null) ? 0 : artifactRepository.hashCode());
440         result = prime * result + ((artifactType == null) ? 0 : artifactType.hashCode());
441         result = prime * result + ((artifactUUID == null) ? 0 : artifactUUID.hashCode());
442         result = prime * result + ((artifactVersion == null) ? 0 : artifactVersion.hashCode());
443         result = prime * result + ((userIdCreator == null) ? 0 : userIdCreator.hashCode());
444         result = prime * result + ((userIdLastUpdater == null) ? 0 : userIdLastUpdater.hashCode());
445         result = prime * result + ((creationDate == null) ? 0 : creationDate.hashCode());
446         result = prime * result + ((creatorFullName == null) ? 0 : creatorFullName.hashCode());
447         result = prime * result + ((description == null) ? 0 : description.hashCode());
448         result = prime * result + ((esId == null) ? 0 : esId.hashCode());
449         result = prime * result + ((heatParamsUpdateDate == null) ? 0 : heatParamsUpdateDate.hashCode());
450         result = prime * result + ((lastUpdateDate == null) ? 0 : lastUpdateDate.hashCode());
451         result = prime * result + ((mandatory == null) ? 0 : mandatory.hashCode());
452         result = prime * result + ((payloadUpdateDate == null) ? 0 : payloadUpdateDate.hashCode());
453         result = prime * result + ((requiredArtifacts == null) ? 0 : requiredArtifacts.hashCode());
454         result = prime * result + ((serviceApi == null) ? 0 : serviceApi.hashCode());
455         result = prime * result + ((timeout == null) ? 0 : timeout.hashCode());
456         result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
457         result = prime * result + ((updaterFullName == null) ? 0 : updaterFullName.hashCode());
458         return result;
459     }
460
461     @Override
462     public boolean equals(Object obj) {
463         if (this == obj) {
464             return true;
465         }
466         if (obj == null) {
467             return false;
468         }
469         if (getClass() != obj.getClass()) {
470             return false;
471         }
472         ArtifactDataDefinition other = (ArtifactDataDefinition) obj;
473         if (getApiUrl() == null) {
474             if (other.getApiUrl() != null) {
475                 return false;
476             }
477         } else if (!getArtifactRepository().equals(other.getArtifactRepository())) {
478             return false;
479         }
480         if (getArtifactType() == null) {
481             if (other.getArtifactType() != null) {
482                 return false;
483             }
484         } else if (!getArtifactType().equals(other.getArtifactType())) {
485             return false;
486         }
487         if (getArtifactUUID() == null) {
488             if (other.getArtifactUUID() != null) {
489                 return false;
490             }
491         } else if (!getArtifactUUID().equals(other.getArtifactUUID())) {
492             return false;
493         }
494         if (getArtifactVersion() == null) {
495             if (other.getArtifactVersion() != null) {
496                 return false;
497             }
498         } else if (!getArtifactVersion().equals(other.getArtifactVersion())) {
499             return false;
500         }
501         if (getUserIdCreator() == null) {
502             if (other.getUserIdCreator() != null) {
503                 return false;
504             }
505         } else if (!getUserIdCreator().equals(other.getUserIdCreator())) {
506             return false;
507         }
508         if (getUserIdLastUpdater() == null) {
509             if (other.getUserIdLastUpdater() != null) {
510                 return false;
511             }
512         } else if (!getUserIdLastUpdater().equals(other.getUserIdLastUpdater())) {
513             return false;
514         }
515         if (getCreationDate() == null) {
516             if (other.getCreationDate() != null) {
517                 return false;
518             }
519         } else if (!getCreationDate().equals(other.getCreationDate())) {
520             return false;
521         }
522         if (getCreatorFullName() == null) {
523             if (other.getCreatorFullName() != null) {
524                 return false;
525             }
526         } else if (!getCreatorFullName().equals(other.getCreatorFullName())) {
527             return false;
528         }
529         if (getDescription() == null) {
530             if (other.getDescription() != null) {
531                 return false;
532             }
533         } else if (!getDescription().equals(other.getDescription())) {
534             return false;
535         }
536         if (getEsId() == null) {
537             if (other.getEsId() != null) {
538                 return false;
539             }
540         } else if (!getEsId().equals(other.getEsId())) {
541             return false;
542         }
543         if (getHeatParamsUpdateDate() == null) {
544             if (other.getHeatParamsUpdateDate() != null) {
545                 return false;
546             }
547         } else if (!getHeatParamsUpdateDate().equals(other.getHeatParamsUpdateDate())) {
548             return false;
549         }
550         if (getLastUpdateDate() == null) {
551             if (other.getLastUpdateDate() != null) {
552                 return false;
553             }
554         } else if (!getLastUpdateDate().equals(other.getLastUpdateDate())) {
555             return false;
556         }
557         if (getMandatory() == null) {
558             if (other.getMandatory() != null) {
559                 return false;
560             }
561         } else if (!getMandatory().equals(other.getMandatory())) {
562             return false;
563         }
564         if (getPayloadUpdateDate() == null) {
565             if (other.getPayloadUpdateDate() != null) {
566                 return false;
567             }
568         } else if (!getPayloadUpdateDate().equals(other.getPayloadUpdateDate())) {
569             return false;
570         }
571         if (getRequiredArtifacts() == null) {
572             if (other.getRequiredArtifacts() != null) {
573                 return false;
574             }
575         } else if (!getRequiredArtifacts().equals(other.getRequiredArtifacts())) {
576             return false;
577         }
578         if (getServiceApi() == null) {
579             if (other.getServiceApi() != null) {
580                 return false;
581             }
582         } else if (!getServiceApi().equals(other.getServiceApi())) {
583             return false;
584         }
585         if (getTimeout() == null) {
586             if (other.getTimeout() != null) {
587                 return false;
588             }
589         } else if (!getTimeout().equals(other.getTimeout())) {
590             return false;
591         }
592         if (getUniqueId() == null) {
593             if (other.getUniqueId() != null) {
594                 return false;
595             }
596         } else if (!getUniqueId().equals(other.getUniqueId())) {
597             return false;
598         }
599         if (getUpdaterFullName() == null) {
600             if (other.getUpdaterFullName() != null) {
601                 return false;
602             }
603         } else if (!getUpdaterFullName().equals(other.getUpdaterFullName())) {
604             return false;
605         }
606         return true;
607     }
608 }