Containerization feature of SO
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / VpnBinding.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
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.onap.so.bpmn.servicedecomposition.bbobjects;
22
23 import java.io.Serializable;
24 import java.util.ArrayList;
25 import java.util.List;
26
27 import javax.persistence.Id;
28
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;
34
35
36 @JsonRootName("vpn-binding")
37 public class VpnBinding implements Serializable, ShallowCopy<VpnBinding> {
38         private static final long serialVersionUID = 3283413795353486924L;
39
40         @Id
41         @JsonProperty("vpn-id")
42     private String vpnId;
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<>();
59
60     public String getVpnId() {
61         return vpnId;
62     }
63
64     public void setVpnId(String value) {
65         this.vpnId = value;
66     }
67
68     public String getVpnName() {
69         return vpnName;
70     }
71
72     public void setVpnName(String value) {
73         this.vpnName = value;
74     }
75
76     public String getVpnPlatform() {
77         return vpnPlatform;
78     }
79
80     public void setVpnPlatform(String value) {
81         this.vpnPlatform = value;
82     }
83
84     public String getVpnType() {
85         return vpnType;
86     }
87
88     public void setVpnType(String value) {
89         this.vpnType = value;
90     }
91
92     public String getVpnRegion() {
93         return vpnRegion;
94     }
95
96     public void setVpnRegion(String value) {
97         this.vpnRegion = value;
98     }
99
100     public String getCustomerVpnId() {
101         return customerVpnId;
102     }
103
104     public void setCustomerVpnId(String value) {
105         this.customerVpnId = value;
106     }
107
108     public String getRouteDistinguisher() {
109         return routeDistinguisher;
110     }
111
112     public void setRouteDistinguisher(String value) {
113         this.routeDistinguisher = value;
114     }
115
116     public String getResourceVersion() {
117         return resourceVersion;
118     }
119
120     public void setResourceVersion(String value) {
121         this.resourceVersion = value;
122     }
123
124     public List<RouteTarget> getRouteTargets() {
125         return routeTargets;
126     }
127
128         @Override
129         public boolean equals(final Object other) {
130                 if (!(other instanceof VpnBinding)) {
131                         return false;
132                 }
133                 VpnBinding castOther = (VpnBinding) other;
134                 return new EqualsBuilder().append(vpnId, castOther.vpnId).isEquals();
135         }
136
137         @Override
138         public int hashCode() {
139                 return new HashCodeBuilder().append(vpnId).toHashCode();
140         }
141 }