Implement Attributes/Outputs BE (part 1)
[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 java.util.List;
24 import lombok.Getter;
25 import lombok.Setter;
26 import org.onap.sdc.tosca.datatypes.model.EntrySchema;
27 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
28 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
29
30 @Getter
31 @Setter
32 public class AttributeDataDefinition extends ToscaDataDefinition implements Serializable {
33
34     private List<GetOutputValueDataDefinition> getOutputValues;
35     private String outputId;
36     private String value;
37
38     public AttributeDataDefinition() {
39     }
40
41     public AttributeDataDefinition(final AttributeDataDefinition attributeDataDefinition) {
42         super();
43         this.setUniqueId(attributeDataDefinition.getUniqueId());
44         this.setOwnerId(attributeDataDefinition.getOwnerId());
45         this.setName(attributeDataDefinition.getName());
46         this.setType(attributeDataDefinition.getType());
47         this.setDescription(attributeDataDefinition.getDescription());
48         this.set_default(attributeDataDefinition.get_default());
49         this.setStatus(attributeDataDefinition.getStatus());
50         this.setEntry_schema(attributeDataDefinition.getEntry_schema());
51         this.setSchema(attributeDataDefinition.getSchema());
52     }
53
54     public String getUniqueId() {
55         return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
56     }
57
58     public void setUniqueId(String uniqueId) {
59         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
60     }
61
62     @Override
63     public String getOwnerId() {
64         return (String) getToscaPresentationValue(JsonPresentationFields.OWNER_ID);
65     }
66
67     @Override
68     public void setOwnerId(String ownerId) {
69         setToscaPresentationValue(JsonPresentationFields.OWNER_ID, ownerId);
70     }
71
72     public String getName() {
73         return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
74     }
75
76     public void setName(String name) {
77         setToscaPresentationValue(JsonPresentationFields.NAME, name);
78     }
79
80     @Override
81     public String getType() {
82         return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
83     }
84
85     public void setType(String type) {
86         setToscaPresentationValue(JsonPresentationFields.TYPE, type);
87     }
88
89     public String getDescription() {
90         return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
91     }
92
93     public void setDescription(String description) {
94         setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
95     }
96
97     public Object get_default() {
98         return getToscaPresentationValue(JsonPresentationFields.DEFAULT);
99     }
100
101     public void set_default(Object _default) {
102         setToscaPresentationValue(JsonPresentationFields.DEFAULT, _default);
103     }
104
105     public String getStatus() {
106         return (String) getToscaPresentationValue(JsonPresentationFields.STATUS);
107     }
108
109     public void setStatus(String status) {
110         setToscaPresentationValue(JsonPresentationFields.STATUS, status);
111     }
112
113     public EntrySchema getEntry_schema() {
114         return (EntrySchema) getToscaPresentationValue(JsonPresentationFields.SCHEMA);
115     }
116
117     public void setEntry_schema(EntrySchema entrySchema) {
118         setToscaPresentationValue(JsonPresentationFields.SCHEMA, entrySchema);
119     }
120
121     public SchemaDefinition getSchema() {
122         return (SchemaDefinition) getToscaPresentationValue(JsonPresentationFields.SCHEMA);
123     }
124
125 }