2 package org.onap.vid.mso.rest;
4 import com.fasterxml.jackson.annotation.*;
5 import org.apache.commons.lang.builder.EqualsBuilder;
6 import org.apache.commons.lang.builder.HashCodeBuilder;
7 import org.apache.commons.lang.builder.ToStringBuilder;
9 import java.util.HashMap;
14 * fields describing the status of a request
17 @JsonInclude(JsonInclude.Include.NON_NULL)
25 public class RequestStatus {
28 * percentage complete estimate from 0 to 100
31 @JsonProperty("percentProgress")
32 private Double percentProgress;
34 * short description of the instantiation state
38 @JsonProperty("requestState")
39 private String requestState;
41 * additional descriptive information about the status
44 @JsonProperty("statusMessage")
45 private String statusMessage;
47 * GMT Datetime the requestStatus was created e.g.: Wed, 15 Oct 2014 13:01:52 GMT
51 @JsonProperty("timestamp")
52 private String timestamp;
54 * true or false boolean indicating whether the request was rolled back
57 @JsonProperty("wasRolledBack")
58 private Boolean wasRolledBack;
60 private Map<String, Object> additionalProperties = new HashMap<>();
63 * percentage complete estimate from 0 to 100
68 @JsonProperty("percentProgress")
69 public Double getPercentProgress() {
70 return percentProgress;
74 * percentage complete estimate from 0 to 100
76 * @param percentProgress
79 @JsonProperty("percentProgress")
80 public void setPercentProgress(Double percentProgress) {
81 this.percentProgress = percentProgress;
85 * short description of the instantiation state
91 @JsonProperty("requestState")
92 public String getRequestState() {
97 * short description of the instantiation state
100 * @param requestState
103 @JsonProperty("requestState")
104 public void setRequestState(String requestState) {
105 this.requestState = requestState;
109 * additional descriptive information about the status
114 @JsonProperty("statusMessage")
115 public String getStatusMessage() {
116 return statusMessage;
120 * additional descriptive information about the status
122 * @param statusMessage
125 @JsonProperty("statusMessage")
126 public void setStatusMessage(String statusMessage) {
127 this.statusMessage = statusMessage;
131 * GMT Datetime the requestStatus was created e.g.: Wed, 15 Oct 2014 13:01:52 GMT
137 @JsonProperty("timestamp")
138 public String getTimestamp() {
143 * GMT Datetime the requestStatus was created e.g.: Wed, 15 Oct 2014 13:01:52 GMT
149 @JsonProperty("timestamp")
150 public void setTimestamp(String timestamp) {
151 this.timestamp = timestamp;
155 * true or false boolean indicating whether the request was rolled back
160 @JsonProperty("wasRolledBack")
161 public Boolean getWasRolledBack() {
162 return wasRolledBack;
166 * true or false boolean indicating whether the request was rolled back
168 * @param wasRolledBack
171 @JsonProperty("wasRolledBack")
172 public void setWasRolledBack(Boolean wasRolledBack) {
173 this.wasRolledBack = wasRolledBack;
177 public String toString() {
178 return ToStringBuilder.reflectionToString(this);
182 public Map<String, Object> getAdditionalProperties() {
183 return this.additionalProperties;
187 public void setAdditionalProperty(String name, Object value) {
188 this.additionalProperties.put(name, value);
192 public int hashCode() {
193 return new HashCodeBuilder().append(percentProgress).append(requestState).append(statusMessage).append(timestamp).append(wasRolledBack).append(additionalProperties).toHashCode();
197 public boolean equals(Object other) {
201 if (!(other instanceof RequestStatus)) {
204 RequestStatus rhs = ((RequestStatus) other);
205 return new EqualsBuilder().append(percentProgress, rhs.percentProgress).append(requestState, rhs.requestState).append(statusMessage, rhs.statusMessage).append(timestamp, rhs.timestamp).append(wasRolledBack, rhs.wasRolledBack).append(additionalProperties, rhs.additionalProperties).isEquals();