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;
26 import javax.persistence.Id;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonRootName;
29 import org.apache.commons.lang3.builder.EqualsBuilder;
30 import org.apache.commons.lang3.builder.HashCodeBuilder;
31 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
34 @JsonRootName("vpn-binding")
35 public class VpnBinding implements Serializable, ShallowCopy<VpnBinding> {
36 private static final long serialVersionUID = 3283413795353486924L;
39 @JsonProperty("vpn-id")
41 @JsonProperty("vpn-name")
42 private String vpnName;
43 @JsonProperty("vpn-platform")
44 private String vpnPlatform;
45 @JsonProperty("vpn-type")
46 private String vpnType;
47 @JsonProperty("vpn-region")
48 private String vpnRegion;
49 @JsonProperty("customer-vpn-id")
50 private String customerVpnId;
51 @JsonProperty("route-distinguisher")
52 private String routeDistinguisher;
53 @JsonProperty("resource-version")
54 private String resourceVersion;
55 @JsonProperty("route-targets")
56 private List<RouteTarget> routeTargets = new ArrayList<>();
58 public String getVpnId() {
62 public void setVpnId(String value) {
66 public String getVpnName() {
70 public void setVpnName(String value) {
74 public String getVpnPlatform() {
78 public void setVpnPlatform(String value) {
79 this.vpnPlatform = value;
82 public String getVpnType() {
86 public void setVpnType(String value) {
90 public String getVpnRegion() {
94 public void setVpnRegion(String value) {
95 this.vpnRegion = value;
98 public String getCustomerVpnId() {
102 public void setCustomerVpnId(String value) {
103 this.customerVpnId = value;
106 public String getRouteDistinguisher() {
107 return routeDistinguisher;
110 public void setRouteDistinguisher(String value) {
111 this.routeDistinguisher = value;
114 public String getResourceVersion() {
115 return resourceVersion;
118 public void setResourceVersion(String value) {
119 this.resourceVersion = value;
122 public List<RouteTarget> getRouteTargets() {
127 public boolean equals(final Object other) {
128 if (!(other instanceof VpnBinding)) {
131 VpnBinding castOther = (VpnBinding) other;
132 return new EqualsBuilder().append(vpnId, castOther.vpnId).isEquals();
136 public int hashCode() {
137 return new HashCodeBuilder().append(vpnId).toHashCode();