re base code
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / InterfaceOperationDataDefinition.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
20 import com.fasterxml.jackson.annotation.JsonCreator;
21 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
22
23 import java.io.Serializable;
24
25 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.*;
26
27 public class InterfaceOperationDataDefinition extends ToscaDataDefinition implements Serializable {
28
29     @JsonCreator
30     public InterfaceOperationDataDefinition() {
31         super();
32     }
33
34     public InterfaceOperationDataDefinition(InterfaceOperationDataDefinition iodd) {
35         super();
36         setUniqueId(iodd.getUniqueId());
37         setInputParams(iodd.getInputParams());
38         setOutputParams(iodd.getOutputParams());
39         setDescription(iodd.getDescription());
40         setToscaResourceName(iodd.getToscaResourceName());
41         setOperationType(iodd.getOperationType());
42         setArtifactUUID(iodd.getArtifactUUID());
43     }
44
45     public ListDataDefinition<InterfaceOperationParamDataDefinition> getInputParams() {
46         return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
47                 getToscaPresentationValue(IO_INPUT_PARAMETERS);
48     }
49     public void setInputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
50                                        inputParams) {
51         setToscaPresentationValue(IO_INPUT_PARAMETERS, inputParams);
52     }
53
54     public ListDataDefinition<InterfaceOperationParamDataDefinition> getOutputParams() {
55         return (ListDataDefinition<InterfaceOperationParamDataDefinition>)
56                 getToscaPresentationValue(IO_OUTPUT_PARAMETERS);
57     }
58     public void setOutputParams(ListDataDefinition<InterfaceOperationParamDataDefinition>
59                                         outputParams) {
60         setToscaPresentationValue(IO_OUTPUT_PARAMETERS, outputParams);
61     }
62
63     public String getUniqueId() {
64         return (String) getToscaPresentationValue(UNIQUE_ID);
65     }
66     public void setUniqueId(String uid) {
67         setToscaPresentationValue(UNIQUE_ID, uid);
68     }
69
70     public String getDescription() {
71         return (String) getToscaPresentationValue(DESCRIPTION);
72     }
73     public void setDescription(String description) {
74         setToscaPresentationValue(DESCRIPTION, description);
75     }
76
77     public String getOperationType() {
78         return (String) getToscaPresentationValue(IO_OPERATION_TYPE);
79     }
80     public void setOperationType(String operationType) {
81         setToscaPresentationValue(IO_OPERATION_TYPE, operationType);
82     }
83
84     public String getToscaResourceName() {
85         return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
86     }
87     public void setToscaResourceName(String toscaResourceName) {
88         setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
89     }
90
91     public String getArtifactUUID() {
92         return (String) getToscaPresentationValue(ARTIFACT_UUID);
93     }
94     public void setArtifactUUID(String artifactUUID) {
95         setToscaPresentationValue(ARTIFACT_UUID, artifactUUID);
96     }
97 }