View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.Date;
4   import java.util.Objects;
5   import java.util.UUID;
6   
7   import com.fasterxml.jackson.annotation.JsonCreator;
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   import com.fasterxml.jackson.annotation.JsonValue;
10  
11  import io.swagger.annotations.ApiModelProperty;
12  
13  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
14  public class CancelledStatusResponse {
15    /**
16     * Document processing was cancelled.
17     */
18    public enum StatusEnum {
19      CANCELLED("CANCELLED");
20  
21      private String value;
22  
23      StatusEnum(String value) {
24        this.value = value;
25      }
26  
27      @Override
28      @JsonValue
29      public String toString() {
30        return String.valueOf(value);
31      }
32  
33      @JsonCreator
34      public static StatusEnum fromValue(String text) {
35        for (StatusEnum b : StatusEnum.values()) {
36          if (String.valueOf(b.value).equals(text)) {
37            return b;
38          }
39        }
40        throw new IllegalArgumentException("Unexpected value '" + text + "'");
41      }
42    }
43  
44    @JsonProperty("status")
45    private StatusEnum status;
46  
47    @JsonProperty("doc_id")
48    private UUID docId;
49  
50    @JsonProperty("cancelled_at")
51    private Date cancelledAt;
52  
53    /**
54     * Which phase was cancelled.
55     */
56    public enum CancelledDuringEnum {
57      IMPORTING("IMPORTING"),
58  
59      EXPORTING("EXPORTING");
60  
61      private String value;
62  
63      CancelledDuringEnum(String value) {
64        this.value = value;
65      }
66  
67      @Override
68      @JsonValue
69      public String toString() {
70        return String.valueOf(value);
71      }
72  
73      @JsonCreator
74      public static CancelledDuringEnum fromValue(String text) {
75        for (CancelledDuringEnum b : CancelledDuringEnum.values()) {
76          if (String.valueOf(b.value).equals(text)) {
77            return b;
78          }
79        }
80        throw new IllegalArgumentException("Unexpected value '" + text + "'");
81      }
82    }
83  
84    @JsonProperty("cancelled_during")
85    private CancelledDuringEnum cancelledDuring;
86  
87    /**
88     * Document processing was cancelled.
89     **/
90    public CancelledStatusResponse status(StatusEnum status) {
91      this.status = status;
92      return this;
93    }
94  
95    @ApiModelProperty(example = "CANCELLED", required = true, value = "Document processing was cancelled.")
96    @JsonProperty("status")
97    public StatusEnum getStatus() {
98      return status;
99    }
100 
101   public void setStatus(StatusEnum status) {
102     this.status = status;
103   }
104 
105   /**
106    * Unique identifier of the document.
107    **/
108   public CancelledStatusResponse docId(UUID docId) {
109     this.docId = docId;
110     return this;
111   }
112 
113   @ApiModelProperty(example = "550e8400-e29b-41d4-a716-446655440000", required = true, value = "Unique identifier of the document.")
114   @JsonProperty("doc_id")
115   public UUID getDocId() {
116     return docId;
117   }
118 
119   public void setDocId(UUID docId) {
120     this.docId = docId;
121   }
122 
123   /**
124    * Timestamp when processing was cancelled.
125    **/
126   public CancelledStatusResponse cancelledAt(Date cancelledAt) {
127     this.cancelledAt = cancelledAt;
128     return this;
129   }
130 
131   @ApiModelProperty(example = "2025-10-10T14:45Z", required = true, value = "Timestamp when processing was cancelled.")
132   @JsonProperty("cancelled_at")
133   public Date getCancelledAt() {
134     return cancelledAt;
135   }
136 
137   public void setCancelledAt(Date cancelledAt) {
138     this.cancelledAt = cancelledAt;
139   }
140 
141   /**
142    * Which phase was cancelled.
143    **/
144   public CancelledStatusResponse cancelledDuring(CancelledDuringEnum cancelledDuring) {
145     this.cancelledDuring = cancelledDuring;
146     return this;
147   }
148 
149   @ApiModelProperty(example = "IMPORTING", value = "Which phase was cancelled.")
150   @JsonProperty("cancelled_during")
151   public CancelledDuringEnum getCancelledDuring() {
152     return cancelledDuring;
153   }
154 
155   public void setCancelledDuring(CancelledDuringEnum cancelledDuring) {
156     this.cancelledDuring = cancelledDuring;
157   }
158 
159   @Override
160   public boolean equals(Object o) {
161     if (this == o) {
162       return true;
163     }
164     if (o == null || getClass() != o.getClass()) {
165       return false;
166     }
167     CancelledStatusResponse cancelledStatusResponse = (CancelledStatusResponse) o;
168     return Objects.equals(status, cancelledStatusResponse.status) &&
169         Objects.equals(docId, cancelledStatusResponse.docId) &&
170         Objects.equals(cancelledAt, cancelledStatusResponse.cancelledAt) &&
171         Objects.equals(cancelledDuring, cancelledStatusResponse.cancelledDuring);
172   }
173 
174   @Override
175   public int hashCode() {
176     return Objects.hash(status, docId, cancelledAt, cancelledDuring);
177   }
178 
179   @Override
180   public String toString() {
181     StringBuilder sb = new StringBuilder();
182     sb.append("class CancelledStatusResponse {\n");
183 
184     sb.append("    status: ").append(toIndentedString(status)).append("\n");
185     sb.append("    docId: ").append(toIndentedString(docId)).append("\n");
186     sb.append("    cancelledAt: ").append(toIndentedString(cancelledAt)).append("\n");
187     sb.append("    cancelledDuring: ").append(toIndentedString(cancelledDuring)).append("\n");
188     sb.append("}");
189     return sb.toString();
190   }
191 
192   /**
193    * Convert the given object to string with each line indented by 4 spaces
194    * (except the first line).
195    */
196   private String toIndentedString(Object o) {
197     if (o == null) {
198       return "null";
199     }
200     return o.toString().replace("\n", "\n    ");
201   }
202 }