Added oparent to sdc main
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / ForwardingPathDataDefinition.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 package org.openecomp.sdc.be.datatypes.elements;
22
23 import com.fasterxml.jackson.annotation.JsonCreator;
24 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
25
26 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.*;
27
28 public class ForwardingPathDataDefinition extends ToscaDataDefinition {
29
30     @JsonCreator
31     public ForwardingPathDataDefinition() {
32         super();
33     }
34
35     public ForwardingPathDataDefinition(String name) {
36         super();
37         setName(name);
38
39     }
40
41     public ForwardingPathDataDefinition(ForwardingPathDataDefinition path) {
42         super();
43         setName(path.getName());
44         setDestinationPortNumber(path.getDestinationPortNumber());
45         setUniqueId(path.getUniqueId());
46         setPathElements(path.getPathElements());
47         setProtocol(path.getProtocol());
48         setDescription(path.getDescription());
49         setToscaResourceName(path.getToscaResourceName());
50     }
51
52     public String getName() {
53         return (String) getToscaPresentationValue(PATH_NAME);
54     }
55
56     public void setName(String name) {
57         setToscaPresentationValue(PATH_NAME, name);
58     }
59
60     public ListDataDefinition<ForwardingPathElementDataDefinition> getPathElements() {
61         return (ListDataDefinition<ForwardingPathElementDataDefinition>) getToscaPresentationValue(PATH_ELEMENT_LIST);
62     }
63
64     public void setPathElements(ListDataDefinition<ForwardingPathElementDataDefinition> pathElements) {
65         setToscaPresentationValue(PATH_ELEMENT_LIST, pathElements);
66     }
67
68     public String getUniqueId() {
69         return (String) getToscaPresentationValue(UNIQUE_ID);
70     }
71
72     public void setUniqueId(String uid) {
73         setToscaPresentationValue(UNIQUE_ID, uid);
74     }
75
76     public String getProtocol() {
77         return (String) getToscaPresentationValue(PATH_PROTOCOL);
78     }
79
80     public void setProtocol(String protocol) {
81         setToscaPresentationValue(PATH_PROTOCOL, protocol);
82     }
83
84     public String getDestinationPortNumber() {
85         return (String) getToscaPresentationValue(PATH_DESTINATION_PORT_NUMBER);
86     }
87
88     public void setDestinationPortNumber(String destinationPortNumber) {
89         setToscaPresentationValue(PATH_DESTINATION_PORT_NUMBER, destinationPortNumber);
90     }
91
92     public String getDescription() {
93         return (String) getToscaPresentationValue(DESCRIPTION);
94     }
95
96     public void setDescription(String description) {
97         setToscaPresentationValue(DESCRIPTION, description);
98     }
99
100     public String getToscaResourceName() {
101            return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
102     }
103
104     public void setToscaResourceName(String toscaResourceName) {
105         setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);
106     }
107 }