[sdc] docker file fix for cassandra
[sdc.git] / openecomp-be / lib / openecomp-tosca-lib / src / main / java / org / openecomp / sdc / tosca / datatypes / model / PropertyDefinition.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.tosca.datatypes.model;
22
23 import org.openecomp.sdc.tosca.services.DataModelUtil;
24
25 import java.util.List;
26
27 public class PropertyDefinition {
28
29   private String type;
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;
36
37   public PropertyDefinition() {
38     status = Status.SUPPORTED;
39     required = true;
40   }
41
42   public String getType() {
43     return type;
44   }
45
46   public void setType(String type) {
47     this.type = type;
48   }
49
50   public String getDescription() {
51     return description;
52   }
53
54   public void setDescription(String description) {
55     this.description = description;
56   }
57
58   public Boolean getRequired() {
59     return required;
60   }
61
62   public void setRequired(Boolean required) {
63     this.required = required;
64   }
65
66   public Object get_default() {
67     return _default;
68   }
69
70   public void set_default(Object defaultValue) {
71     this._default = defaultValue;
72   }
73
74   public Status getStatus() {
75     return status;
76   }
77
78   public void setStatus(Status status) {
79     this.status = status;
80   }
81
82   public List<Constraint> getConstraints() {
83     return constraints;
84   }
85
86   public void setConstraints(List<Constraint> constraints) {
87     this.constraints = constraints;
88   }
89
90   public EntrySchema getEntry_schema() {
91     return entry_schema;
92   }
93
94   public void setEntry_schema(EntrySchema entrySchema) {
95     this.entry_schema = entrySchema;
96   }
97
98   @Override
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;
109   }
110
111
112 }