org.onap migration
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / rest / AsyncRequestStatus.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.onap.vid.mso.rest;
22
23 //import java.util.HashMap;
24 //import java.util.Map;
25 //import javax.annotation.Generated;
26
27 import org.onap.vid.domain.mso.InstanceIds;
28 import org.onap.vid.domain.mso.RequestStatus;
29 //import com.fasterxml.jackson.annotation.JsonAnyGetter;
30 //import com.fasterxml.jackson.annotation.JsonAnySetter;
31 //import com.fasterxml.jackson.annotation.JsonCreator;
32 //import com.fasterxml.jackson.annotation.JsonIgnore;
33 import com.fasterxml.jackson.annotation.JsonInclude;
34 import com.fasterxml.jackson.annotation.JsonProperty;
35 //import com.fasterxml.jackson.annotation.JsonPropertyOrder;
36 //import com.fasterxml.jackson.annotation.JsonValue;
37 import org.apache.commons.lang.builder.EqualsBuilder;
38 import org.apache.commons.lang.builder.HashCodeBuilder;
39 import org.apache.commons.lang.builder.ToStringBuilder;
40
41
42 /**
43  * request structure.
44  */
45 @JsonInclude(JsonInclude.Include.NON_NULL)
46
47 public class AsyncRequestStatus extends org.onap.vid.domain.mso.AsyncRequestStatus {
48
49     
50     /** The instance ids. */
51     private InstanceIds instanceIds;
52    
53     /** The request status. */
54     private RequestStatus requestStatus;
55
56     /* (non-Javadoc)
57      * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#getInstanceIds()
58      */
59     public InstanceIds getInstanceIds() {
60         return instanceIds;
61     }
62
63     /**
64      * Sets the instance ids.
65      *
66      * @param instanceIds the new instance ids
67      */
68     public void setInstanceIds(InstanceIds instanceIds) {
69         this.instanceIds = instanceIds;
70     }
71
72     
73     /**
74      * (Required).
75      *
76      * @return     The requestStatus
77      */
78     @JsonProperty("requestStatus")
79     public RequestStatus getRequestStatus() {
80         return requestStatus;
81     }
82
83     /**
84      * (Required).
85      *
86      * @param requestStatus     The requestStatus
87      */
88     @JsonProperty("requestStatus")
89     public void setRequestStatus(RequestStatus requestStatus) {
90         this.requestStatus = requestStatus;
91     }
92     
93     /* (non-Javadoc)
94      * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#toString()
95      */
96     @Override
97     public String toString() {
98         return ToStringBuilder.reflectionToString(this);
99     }
100
101     /* (non-Javadoc)
102      * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#hashCode()
103      */
104     @Override
105     public int hashCode() {
106         return new HashCodeBuilder().append(getCorrelator()).append(getFinishTime()).append(instanceIds).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode();
107     }
108
109     /* (non-Javadoc)
110      * @see org.openecomp.vid.domain.mso.AsyncRequestStatus#equals(java.lang.Object)
111      */
112     @Override
113     public boolean equals(Object other) {
114         if (other == this) {
115             return true;
116         }
117         if ((other instanceof AsyncRequestStatus) == false) {
118             return false;
119         }
120         AsyncRequestStatus rhs = ((AsyncRequestStatus) other);
121         return new EqualsBuilder().append(getCorrelator(), rhs.getCorrelator()).append(getFinishTime(), rhs.getFinishTime()).append(instanceIds, rhs.instanceIds).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();
122     }
123 }