2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.be.datatypes.elements;
23 import com.fasterxml.jackson.annotation.JsonCreator;
24 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
26 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.*;
28 public class ForwardingPathDataDefinition extends ToscaDataDefinition {
31 public ForwardingPathDataDefinition() {
35 public ForwardingPathDataDefinition(String name) {
41 public ForwardingPathDataDefinition(ForwardingPathDataDefinition path) {
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());
52 public String getName() {
53 return (String) getToscaPresentationValue(PATH_NAME);
56 public void setName(String name) {
57 setToscaPresentationValue(PATH_NAME, name);
60 public ListDataDefinition<ForwardingPathElementDataDefinition> getPathElements() {
61 return (ListDataDefinition<ForwardingPathElementDataDefinition>) getToscaPresentationValue(PATH_ELEMENT_LIST);
64 public void setPathElements(ListDataDefinition<ForwardingPathElementDataDefinition> pathElements) {
65 setToscaPresentationValue(PATH_ELEMENT_LIST, pathElements);
68 public String getUniqueId() {
69 return (String) getToscaPresentationValue(UNIQUE_ID);
72 public void setUniqueId(String uid) {
73 setToscaPresentationValue(UNIQUE_ID, uid);
76 public String getProtocol() {
77 return (String) getToscaPresentationValue(PATH_PROTOCOL);
80 public void setProtocol(String protocol) {
81 setToscaPresentationValue(PATH_PROTOCOL, protocol);
84 public String getDestinationPortNumber() {
85 return (String) getToscaPresentationValue(PATH_DESTINATION_PORT_NUMBER);
88 public void setDestinationPortNumber(String destinationPortNumber) {
89 setToscaPresentationValue(PATH_DESTINATION_PORT_NUMBER, destinationPortNumber);
92 public String getDescription() {
93 return (String) getToscaPresentationValue(DESCRIPTION);
96 public void setDescription(String description) {
97 setToscaPresentationValue(DESCRIPTION, description);
100 public String getToscaResourceName() {
101 return (String) getToscaPresentationValue(TOSCA_RESOURCE_NAME);
104 public void setToscaResourceName(String toscaResourceName) {
105 setToscaPresentationValue(TOSCA_RESOURCE_NAME, toscaResourceName);