2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.vid.mso.rest;
\r
23 import java.util.HashMap;
\r
24 import java.util.Map;
\r
25 import com.fasterxml.jackson.annotation.JsonAnyGetter;
\r
26 import com.fasterxml.jackson.annotation.JsonAnySetter;
\r
27 import com.fasterxml.jackson.annotation.JsonIgnore;
\r
28 import com.fasterxml.jackson.annotation.JsonInclude;
\r
29 import com.fasterxml.jackson.annotation.JsonProperty;
\r
30 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
\r
31 import org.apache.commons.lang.builder.EqualsBuilder;
\r
32 import org.apache.commons.lang.builder.HashCodeBuilder;
\r
33 import org.apache.commons.lang.builder.ToStringBuilder;
\r
37 * modelInfo and optional instance id for a model related to the modelInfo being operated on.
\r
39 @JsonInclude(JsonInclude.Include.NON_NULL)
\r
40 @JsonPropertyOrder({
\r
44 public class RelatedModel extends org.openecomp.vid.domain.mso.RelatedModel {
\r
47 @JsonProperty("modelInfo")
\r
48 private org.openecomp.vid.domain.mso.ModelInfo modelInfo;
\r
50 /** The additional properties. */
\r
52 private Map<String, Object> additionalProperties = new HashMap<String, Object>();
\r
57 * @return The modelInfo
\r
59 @JsonProperty("modelInfo")
\r
60 public org.openecomp.vid.domain.mso.ModelInfo getModelInfo() {
\r
67 * @param modelInfo The modelInfo
\r
69 @JsonProperty("modelInfo")
\r
70 public void setModelInfo(org.openecomp.vid.domain.mso.ModelInfo modelInfo) {
\r
71 this.modelInfo = modelInfo;
\r
75 * @see org.openecomp.vid.domain.mso.RelatedModel#toString()
\r
78 public String toString() {
\r
79 return ToStringBuilder.reflectionToString(this);
\r
83 * @see org.openecomp.vid.domain.mso.RelatedModel#getAdditionalProperties()
\r
86 public Map<String, Object> getAdditionalProperties() {
\r
87 return this.additionalProperties;
\r
91 * @see org.openecomp.vid.domain.mso.RelatedModel#setAdditionalProperty(java.lang.String, java.lang.Object)
\r
94 public void setAdditionalProperty(String name, Object value) {
\r
95 this.additionalProperties.put(name, value);
\r
99 * @see org.openecomp.vid.domain.mso.RelatedModel#hashCode()
\r
102 public int hashCode() {
\r
103 return new HashCodeBuilder().append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode();
\r
107 * @see org.openecomp.vid.domain.mso.RelatedModel#equals(java.lang.Object)
\r
110 public boolean equals(Object other) {
\r
111 if (other == this) {
\r
114 if ((other instanceof RelatedModel) == false) {
\r
117 RelatedModel rhs = ((RelatedModel) other);
\r
118 return new EqualsBuilder().append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.modelInfo).append(additionalProperties, rhs.additionalProperties).isEquals();
\r