Added oparent to sdc main
[sdc.git] / common / onap-tosca-datatype / src / main / java / org / onap / sdc / tosca / datatypes / model / PropertyDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 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 /*
22  * Copyright © 2016-2018 European Support Limited
23  *
24  * Licensed under the Apache License, Version 2.0 (the "License");
25  * you may not use this file except in compliance with the License.
26  * You may obtain a copy of the License at
27  *
28  *      http://www.apache.org/licenses/LICENSE-2.0
29  *
30  * Unless required by applicable law or agreed to in writing, software
31  * distributed under the License is distributed on an "AS IS" BASIS,
32  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33  * See the License for the specific language governing permissions and
34  * limitations under the License.
35  */
36
37 package org.onap.sdc.tosca.datatypes.model;
38
39 public class PropertyDefinition extends DefinitionOfDataType {
40
41   public PropertyDefinition() {
42     this.status = Status.SUPPORTED;
43     this.required = true;
44   }
45
46   @Override
47   public PropertyDefinition clone() {
48     DefinitionOfDataType definitionOfDataType = super.clone();
49     PropertyDefinition propertyDefinition = new PropertyDefinition();
50     propertyDefinition.set_default(definitionOfDataType.get_default());
51     propertyDefinition.setConstraints(definitionOfDataType.getConstraints());
52     propertyDefinition.setDescription(definitionOfDataType.getDescription());
53     propertyDefinition.setEntry_schema(definitionOfDataType.getEntry_schema());
54     propertyDefinition.setRequired(definitionOfDataType.getRequired());
55     propertyDefinition.setType(definitionOfDataType.getType());
56     propertyDefinition.setStatus(definitionOfDataType.getStatus());
57     propertyDefinition.setValue(definitionOfDataType.getValue());
58     return propertyDefinition;
59   }
60
61
62 }