2 * ============LICENSE_START=======================================================
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
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=========================================================
21 package org.openecomp.sdc.tosca.datatypes.model;
23 import org.openecomp.sdc.tosca.services.DataModelUtil;
25 import java.util.List;
27 public class PropertyDefinition {
30 private String description;
31 private Boolean required;
32 private Object _default;
33 private Status status;
34 private List<Constraint> constraints;
35 private EntrySchema entry_schema;
37 public PropertyDefinition() {
38 status = Status.SUPPORTED;
42 public String getType() {
46 public void setType(String type) {
50 public String getDescription() {
54 public void setDescription(String description) {
55 this.description = description;
58 public Boolean getRequired() {
62 public void setRequired(Boolean required) {
63 this.required = required;
66 public Object get_default() {
70 public void set_default(Object defaultValue) {
71 this._default = defaultValue;
74 public Status getStatus() {
78 public void setStatus(Status status) {
82 public List<Constraint> getConstraints() {
86 public void setConstraints(List<Constraint> constraints) {
87 this.constraints = constraints;
90 public EntrySchema getEntry_schema() {
94 public void setEntry_schema(EntrySchema entrySchema) {
95 this.entry_schema = entrySchema;
99 public PropertyDefinition clone() {
100 PropertyDefinition propertyDefinition = new PropertyDefinition();
101 propertyDefinition.setType(this.getType());
102 propertyDefinition.setDescription(this.getDescription());
103 propertyDefinition.setRequired(this.getRequired());
104 propertyDefinition.set_default(this.get_default());
105 propertyDefinition.setStatus(this.getStatus());
106 propertyDefinition.setEntry_schema(this.getEntry_schema().clone());
107 propertyDefinition.setConstraints(DataModelUtil.cloneConstraints(this.getConstraints()));
108 return propertyDefinition;