2 * Copyright © 2016-2018 European Support Limited
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.openecomp.sdc.be.datatypes.elements;
19 import com.fasterxml.jackson.annotation.JsonCreator;
20 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
22 import java.io.Serializable;
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;
29 public class InterfaceOperationParamDataDefinition extends ToscaDataDefinition implements Serializable {
32 public InterfaceOperationParamDataDefinition() {
36 public InterfaceOperationParamDataDefinition(InterfaceOperationParamDataDefinition iopdd) {
38 setName(iopdd.getName());
39 setProperty(iopdd.getProperty());
40 setMandatory(iopdd.getMandatory());
41 setType(iopdd.getType());
44 public InterfaceOperationParamDataDefinition(String name, String property, boolean mandatory, String type) {
47 setProperty(property);
48 setMandatory(mandatory);
52 //used for OperationOutputDefinition
53 public InterfaceOperationParamDataDefinition(String name, boolean mandatory, String type) {
56 setMandatory(mandatory);
60 public String getName() {
61 return (String) getToscaPresentationValue(IO_NAME);
63 public void setName(String name) {
64 setToscaPresentationValue(IO_NAME, name);
67 public String getProperty() {
68 return (String) getToscaPresentationValue(IO_PROPERTY);
70 public void setProperty(String property) {
71 setToscaPresentationValue(IO_PROPERTY, property);
74 public Boolean getMandatory() {
75 return (Boolean) getToscaPresentationValue(IO_MANDATORY);
77 public void setMandatory(Boolean mandatory) {
78 setToscaPresentationValue(IO_MANDATORY, mandatory);
81 public String getType() {
82 return (String) getToscaPresentationValue(IO_TYPE);
84 public void setType(String type) {
85 setToscaPresentationValue(IO_TYPE, type);