actually adding the files to the initial commit
[vid.git] / vid / src / main / java / org / openecomp / vid / mso / rest / RelatedInstance.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
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
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.openecomp.vid.mso.rest;
22
23 import java.util.HashMap;
24 import java.util.Map;
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;
35
36
37 /**
38  * modelInfo and optional instanceId and instanceName for a model related to the modelInfo being operated on
39  * 
40  */
41 @JsonInclude(JsonInclude.Include.NON_NULL)
42 @Generated("org.jsonschema2pojo")
43 @JsonPropertyOrder({
44     "instanceName",
45     "instanceId",
46     "modelInfo"
47 })
48 public class RelatedInstance extends org.openecomp.vid.domain.mso.RelatedInstance{
49
50
51     @JsonProperty("modelInfo")
52     private org.openecomp.vid.domain.mso.ModelInfo modelInfo;
53     @JsonIgnore
54     private Map<String, Object> additionalProperties = new HashMap<String, Object>();
55
56     /**
57      * 
58      * (Required)
59      * 
60      * @return
61      *     The modelInfo
62      */
63     @JsonProperty("modelInfo")
64     public org.openecomp.vid.domain.mso.ModelInfo getModelInfo() {
65         return modelInfo;
66     }
67
68     /**
69      * 
70      * (Required)
71      * 
72      * @param modelInfo
73      *     The modelInfo
74      */
75     @JsonProperty("modelInfo")
76     public void setModelInfo(org.openecomp.vid.domain.mso.ModelInfo modelInfo) {
77         this.modelInfo = modelInfo;
78     }
79
80     @Override
81     public String toString() {
82         return ToStringBuilder.reflectionToString(this);
83     }
84
85     @JsonAnyGetter
86     public Map<String, Object> getAdditionalProperties() {
87         return this.additionalProperties;
88     }
89
90     @JsonAnySetter
91     public void setAdditionalProperty(String name, Object value) {
92         this.additionalProperties.put(name, value);
93     }
94
95     @Override
96     public int hashCode() {
97         return new HashCodeBuilder().append(getInstanceName()).append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode();
98     }
99
100     @Override
101     public boolean equals(Object other) {
102         if (other == this) {
103             return true;
104         }
105         if ((other instanceof RelatedInstance) == false) {
106             return false;
107         }
108         RelatedInstance rhs = ((RelatedInstance) other);
109         return new EqualsBuilder().append(getInstanceName(), rhs.getInstanceName()).append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.getModelInfo()).append(additionalProperties, rhs.additionalProperties).isEquals();
110     }
111
112 }