Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / model / CloudConfiguration.java
1
2 package org.onap.vid.mso.model;
3
4 import com.fasterxml.jackson.annotation.*;
5 import org.apache.commons.lang.builder.EqualsBuilder;
6 import org.apache.commons.lang.builder.HashCodeBuilder;
7 import org.apache.commons.lang.builder.ToStringBuilder;
8
9 import java.util.HashMap;
10 import java.util.Map;
11
12
13 /**
14  * fields communicating the cloud configuration in a standard way
15  * 
16  */
17 @JsonInclude(JsonInclude.Include.NON_NULL)
18 @JsonPropertyOrder({
19     "nodeLocation",
20     "lcpCloudRegionId",
21     "tenantId",
22     "cloudOwner"
23 })
24 public class CloudConfiguration {
25
26     /**
27      * Location identifier for the node
28      * 
29      */
30     @JsonProperty("nodeLocation")
31     private String nodeLocation;
32     /**
33      * LCP Node Location identifier
34      * 
35      */
36     @JsonProperty("lcpCloudRegionId")
37     private String lcpCloudRegionId;
38     /**
39      * Openstack tenant id
40      * 
41      */
42     @JsonProperty("tenantId")
43     private String tenantId;
44     /**
45      * the cloud owner
46      * 
47      */
48     @JsonProperty("cloudOwner")
49     private String cloudOwner;
50     @JsonIgnore
51     private Map<String, Object> additionalProperties = new HashMap<>();
52
53     /**
54      * Location identifier for the node
55      * 
56      * @return
57      *     The nodeLocation
58      */
59     @JsonProperty("nodeLocation")
60     public String getNodeLocation() {
61         return nodeLocation;
62     }
63
64     /**
65      * Location identifier for the node
66      * 
67      * @param nodeLocation
68      *     The nodeLocation
69      */
70     @JsonProperty("nodeLocation")
71     public void setNodeLocation(String nodeLocation) {
72         this.nodeLocation = nodeLocation;
73     }
74
75     /**
76      * LCP Node Location identifier
77      * 
78      * @return
79      *     The lcpCloudRegionId
80      */
81     @JsonProperty("lcpCloudRegionId")
82     public String getLcpCloudRegionId() {
83         return lcpCloudRegionId;
84     }
85
86     /**
87      * LCP Node Location identifier
88      * 
89      * @param lcpCloudRegionId
90      *     The lcpCloudRegionId
91      */
92     @JsonProperty("lcpCloudRegionId")
93     public void setLcpCloudRegionId(String lcpCloudRegionId) {
94         this.lcpCloudRegionId = lcpCloudRegionId;
95     }
96
97     /**
98      * Openstack tenant id
99      * 
100      * @return
101      *     The tenantId
102      */
103     @JsonProperty("tenantId")
104     public String getTenantId() {
105         return tenantId;
106     }
107
108     /**
109      * Openstack tenant id
110      * 
111      * @param tenantId
112      *     The tenantId
113      */
114     @JsonProperty("tenantId")
115     public void setTenantId(String tenantId) {
116         this.tenantId = tenantId;
117     }
118
119     /**
120      * the cloud owner
121      * 
122      * @return
123      *     The cloudOwner
124      */
125     @JsonProperty("cloudOwner")
126     public String getCloudOwner() {
127         return cloudOwner;
128     }
129
130     /**
131      * the cloud owner
132      * 
133      * @param cloudOwner
134      *     The cloudOwner
135      */
136     @JsonProperty("cloudOwner")
137     public void setCloudOwner(String cloudOwner) {
138         this.cloudOwner = cloudOwner;
139     }
140
141     @Override
142     public String toString() {
143         return ToStringBuilder.reflectionToString(this);
144     }
145
146     @JsonAnyGetter
147     public Map<String, Object> getAdditionalProperties() {
148         return this.additionalProperties;
149     }
150
151     @JsonAnySetter
152     public void setAdditionalProperty(String name, Object value) {
153         this.additionalProperties.put(name, value);
154     }
155
156     @Override
157     public int hashCode() {
158         return new HashCodeBuilder().append(nodeLocation).append(lcpCloudRegionId).append(tenantId).append(cloudOwner).append(additionalProperties).toHashCode();
159     }
160
161     @Override
162     public boolean equals(Object other) {
163         if (other == this) {
164             return true;
165         }
166         if (!(other instanceof CloudConfiguration)) {
167             return false;
168         }
169         CloudConfiguration rhs = ((CloudConfiguration) other);
170         return new EqualsBuilder().append(nodeLocation, rhs.nodeLocation).append(lcpCloudRegionId, rhs.lcpCloudRegionId).append(tenantId, rhs.tenantId).append(cloudOwner, rhs.cloudOwner).append(additionalProperties, rhs.additionalProperties).isEquals();
171     }
172
173 }