Fix for Penetration test _ Session and cookie management
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / model / ModelInfo.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.JsonInclude;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
26 import org.apache.commons.lang.builder.EqualsBuilder;
27 import org.apache.commons.lang.builder.HashCodeBuilder;
28 import org.apache.commons.lang.builder.ToStringBuilder;
29
30
31 /**
32  * fields describing the SDC entity being operated on by the request
33  * 
34  */
35 @JsonInclude(JsonInclude.Include.NON_NULL)
36 @JsonPropertyOrder({
37     "modelCustomizationName",
38     "modelCustomizationId",
39     "modelInvariantId",
40     "modelVersionId",
41     "modelName",
42     "modelNameVersionId",
43     "modelType",
44     "modelVersion"
45 })
46 public class ModelInfo {
47
48     /**
49      * reference to the customized set of parameters associated with a model in a given service context
50      * 
51      */
52     @JsonProperty("modelCustomizationName")
53     private String modelCustomizationName;
54     /**
55      * reference to the customized set of parameters associated with a model in a given service context
56      * 
57      */
58     @JsonProperty("modelCustomizationId")
59     private String modelCustomizationId;
60     /**
61      * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative
62      * 
63      */
64     @JsonProperty("modelInvariantId")
65     private String modelInvariantId;
66     /**
67      * Version id for version
68      * 
69      */
70     @JsonProperty("modelVersionId")
71     private String modelVersionId;
72     /**
73      * name of the model as defined in SDC--not authoritative
74      * 
75      */
76     @JsonProperty("modelName")
77     private String modelName;
78     /**
79      * UUID for the model name and version combination as defined in SDC--authoritative
80      * 
81      */
82     @JsonProperty("modelNameVersionId")
83     private String modelNameVersionId;
84     /**
85      * short description of the entity being operated on
86      * (Required)
87      * 
88      */
89     @JsonProperty("modelType")
90     private String modelType;
91     /**
92      * the version of the model as defined in SDC--not authoritative
93      * 
94      */
95     @JsonProperty("modelVersion")
96     private String modelVersion;
97
98     /**
99      * reference to the customized set of parameters associated with a model in a given service context
100      * 
101      * @return
102      *     The modelCustomizationName
103      */
104     @JsonProperty("modelCustomizationName")
105     public String getModelCustomizationName() {
106         return modelCustomizationName;
107     }
108
109     /**
110      * reference to the customized set of parameters associated with a model in a given service context
111      * 
112      * @param modelCustomizationName
113      *     The modelCustomizationName
114      */
115     @JsonProperty("modelCustomizationName")
116     public void setModelCustomizationName(String modelCustomizationName) {
117         this.modelCustomizationName = modelCustomizationName;
118     }
119
120     /**
121      * reference to the customized set of parameters associated with a model in a given service context
122      * 
123      * @return
124      *     The modelCustomizationId
125      */
126     @JsonProperty("modelCustomizationId")
127     public String getModelCustomizationId() {
128         return modelCustomizationId;
129     }
130
131     /**
132      * reference to the customized set of parameters associated with a model in a given service context
133      * 
134      * @param modelCustomizationId
135      *     The modelCustomizationId
136      */
137     @JsonProperty("modelCustomizationId")
138     public void setModelCustomizationId(String modelCustomizationId) {
139         this.modelCustomizationId = modelCustomizationId;
140     }
141
142     /**
143      * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative
144      * 
145      * @return
146      *     The modelInvariantId
147      */
148     @JsonProperty("modelInvariantId")
149     public String getModelInvariantId() {
150         return modelInvariantId;
151     }
152
153     /**
154      * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative
155      * 
156      * @param modelInvariantId
157      *     The modelInvariantId
158      */
159     @JsonProperty("modelInvariantId")
160     public void setModelInvariantId(String modelInvariantId) {
161         this.modelInvariantId = modelInvariantId;
162     }
163
164     /**
165      * Version id for version
166      * 
167      * @return
168      *     The modelVersionId
169      */
170     @JsonProperty("modelVersionId")
171     public String getModelVersionId() {
172         return modelVersionId;
173     }
174
175     /**
176      * Version id for version
177      * 
178      * @param modelVersionId
179      *     The modelVersionId
180      */
181     @JsonProperty("modelVersionId")
182     public void setModelVersionId(String modelVersionId) {
183         this.modelVersionId = modelVersionId;
184     }
185
186     /**
187      * name of the model as defined in SDC--not authoritative
188      * 
189      * @return
190      *     The modelName
191      */
192     @JsonProperty("modelName")
193     public String getModelName() {
194         return modelName;
195     }
196
197     /**
198      * name of the model as defined in SDC--not authoritative
199      * 
200      * @param modelName
201      *     The modelName
202      */
203     @JsonProperty("modelName")
204     public void setModelName(String modelName) {
205         this.modelName = modelName;
206     }
207
208     /**
209      * UUID for the model name and version combination as defined in SDC--authoritative
210      * 
211      * @return
212      *     The modelNameVersionId
213      */
214     @JsonProperty("modelNameVersionId")
215     public String getModelNameVersionId() {
216         return modelNameVersionId;
217     }
218
219     /**
220      * UUID for the model name and version combination as defined in SDC--authoritative
221      * 
222      * @param modelNameVersionId
223      *     The modelNameVersionId
224      */
225     @JsonProperty("modelNameVersionId")
226     public void setModelNameVersionId(String modelNameVersionId) {
227         this.modelNameVersionId = modelNameVersionId;
228     }
229
230     /**
231      * short description of the entity being operated on
232      * (Required)
233      * 
234      * @return
235      *     The modelType
236      */
237     @JsonProperty("modelType")
238     public String getModelType() {
239         return modelType;
240     }
241
242     /**
243      * short description of the entity being operated on
244      * (Required)
245      * 
246      * @param modelType
247      *     The modelType
248      */
249     @JsonProperty("modelType")
250     public void setModelType(String modelType) {
251         this.modelType = modelType;
252     }
253
254     /**
255      * the version of the model as defined in SDC--not authoritative
256      * 
257      * @return
258      *     The modelVersion
259      */
260     @JsonProperty("modelVersion")
261     public String getModelVersion() {
262         return modelVersion;
263     }
264
265     /**
266      * the version of the model as defined in SDC--not authoritative
267      * 
268      * @param modelVersion
269      *     The modelVersion
270      */
271     @JsonProperty("modelVersion")
272     public void setModelVersion(String modelVersion) {
273         this.modelVersion = modelVersion;
274     }
275
276     @Override
277     public String toString() {
278         return ToStringBuilder.reflectionToString(this);
279     }
280
281     @Override
282     public int hashCode() {
283         return new HashCodeBuilder().append(modelCustomizationName).append(modelCustomizationId).append(modelInvariantId).append(modelVersionId).append(modelName).append(modelNameVersionId).append(modelType).append(modelVersion).toHashCode();
284     }
285
286     @Override
287     public boolean equals(Object other) {
288         if (other == this) {
289             return true;
290         }
291         if (!(other instanceof ModelInfo)) {
292             return false;
293         }
294         ModelInfo rhs = ((ModelInfo) other);
295         return new EqualsBuilder().append(modelCustomizationName, rhs.modelCustomizationName).append(modelCustomizationId, rhs.modelCustomizationId).append(modelInvariantId, rhs.modelInvariantId).append(modelVersionId, rhs.modelVersionId).append(modelName, rhs.modelName).append(modelNameVersionId, rhs.modelNameVersionId).append(modelType, rhs.modelType).append(modelVersion, rhs.modelVersion).isEquals();
296     }
297
298 }