2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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.onap.so.bpmn.servicedecomposition.bbobjects;
23 import java.io.Serializable;
24 import java.util.ArrayList;
25 import java.util.List;
27 import javax.persistence.Id;
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonRootName;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
32 import org.apache.commons.lang3.builder.HashCodeBuilder;
33 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
36 @JsonRootName("vpn-binding")
37 public class VpnBinding implements Serializable, ShallowCopy<VpnBinding> {
38 private static final long serialVersionUID = 3283413795353486924L;
41 @JsonProperty("vpn-id")
43 @JsonProperty("vpn-name")
44 private String vpnName;
45 @JsonProperty("vpn-platform")
46 private String vpnPlatform;
47 @JsonProperty("vpn-type")
48 private String vpnType;
49 @JsonProperty("vpn-region")
50 private String vpnRegion;
51 @JsonProperty("customer-vpn-id")
52 private String customerVpnId;
53 @JsonProperty("route-distinguisher")
54 private String routeDistinguisher;
55 @JsonProperty("resource-version")
56 private String resourceVersion;
57 @JsonProperty("route-targets")
58 private List<RouteTarget> routeTargets = new ArrayList<>();
60 public String getVpnId() {
64 public void setVpnId(String value) {
68 public String getVpnName() {
72 public void setVpnName(String value) {
76 public String getVpnPlatform() {
80 public void setVpnPlatform(String value) {
81 this.vpnPlatform = value;
84 public String getVpnType() {
88 public void setVpnType(String value) {
92 public String getVpnRegion() {
96 public void setVpnRegion(String value) {
97 this.vpnRegion = value;
100 public String getCustomerVpnId() {
101 return customerVpnId;
104 public void setCustomerVpnId(String value) {
105 this.customerVpnId = value;
108 public String getRouteDistinguisher() {
109 return routeDistinguisher;
112 public void setRouteDistinguisher(String value) {
113 this.routeDistinguisher = value;
116 public String getResourceVersion() {
117 return resourceVersion;
120 public void setResourceVersion(String value) {
121 this.resourceVersion = value;
124 public List<RouteTarget> getRouteTargets() {
129 public boolean equals(final Object other) {
130 if (!(other instanceof VpnBinding)) {
133 VpnBinding castOther = (VpnBinding) other;
134 return new EqualsBuilder().append(vpnId, castOther.vpnId).isEquals();
138 public int hashCode() {
139 return new HashCodeBuilder().append(vpnId).toHashCode();