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