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 GetDocumentStatus200Response {
15
16
17
18 public enum StatusEnum {
19 FAILED("FAILED");
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("completed_at")
51 private Date completedAt;
52
53 @JsonProperty("export_url")
54 private String exportUrl;
55
56 @JsonProperty("download_url")
57 private String downloadUrl;
58
59 @JsonProperty("error_message")
60 private String errorMessage;
61
62
63
64
65 public enum ErrorTypeEnum {
66 TIMEOUT("TIMEOUT"),
67
68 INVALID_FORMAT("INVALID_FORMAT"),
69
70 PIPELINE_ERROR("PIPELINE_ERROR"),
71
72 INSUFFICIENT_RESOURCES("INSUFFICIENT_RESOURCES"),
73
74 UNKNOWN_ERROR("UNKNOWN_ERROR");
75
76 private String value;
77
78 ErrorTypeEnum(String value) {
79 this.value = value;
80 }
81
82 @Override
83 @JsonValue
84 public String toString() {
85 return String.valueOf(value);
86 }
87
88 @JsonCreator
89 public static ErrorTypeEnum fromValue(String text) {
90 for (ErrorTypeEnum b : ErrorTypeEnum.values()) {
91 if (String.valueOf(b.value).equals(text)) {
92 return b;
93 }
94 }
95 throw new IllegalArgumentException("Unexpected value '" + text + "'");
96 }
97 }
98
99 @JsonProperty("error_type")
100 private ErrorTypeEnum errorType;
101
102 @JsonProperty("failed_at")
103 private Date failedAt;
104
105
106
107
108 public GetDocumentStatus200Response status(StatusEnum status) {
109 this.status = status;
110 return this;
111 }
112
113 @ApiModelProperty(example = "FAILED", required = true, value = "Document processing failed")
114 @JsonProperty("status")
115 public StatusEnum getStatus() {
116 return status;
117 }
118
119 public void setStatus(StatusEnum status) {
120 this.status = status;
121 }
122
123
124
125
126 public GetDocumentStatus200Response docId(UUID docId) {
127 this.docId = docId;
128 return this;
129 }
130
131 @ApiModelProperty(example = "550e8400-e29b-41d4-a716-446655440000", required = true, value = "Unique identifier of the document")
132 @JsonProperty("doc_id")
133 public UUID getDocId() {
134 return docId;
135 }
136
137 public void setDocId(UUID docId) {
138 this.docId = docId;
139 }
140
141
142
143
144 public GetDocumentStatus200Response completedAt(Date completedAt) {
145 this.completedAt = completedAt;
146 return this;
147 }
148
149 @ApiModelProperty(example = "2025-10-10T15:00Z", required = true, value = "Timestamp when export completed")
150 @JsonProperty("completed_at")
151 public Date getCompletedAt() {
152 return completedAt;
153 }
154
155 public void setCompletedAt(Date completedAt) {
156 this.completedAt = completedAt;
157 }
158
159
160
161
162 public GetDocumentStatus200Response exportUrl(String exportUrl) {
163 this.exportUrl = exportUrl;
164 return this;
165 }
166
167 @ApiModelProperty(example = "/document/550e8400-e29b-41d4-a716-446655440000/export", value = "URL to trigger export generation")
168 @JsonProperty("export_url")
169 public String getExportUrl() {
170 return exportUrl;
171 }
172
173 public void setExportUrl(String exportUrl) {
174 this.exportUrl = exportUrl;
175 }
176
177
178
179
180 public GetDocumentStatus200Response downloadUrl(String downloadUrl) {
181 this.downloadUrl = downloadUrl;
182 return this;
183 }
184
185 @ApiModelProperty(example = "/document/550e8400-e29b-41d4-a716-446655440000", value = "URL to download the translated document")
186 @JsonProperty("download_url")
187 public String getDownloadUrl() {
188 return downloadUrl;
189 }
190
191 public void setDownloadUrl(String downloadUrl) {
192 this.downloadUrl = downloadUrl;
193 }
194
195
196
197
198 public GetDocumentStatus200Response errorMessage(String errorMessage) {
199 this.errorMessage = errorMessage;
200 return this;
201 }
202
203 @ApiModelProperty(example = "Invalid file format", required = true, value = "Error message describing why processing failed")
204 @JsonProperty("error_message")
205 public String getErrorMessage() {
206 return errorMessage;
207 }
208
209 public void setErrorMessage(String errorMessage) {
210 this.errorMessage = errorMessage;
211 }
212
213
214
215
216 public GetDocumentStatus200Response errorType(ErrorTypeEnum errorType) {
217 this.errorType = errorType;
218 return this;
219 }
220
221 @ApiModelProperty(example = "TIMEOUT", required = true, value = "Machine-readable error type")
222 @JsonProperty("error_type")
223 public ErrorTypeEnum getErrorType() {
224 return errorType;
225 }
226
227 public void setErrorType(ErrorTypeEnum errorType) {
228 this.errorType = errorType;
229 }
230
231
232
233
234 public GetDocumentStatus200Response failedAt(Date failedAt) {
235 this.failedAt = failedAt;
236 return this;
237 }
238
239 @ApiModelProperty(example = "2025-10-10T14:30Z", required = true, value = "Timestamp when processing failed")
240 @JsonProperty("failed_at")
241 public Date getFailedAt() {
242 return failedAt;
243 }
244
245 public void setFailedAt(Date failedAt) {
246 this.failedAt = failedAt;
247 }
248
249 @Override
250 public boolean equals(Object o) {
251 if (this == o) {
252 return true;
253 }
254 if (o == null || getClass() != o.getClass()) {
255 return false;
256 }
257 GetDocumentStatus200Response getDocumentStatus200Response = (GetDocumentStatus200Response) o;
258 return Objects.equals(status, getDocumentStatus200Response.status) &&
259 Objects.equals(docId, getDocumentStatus200Response.docId) &&
260 Objects.equals(completedAt, getDocumentStatus200Response.completedAt) &&
261 Objects.equals(exportUrl, getDocumentStatus200Response.exportUrl) &&
262 Objects.equals(downloadUrl, getDocumentStatus200Response.downloadUrl) &&
263 Objects.equals(errorMessage, getDocumentStatus200Response.errorMessage) &&
264 Objects.equals(errorType, getDocumentStatus200Response.errorType) &&
265 Objects.equals(failedAt, getDocumentStatus200Response.failedAt);
266 }
267
268 @Override
269 public int hashCode() {
270 return Objects.hash(status, docId, completedAt, exportUrl, downloadUrl, errorMessage, errorType,
271 failedAt);
272 }
273
274 @Override
275 public String toString() {
276 StringBuilder sb = new StringBuilder();
277 sb.append("class GetDocumentStatus200Response {\n");
278
279 sb.append(" status: ").append(toIndentedString(status)).append("\n");
280 sb.append(" docId: ").append(toIndentedString(docId)).append("\n");
281 sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n");
282 sb.append(" exportUrl: ").append(toIndentedString(exportUrl)).append("\n");
283 sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n");
284 sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
285 sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n");
286 sb.append(" failedAt: ").append(toIndentedString(failedAt)).append("\n");
287 sb.append("}");
288 return sb.toString();
289 }
290
291
292
293
294
295 private String toIndentedString(Object o) {
296 if (o == null) {
297 return "null";
298 }
299 return o.toString().replace("\n", "\n ");
300 }
301 }