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