Revert "Interface operation feature enhancements"
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / InterfaceOperationParamDataDefinition.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.sdc.be.datatypes.elements;
18
19 import com.fasterxml.jackson.annotation.JsonCreator;
20 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
21
22 import java.io.Serializable;
23
24 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_MANDATORY;
25 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_PROPERTY;
26 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_NAME;
27 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_TYPE;
28
29 public class InterfaceOperationParamDataDefinition extends ToscaDataDefinition implements Serializable {
30
31     @JsonCreator
32     public InterfaceOperationParamDataDefinition() {
33         super();
34     }
35
36     public InterfaceOperationParamDataDefinition(InterfaceOperationParamDataDefinition iopdd) {
37         super();
38         setName(iopdd.getName());
39         setProperty(iopdd.getProperty());
40         setMandatory(iopdd.getMandatory());
41         setType(iopdd.getType());
42     }
43
44     public InterfaceOperationParamDataDefinition(String name, String property, boolean mandatory, String type) {
45         super();
46         setName(name);
47         setProperty(property);
48         setMandatory(mandatory);
49         setType(type);
50     }
51
52     //used for OperationOutputDefinition
53     public InterfaceOperationParamDataDefinition(String name, boolean mandatory, String type) {
54         super();
55         setName(name);
56         setMandatory(mandatory);
57         setType(type);
58     }
59
60     public String getName() {
61         return (String) getToscaPresentationValue(IO_NAME);
62     }
63     public void setName(String name) {
64         setToscaPresentationValue(IO_NAME, name);
65     }
66
67     public String getProperty() {
68         return (String) getToscaPresentationValue(IO_PROPERTY);
69     }
70     public void setProperty(String property) {
71         setToscaPresentationValue(IO_PROPERTY, property);
72     }
73
74     public Boolean getMandatory() {
75         return (Boolean) getToscaPresentationValue(IO_MANDATORY);
76     }
77     public void setMandatory(Boolean mandatory) {
78         setToscaPresentationValue(IO_MANDATORY, mandatory);
79     }
80
81     public String getType() {
82         return (String) getToscaPresentationValue(IO_TYPE);
83     }
84     public void setType(String type) {
85         setToscaPresentationValue(IO_TYPE, type);
86     }
87 }