27bd6635fbf1f12a95cbc94c9702811b229d1525
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / AttributeDataDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2020, Nordix Foundation. 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.io.Serializable;
23 import org.onap.sdc.tosca.datatypes.model.EntrySchema;
24 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
25 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
26
27 public class AttributeDataDefinition extends ToscaDataDefinition implements Serializable {
28
29     public AttributeDataDefinition() {
30     }
31
32     public AttributeDataDefinition(final AttributeDataDefinition attributeDataDefinition) {
33         super();
34         this.setUniqueId(attributeDataDefinition.getUniqueId());
35         this.setOwnerId(attributeDataDefinition.getOwnerId());
36         this.setName(attributeDataDefinition.getName());
37         this.setType(attributeDataDefinition.getType());
38         this.setDescription(attributeDataDefinition.getDescription());
39         this.set_default(attributeDataDefinition.get_default());
40         this.setStatus(attributeDataDefinition.getStatus());
41         this.setEntry_schema(attributeDataDefinition.getEntry_schema());
42         this.setSchema(attributeDataDefinition.getSchema());
43     }
44
45     public String getUniqueId() {
46         return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
47     }
48
49     public void setUniqueId(String uniqueId) {
50         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
51     }
52
53     @Override
54     public String getOwnerId() {
55         return (String) getToscaPresentationValue(JsonPresentationFields.OWNER_ID);
56     }
57
58     @Override
59     public void setOwnerId(String ownerId) {
60         setToscaPresentationValue(JsonPresentationFields.OWNER_ID, ownerId);
61     }
62
63     public String getName() {
64         return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
65     }
66
67     public void setName(String name) {
68         setToscaPresentationValue(JsonPresentationFields.NAME, name);
69     }
70
71     @Override
72     public String getType() {
73         return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
74     }
75
76     public void setType(String type) {
77         setToscaPresentationValue(JsonPresentationFields.TYPE, type);
78     }
79
80     public String getDescription() {
81         return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
82     }
83
84     public void setDescription(String description) {
85         setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
86     }
87
88     public Object get_default() {
89         return getToscaPresentationValue(JsonPresentationFields.DEFAULT);
90     }
91
92     public void set_default(Object _default) {
93         setToscaPresentationValue(JsonPresentationFields.DEFAULT, _default);
94     }
95
96     public String getStatus() {
97         return (String) getToscaPresentationValue(JsonPresentationFields.STATUS);
98     }
99
100     public void setStatus(String status) {
101         setToscaPresentationValue(JsonPresentationFields.STATUS, status);
102     }
103
104     public EntrySchema getEntry_schema() {
105         return (EntrySchema) getToscaPresentationValue(JsonPresentationFields.SCHEMA);
106     }
107
108     public void setEntry_schema(EntrySchema entrySchema) {
109         setToscaPresentationValue(JsonPresentationFields.SCHEMA, entrySchema);
110     }
111
112     public SchemaDefinition getSchema() {
113         return (SchemaDefinition) getToscaPresentationValue(JsonPresentationFields.SCHEMA);
114     }
115
116 }