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 ProcessingResponse {
15    /**
16     * Current status of the document
17     */
18    public enum StatusEnum {
19      IMPORTING("IMPORTING"),
20  
21      EXPORTING("EXPORTING");
22  
23      private String value;
24  
25      StatusEnum(String value) {
26        this.value = value;
27      }
28  
29      @Override
30      @JsonValue
31      public String toString() {
32        return String.valueOf(value);
33      }
34  
35      @JsonCreator
36      public static StatusEnum fromValue(String text) {
37        for (StatusEnum b : StatusEnum.values()) {
38          if (String.valueOf(b.value).equals(text)) {
39            return b;
40          }
41        }
42        throw new IllegalArgumentException("Unexpected value '" + text + "'");
43      }
44    }
45  
46    @JsonProperty("status")
47    private StatusEnum status;
48  
49    @JsonProperty("doc_id")
50    private UUID docId;
51  
52    @JsonProperty("status_url")
53    private String statusUrl;
54  
55    @JsonProperty("submitted_at")
56    private Date submittedAt;
57  
58    /**
59     * Current status of the document
60     **/
61    public ProcessingResponse status(StatusEnum status) {
62      this.status = status;
63      return this;
64    }
65  
66    @ApiModelProperty(example = "IMPORTING", required = true, value = "Current status of the document")
67    @JsonProperty("status")
68    public StatusEnum getStatus() {
69      return status;
70    }
71  
72    public void setStatus(StatusEnum status) {
73      this.status = status;
74    }
75  
76    /**
77     * Unique identifier of the document
78     **/
79    public ProcessingResponse docId(UUID docId) {
80      this.docId = docId;
81      return this;
82    }
83  
84    @ApiModelProperty(required = true, value = "Unique identifier of the document")
85    @JsonProperty("doc_id")
86    public UUID getDocId() {
87      return docId;
88    }
89  
90    public void setDocId(UUID docId) {
91      this.docId = docId;
92    }
93  
94    /**
95     * URL to check processing status
96     **/
97    public ProcessingResponse statusUrl(String statusUrl) {
98      this.statusUrl = statusUrl;
99      return this;
100   }
101 
102   @ApiModelProperty(example = "/document/550e8400-e29b-41d4-a716-446655440000/status", required = true, value = "URL to check processing status")
103   @JsonProperty("status_url")
104   public String getStatusUrl() {
105     return statusUrl;
106   }
107 
108   public void setStatusUrl(String statusUrl) {
109     this.statusUrl = statusUrl;
110   }
111 
112   /**
113    * Timestamp when processing was initiated
114    **/
115   public ProcessingResponse submittedAt(Date submittedAt) {
116     this.submittedAt = submittedAt;
117     return this;
118   }
119 
120   @ApiModelProperty(example = "2025-10-10T14:00Z", value = "Timestamp when processing was initiated")
121   @JsonProperty("submitted_at")
122   public Date getSubmittedAt() {
123     return submittedAt;
124   }
125 
126   public void setSubmittedAt(Date submittedAt) {
127     this.submittedAt = submittedAt;
128   }
129 
130   @Override
131   public boolean equals(Object o) {
132     if (this == o) {
133       return true;
134     }
135     if (o == null || getClass() != o.getClass()) {
136       return false;
137     }
138     ProcessingResponse processingResponse = (ProcessingResponse) o;
139     return Objects.equals(status, processingResponse.status) &&
140         Objects.equals(docId, processingResponse.docId) &&
141         Objects.equals(statusUrl, processingResponse.statusUrl) &&
142         Objects.equals(submittedAt, processingResponse.submittedAt);
143   }
144 
145   @Override
146   public int hashCode() {
147     return Objects.hash(status, docId, statusUrl, submittedAt);
148   }
149 
150   @Override
151   public String toString() {
152     StringBuilder sb = new StringBuilder();
153     sb.append("class ProcessingResponse {\n");
154 
155     sb.append("    status: ").append(toIndentedString(status)).append("\n");
156     sb.append("    docId: ").append(toIndentedString(docId)).append("\n");
157     sb.append("    statusUrl: ").append(toIndentedString(statusUrl)).append("\n");
158     sb.append("    submittedAt: ").append(toIndentedString(submittedAt)).append("\n");
159     sb.append("}");
160     return sb.toString();
161   }
162 
163   /**
164    * Convert the given object to string with each line indented by 4 spaces
165    * (except the first line).
166    */
167   private String toIndentedString(Object o) {
168     if (o == null) {
169       return "null";
170     }
171     return o.toString().replace("\n", "\n    ");
172   }
173 }