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 com.fasterxml.jackson.annotation.*;
24 import org.apache.commons.lang.builder.EqualsBuilder;
25 import org.apache.commons.lang.builder.ToStringBuilder;
26 import org.apache.commons.lang3.builder.HashCodeBuilder;
28 import java.util.HashMap;
35 @JsonInclude(JsonInclude.Include.NON_NULL)
46 public class Request {
49 /** The instance ids. */
50 @JsonProperty("instanceIds")
51 private InstanceIds instanceIds;
53 /** The request details. */
54 @JsonProperty("requestDetails")
55 private RequestDetails requestDetails;
57 /** The request status. */
58 @JsonProperty("requestStatus")
59 private RequestStatus requestStatus;
62 * Date and time the request was finished in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT
65 @JsonProperty("finishTime")
66 private String finishTime;
69 * UUID for the request generated by the instantiation service
73 @JsonProperty("requestId")
74 private String requestId;
77 * short description of the entity being operated on
81 @JsonProperty("requestScope")
82 private String requestScope;
85 * short description of the action being performed on the requestScope
89 @JsonProperty("requestType")
90 private String requestType;
93 * Date and time the request was created in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT
97 @JsonProperty("startTime")
98 private String startTime;
101 private Map<String, Object> additionalProperties = new HashMap<>();
105 * @see org.openecomp.vid.domain.mso.Request#getInstanceIds()
107 @JsonProperty("instanceIds")
108 public InstanceIds getInstanceIds() {
113 * Sets the instance ids.
115 * @param instanceIds The instanceIds
117 @JsonProperty("instanceIds")
118 public void setInstanceIds(InstanceIds instanceIds) {
119 this.instanceIds = instanceIds;
125 * @return The requestDetails
127 @JsonProperty("requestDetails")
128 public RequestDetails getRequestDetails() {
129 return requestDetails;
135 * @param requestDetails The requestDetails
137 @JsonProperty("requestDetails")
138 public void setRequestDetails(RequestDetails requestDetails) {
139 this.requestDetails = requestDetails;
144 * Gets the request status.
146 * @return The requestStatus
148 @JsonProperty("requestStatus")
149 public RequestStatus getRequestStatus() {
150 return requestStatus;
154 * Sets the request status.
156 * @param requestStatus The requestStatus
158 @JsonProperty("requestStatus")
159 public void setRequestStatus(RequestStatus requestStatus) {
160 this.requestStatus = requestStatus;
164 * Date and time the request was finished in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT
169 @JsonProperty("finishTime")
170 public String getFinishTime() {
175 * Date and time the request was finished in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT
180 @JsonProperty("finishTime")
181 public void setFinishTime(String finishTime) {
182 this.finishTime = finishTime;
186 * UUID for the request generated by the instantiation service
192 @JsonProperty("requestId")
193 public String getRequestId() {
198 * UUID for the request generated by the instantiation service
204 @JsonProperty("requestId")
205 public void setRequestId(String requestId) {
206 this.requestId = requestId;
210 * short description of the entity being operated on
216 @JsonProperty("requestScope")
217 public String getRequestScope() {
222 * short description of the entity being operated on
225 * @param requestScope
228 @JsonProperty("requestScope")
229 public void setRequestScope(String requestScope) {
230 this.requestScope = requestScope;
234 * short description of the action being performed on the requestScope
240 @JsonProperty("requestType")
241 public String getRequestType() {
246 * short description of the action being performed on the requestScope
252 @JsonProperty("requestType")
253 public void setRequestType(String requestType) {
254 this.requestType = requestType;
258 * Date and time the request was created in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT
264 @JsonProperty("startTime")
265 public String getStartTime() {
270 * Date and time the request was created in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT
276 @JsonProperty("startTime")
277 public void setStartTime(String startTime) {
278 this.startTime = startTime;
282 public String toString() {
283 return ToStringBuilder.reflectionToString(this);
287 public Map<String, Object> getAdditionalProperties() {
288 return this.additionalProperties;
292 public void setAdditionalProperty(String name, Object value) {
293 this.additionalProperties.put(name, value);
297 public int hashCode() {
298 return new HashCodeBuilder(17, 37).append(getFinishTime()).append(getInstanceIds()).append(getRequestDetails()).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode();
302 public boolean equals(Object other) {
306 if (!(other instanceof Request)) {
309 Request rhs = ((Request) other);
310 return new EqualsBuilder().append(getFinishTime(), rhs.getFinishTime()).append(getInstanceIds(), rhs.getInstanceIds()).append(getRequestDetails(), rhs.getRequestDetails()).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals();