2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.vid.mso.model;
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;
32 * fields describing the SDC entity being operated on by the request
35 @JsonInclude(JsonInclude.Include.NON_NULL)
37 "modelCustomizationName",
38 "modelCustomizationId",
46 public class ModelInfo {
49 * reference to the customized set of parameters associated with a model in a given service context
52 @JsonProperty("modelCustomizationName")
53 private String modelCustomizationName;
55 * reference to the customized set of parameters associated with a model in a given service context
58 @JsonProperty("modelCustomizationId")
59 private String modelCustomizationId;
61 * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative
64 @JsonProperty("modelInvariantId")
65 private String modelInvariantId;
67 * Version id for version
70 @JsonProperty("modelVersionId")
71 private String modelVersionId;
73 * name of the model as defined in SDC--not authoritative
76 @JsonProperty("modelName")
77 private String modelName;
79 * UUID for the model name and version combination as defined in SDC--authoritative
82 @JsonProperty("modelNameVersionId")
83 private String modelNameVersionId;
85 * short description of the entity being operated on
89 @JsonProperty("modelType")
90 private String modelType;
92 * the version of the model as defined in SDC--not authoritative
95 @JsonProperty("modelVersion")
96 private String modelVersion;
99 * reference to the customized set of parameters associated with a model in a given service context
102 * The modelCustomizationName
104 @JsonProperty("modelCustomizationName")
105 public String getModelCustomizationName() {
106 return modelCustomizationName;
110 * reference to the customized set of parameters associated with a model in a given service context
112 * @param modelCustomizationName
113 * The modelCustomizationName
115 @JsonProperty("modelCustomizationName")
116 public void setModelCustomizationName(String modelCustomizationName) {
117 this.modelCustomizationName = modelCustomizationName;
121 * reference to the customized set of parameters associated with a model in a given service context
124 * The modelCustomizationId
126 @JsonProperty("modelCustomizationId")
127 public String getModelCustomizationId() {
128 return modelCustomizationId;
132 * reference to the customized set of parameters associated with a model in a given service context
134 * @param modelCustomizationId
135 * The modelCustomizationId
137 @JsonProperty("modelCustomizationId")
138 public void setModelCustomizationId(String modelCustomizationId) {
139 this.modelCustomizationId = modelCustomizationId;
143 * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative
146 * The modelInvariantId
148 @JsonProperty("modelInvariantId")
149 public String getModelInvariantId() {
150 return modelInvariantId;
154 * Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative
156 * @param modelInvariantId
157 * The modelInvariantId
159 @JsonProperty("modelInvariantId")
160 public void setModelInvariantId(String modelInvariantId) {
161 this.modelInvariantId = modelInvariantId;
165 * Version id for version
170 @JsonProperty("modelVersionId")
171 public String getModelVersionId() {
172 return modelVersionId;
176 * Version id for version
178 * @param modelVersionId
181 @JsonProperty("modelVersionId")
182 public void setModelVersionId(String modelVersionId) {
183 this.modelVersionId = modelVersionId;
187 * name of the model as defined in SDC--not authoritative
192 @JsonProperty("modelName")
193 public String getModelName() {
198 * name of the model as defined in SDC--not authoritative
203 @JsonProperty("modelName")
204 public void setModelName(String modelName) {
205 this.modelName = modelName;
209 * UUID for the model name and version combination as defined in SDC--authoritative
212 * The modelNameVersionId
214 @JsonProperty("modelNameVersionId")
215 public String getModelNameVersionId() {
216 return modelNameVersionId;
220 * UUID for the model name and version combination as defined in SDC--authoritative
222 * @param modelNameVersionId
223 * The modelNameVersionId
225 @JsonProperty("modelNameVersionId")
226 public void setModelNameVersionId(String modelNameVersionId) {
227 this.modelNameVersionId = modelNameVersionId;
231 * short description of the entity being operated on
237 @JsonProperty("modelType")
238 public String getModelType() {
243 * short description of the entity being operated on
249 @JsonProperty("modelType")
250 public void setModelType(String modelType) {
251 this.modelType = modelType;
255 * the version of the model as defined in SDC--not authoritative
260 @JsonProperty("modelVersion")
261 public String getModelVersion() {
266 * the version of the model as defined in SDC--not authoritative
268 * @param modelVersion
271 @JsonProperty("modelVersion")
272 public void setModelVersion(String modelVersion) {
273 this.modelVersion = modelVersion;
277 public String toString() {
278 return ToStringBuilder.reflectionToString(this);
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();
287 public boolean equals(Object other) {
291 if (!(other instanceof ModelInfo)) {
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();