Fix for Penetration test _ Session and cookie management
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / rest / InstanceIds.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
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
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.onap.vid.mso.rest;
22
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;
27
28 import java.util.HashMap;
29 import java.util.Map;
30
31
32 /**
33  * instanceIds that may be associated with a particular request
34  * 
35  */
36 @JsonInclude(JsonInclude.Include.NON_NULL)
37 @JsonPropertyOrder({
38     "networkInstanceId",
39     "serviceInstanceId",
40     "vfModuleInstanceId",
41     "vnfInstanceId",
42     "volumeGroupInstanceId"
43 })
44 public class InstanceIds {
45
46     /**
47      * UUID for the network instance (if any)
48      * 
49      */
50     @JsonProperty("networkInstanceId")
51     private String networkInstanceId;
52     /**
53      * UUID for the service instance
54      * 
55      */
56     @JsonProperty("serviceInstanceId")
57     private String serviceInstanceId;
58     /**
59      * UUID for the vfModule instance (if any)
60      * 
61      */
62     @JsonProperty("vfModuleInstanceId")
63     private String vfModuleInstanceId;
64     /**
65      * UUID for the vnf instance (if any)
66      * 
67      */
68     @JsonProperty("vnfInstanceId")
69     private String vnfInstanceId;
70     /**
71      * UUID for the volume group instance (if any)
72      * 
73      */
74     @JsonProperty("volumeGroupInstanceId")
75     private String volumeGroupInstanceId;
76     @JsonIgnore
77     private Map<String, Object> additionalProperties = new HashMap<>();
78
79     /**
80      * UUID for the network instance (if any)
81      * 
82      * @return
83      *     The networkInstanceId
84      */
85     @JsonProperty("networkInstanceId")
86     public String getNetworkInstanceId() {
87         return networkInstanceId;
88     }
89
90     /**
91      * UUID for the network instance (if any)
92      * 
93      * @param networkInstanceId
94      *     The networkInstanceId
95      */
96     @JsonProperty("networkInstanceId")
97     public void setNetworkInstanceId(String networkInstanceId) {
98         this.networkInstanceId = networkInstanceId;
99     }
100
101     /**
102      * UUID for the service instance
103      * 
104      * @return
105      *     The serviceInstanceId
106      */
107     @JsonProperty("serviceInstanceId")
108     public String getServiceInstanceId() {
109         return serviceInstanceId;
110     }
111
112     /**
113      * UUID for the service instance
114      * 
115      * @param serviceInstanceId
116      *     The serviceInstanceId
117      */
118     @JsonProperty("serviceInstanceId")
119     public void setServiceInstanceId(String serviceInstanceId) {
120         this.serviceInstanceId = serviceInstanceId;
121     }
122
123     /**
124      * UUID for the vfModule instance (if any)
125      * 
126      * @return
127      *     The vfModuleInstanceId
128      */
129     @JsonProperty("vfModuleInstanceId")
130     public String getVfModuleInstanceId() {
131         return vfModuleInstanceId;
132     }
133
134     /**
135      * UUID for the vfModule instance (if any)
136      * 
137      * @param vfModuleInstanceId
138      *     The vfModuleInstanceId
139      */
140     @JsonProperty("vfModuleInstanceId")
141     public void setVfModuleInstanceId(String vfModuleInstanceId) {
142         this.vfModuleInstanceId = vfModuleInstanceId;
143     }
144
145     /**
146      * UUID for the vnf instance (if any)
147      * 
148      * @return
149      *     The vnfInstanceId
150      */
151     @JsonProperty("vnfInstanceId")
152     public String getVnfInstanceId() {
153         return vnfInstanceId;
154     }
155
156     /**
157      * UUID for the vnf instance (if any)
158      * 
159      * @param vnfInstanceId
160      *     The vnfInstanceId
161      */
162     @JsonProperty("vnfInstanceId")
163     public void setVnfInstanceId(String vnfInstanceId) {
164         this.vnfInstanceId = vnfInstanceId;
165     }
166
167     /**
168      * UUID for the volume group instance (if any)
169      * 
170      * @return
171      *     The volumeGroupInstanceId
172      */
173     @JsonProperty("volumeGroupInstanceId")
174     public String getVolumeGroupInstanceId() {
175         return volumeGroupInstanceId;
176     }
177
178     /**
179      * UUID for the volume group instance (if any)
180      * 
181      * @param volumeGroupInstanceId
182      *     The volumeGroupInstanceId
183      */
184     @JsonProperty("volumeGroupInstanceId")
185     public void setVolumeGroupInstanceId(String volumeGroupInstanceId) {
186         this.volumeGroupInstanceId = volumeGroupInstanceId;
187     }
188
189     @Override
190     public String toString() {
191         return ToStringBuilder.reflectionToString(this);
192     }
193
194     @JsonAnyGetter
195     public Map<String, Object> getAdditionalProperties() {
196         return this.additionalProperties;
197     }
198
199     @JsonAnySetter
200     public void setAdditionalProperty(String name, Object value) {
201         this.additionalProperties.put(name, value);
202     }
203
204     @Override
205     public int hashCode() {
206         return new HashCodeBuilder().append(networkInstanceId).append(serviceInstanceId).append(vfModuleInstanceId).append(vnfInstanceId).append(volumeGroupInstanceId).append(additionalProperties).toHashCode();
207     }
208
209     @Override
210     public boolean equals(Object other) {
211         if (other == this) {
212             return true;
213         }
214         if (!(other instanceof InstanceIds)) {
215             return false;
216         }
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();
219     }
220
221 }