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