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.rest;
23 import com.fasterxml.jackson.annotation.*;
24 import org.apache.commons.lang.builder.EqualsBuilder;
25 import org.apache.commons.lang.builder.HashCodeBuilder;
26 import org.apache.commons.lang.builder.ToStringBuilder;
28 import java.util.HashMap;
33 * instanceIds that may be associated with a particular request
36 @JsonInclude(JsonInclude.Include.NON_NULL)
42 "volumeGroupInstanceId"
44 public class InstanceIds {
47 * UUID for the network instance (if any)
50 @JsonProperty("networkInstanceId")
51 private String networkInstanceId;
53 * UUID for the service instance
56 @JsonProperty("serviceInstanceId")
57 private String serviceInstanceId;
59 * UUID for the vfModule instance (if any)
62 @JsonProperty("vfModuleInstanceId")
63 private String vfModuleInstanceId;
65 * UUID for the vnf instance (if any)
68 @JsonProperty("vnfInstanceId")
69 private String vnfInstanceId;
71 * UUID for the volume group instance (if any)
74 @JsonProperty("volumeGroupInstanceId")
75 private String volumeGroupInstanceId;
77 private Map<String, Object> additionalProperties = new HashMap<>();
80 * UUID for the network instance (if any)
83 * The networkInstanceId
85 @JsonProperty("networkInstanceId")
86 public String getNetworkInstanceId() {
87 return networkInstanceId;
91 * UUID for the network instance (if any)
93 * @param networkInstanceId
94 * The networkInstanceId
96 @JsonProperty("networkInstanceId")
97 public void setNetworkInstanceId(String networkInstanceId) {
98 this.networkInstanceId = networkInstanceId;
102 * UUID for the service instance
105 * The serviceInstanceId
107 @JsonProperty("serviceInstanceId")
108 public String getServiceInstanceId() {
109 return serviceInstanceId;
113 * UUID for the service instance
115 * @param serviceInstanceId
116 * The serviceInstanceId
118 @JsonProperty("serviceInstanceId")
119 public void setServiceInstanceId(String serviceInstanceId) {
120 this.serviceInstanceId = serviceInstanceId;
124 * UUID for the vfModule instance (if any)
127 * The vfModuleInstanceId
129 @JsonProperty("vfModuleInstanceId")
130 public String getVfModuleInstanceId() {
131 return vfModuleInstanceId;
135 * UUID for the vfModule instance (if any)
137 * @param vfModuleInstanceId
138 * The vfModuleInstanceId
140 @JsonProperty("vfModuleInstanceId")
141 public void setVfModuleInstanceId(String vfModuleInstanceId) {
142 this.vfModuleInstanceId = vfModuleInstanceId;
146 * UUID for the vnf instance (if any)
151 @JsonProperty("vnfInstanceId")
152 public String getVnfInstanceId() {
153 return vnfInstanceId;
157 * UUID for the vnf instance (if any)
159 * @param vnfInstanceId
162 @JsonProperty("vnfInstanceId")
163 public void setVnfInstanceId(String vnfInstanceId) {
164 this.vnfInstanceId = vnfInstanceId;
168 * UUID for the volume group instance (if any)
171 * The volumeGroupInstanceId
173 @JsonProperty("volumeGroupInstanceId")
174 public String getVolumeGroupInstanceId() {
175 return volumeGroupInstanceId;
179 * UUID for the volume group instance (if any)
181 * @param volumeGroupInstanceId
182 * The volumeGroupInstanceId
184 @JsonProperty("volumeGroupInstanceId")
185 public void setVolumeGroupInstanceId(String volumeGroupInstanceId) {
186 this.volumeGroupInstanceId = volumeGroupInstanceId;
190 public String toString() {
191 return ToStringBuilder.reflectionToString(this);
195 public Map<String, Object> getAdditionalProperties() {
196 return this.additionalProperties;
200 public void setAdditionalProperty(String name, Object value) {
201 this.additionalProperties.put(name, value);
205 public int hashCode() {
206 return new HashCodeBuilder().append(networkInstanceId).append(serviceInstanceId).append(vfModuleInstanceId).append(vnfInstanceId).append(volumeGroupInstanceId).append(additionalProperties).toHashCode();
210 public boolean equals(Object other) {
214 if (!(other instanceof InstanceIds)) {
217 InstanceIds rhs = ((InstanceIds) other);
218 return new EqualsBuilder().append(networkInstanceId, rhs.networkInstanceId).append(serviceInstanceId, rhs.serviceInstanceId).append(vfModuleInstanceId, rhs.vfModuleInstanceId).append(vnfInstanceId, rhs.vnfInstanceId).append(volumeGroupInstanceId, rhs.volumeGroupInstanceId).append(additionalProperties, rhs.additionalProperties).isEquals();