2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.openecomp.sdc.be.datatypes.elements;
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;
27 public class AttributeDataDefinition extends ToscaDataDefinition implements Serializable {
29 public AttributeDataDefinition() {
32 public AttributeDataDefinition(final AttributeDataDefinition attributeDataDefinition) {
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());
45 public String getUniqueId() {
46 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
49 public void setUniqueId(String uniqueId) {
50 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
54 public String getOwnerId() {
55 return (String) getToscaPresentationValue(JsonPresentationFields.OWNER_ID);
59 public void setOwnerId(String ownerId) {
60 setToscaPresentationValue(JsonPresentationFields.OWNER_ID, ownerId);
63 public String getName() {
64 return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
67 public void setName(String name) {
68 setToscaPresentationValue(JsonPresentationFields.NAME, name);
72 public String getType() {
73 return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
76 public void setType(String type) {
77 setToscaPresentationValue(JsonPresentationFields.TYPE, type);
80 public String getDescription() {
81 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
84 public void setDescription(String description) {
85 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
88 public Object get_default() {
89 return getToscaPresentationValue(JsonPresentationFields.DEFAULT);
92 public void set_default(Object _default) {
93 setToscaPresentationValue(JsonPresentationFields.DEFAULT, _default);
96 public String getStatus() {
97 return (String) getToscaPresentationValue(JsonPresentationFields.STATUS);
100 public void setStatus(String status) {
101 setToscaPresentationValue(JsonPresentationFields.STATUS, status);
104 public EntrySchema getEntry_schema() {
105 return (EntrySchema) getToscaPresentationValue(JsonPresentationFields.SCHEMA);
108 public void setEntry_schema(EntrySchema entrySchema) {
109 setToscaPresentationValue(JsonPresentationFields.SCHEMA, entrySchema);
112 public SchemaDefinition getSchema() {
113 return (SchemaDefinition) getToscaPresentationValue(JsonPresentationFields.SCHEMA);