2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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.rest;
23 import java.util.HashMap;
25 import javax.annotation.Generated;
26 import com.fasterxml.jackson.annotation.JsonAnyGetter;
27 import com.fasterxml.jackson.annotation.JsonAnySetter;
28 import com.fasterxml.jackson.annotation.JsonIgnore;
29 import com.fasterxml.jackson.annotation.JsonInclude;
30 import com.fasterxml.jackson.annotation.JsonProperty;
31 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
32 import org.apache.commons.lang.builder.EqualsBuilder;
33 import org.apache.commons.lang.builder.HashCodeBuilder;
34 import org.apache.commons.lang.builder.ToStringBuilder;
38 * modelInfo and optional instanceId and instanceName for a model related to the modelInfo being operated on.
40 @JsonInclude(JsonInclude.Include.NON_NULL)
41 @Generated("org.jsonschema2pojo")
47 public class RelatedInstance extends org.onap.vid.domain.mso.RelatedInstance{
50 /** The model info. */
51 @JsonProperty("modelInfo")
52 private org.onap.vid.domain.mso.ModelInfo modelInfo;
54 /** The additional properties. */
56 private Map<String, Object> additionalProperties = new HashMap<String, Object>();
61 * @return The modelInfo
63 @JsonProperty("modelInfo")
64 public org.onap.vid.domain.mso.ModelInfo getModelInfo() {
71 * @param modelInfo The modelInfo
73 @JsonProperty("modelInfo")
74 public void setModelInfo(org.onap.vid.domain.mso.ModelInfo modelInfo) {
75 this.modelInfo = modelInfo;
79 * @see org.openecomp.vid.domain.mso.RelatedInstance#toString()
82 public String toString() {
83 return ToStringBuilder.reflectionToString(this);
87 * @see org.openecomp.vid.domain.mso.RelatedInstance#getAdditionalProperties()
90 public Map<String, Object> getAdditionalProperties() {
91 return this.additionalProperties;
95 * @see org.openecomp.vid.domain.mso.RelatedInstance#setAdditionalProperty(java.lang.String, java.lang.Object)
98 public void setAdditionalProperty(String name, Object value) {
99 this.additionalProperties.put(name, value);
103 * @see org.openecomp.vid.domain.mso.RelatedInstance#hashCode()
106 public int hashCode() {
107 return new HashCodeBuilder().append(getInstanceName()).append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode();
111 * @see org.openecomp.vid.domain.mso.RelatedInstance#equals(java.lang.Object)
114 public boolean equals(Object other) {
118 if ((other instanceof RelatedInstance) == false) {
121 RelatedInstance rhs = ((RelatedInstance) other);
122 return new EqualsBuilder().append(getInstanceName(), rhs.getInstanceName()).append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.getModelInfo()).append(additionalProperties, rhs.additionalProperties).isEquals();