Containerization feature of SO
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / CloudRegion.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
25 import javax.persistence.Id;
26
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import org.apache.commons.lang3.builder.EqualsBuilder;
29 import org.apache.commons.lang3.builder.HashCodeBuilder;
30 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
31
32 public class CloudRegion implements Serializable, ShallowCopy<CloudRegion> {
33
34         private static final long serialVersionUID = 680593168655326021L;
35
36         @Id
37         @JsonProperty("lcp-cloud-region-id")
38         private String lcpCloudRegionId;
39         @Id
40         @JsonProperty("cloud-owner")
41         private String cloudOwner;
42         @JsonProperty("tenant-id")
43         private String tenantId;
44         @JsonProperty("complex")
45         private String complex;
46         @JsonProperty("cloud-region-version")
47         private String cloudRegionVersion;
48
49         public String getLcpCloudRegionId() {
50                 return lcpCloudRegionId;
51         }
52         public void setLcpCloudRegionId(String lcpCloudRegionId) {
53                 this.lcpCloudRegionId = lcpCloudRegionId;
54         }
55         public String getTenantId() {
56                 return tenantId;
57         }
58         public void setTenantId(String tenantId) {
59                 this.tenantId = tenantId;
60         }
61         public String getCloudOwner() {
62                 return cloudOwner;
63         }
64         public void setCloudOwner(String cloudOwner) {
65                 this.cloudOwner = cloudOwner;
66         }
67         /**
68          * i.e. aic version
69          */
70         public String getCloudRegionVersion() {
71                 return cloudRegionVersion;
72         }
73         /**
74          * i.e. aic version
75          */
76         public void setCloudRegionVersion(String cloudRegionVersion) {
77                 this.cloudRegionVersion = cloudRegionVersion;
78         }
79         /**
80          * i.e. aic clli, physical location id, site id
81          */
82         public String getComplex() {
83                 return complex;
84         }
85         /**
86          * i.e. aic clli, physical location id, site id
87          */
88         public void setComplex(String complex) {
89                 this.complex = complex;
90         }
91         @Override
92         public boolean equals(final Object other) {
93                 if (!(other instanceof CloudRegion)) {
94                         return false;
95                 }
96                 CloudRegion castOther = (CloudRegion) other;
97                 return new EqualsBuilder().append(lcpCloudRegionId, castOther.lcpCloudRegionId)
98                                 .append(cloudOwner, castOther.cloudOwner).isEquals();
99         }
100         @Override
101         public int hashCode() {
102                 return new HashCodeBuilder().append(lcpCloudRegionId).append(cloudOwner).toHashCode();
103         }
104 }