1 package com.acumenvelocity.ath.model;
2
3 import java.util.Objects;
4
5 import com.fasterxml.jackson.annotation.JsonCreator;
6 import com.fasterxml.jackson.annotation.JsonProperty;
7 import com.fasterxml.jackson.annotation.JsonValue;
8
9 import io.swagger.annotations.ApiModelProperty;
10
11 @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
12 public class ConflictDownloadResponse {
13 @JsonProperty("error")
14 private String error;
15
16
17
18
19 public enum StatusEnum {
20 IMPORTING("IMPORTING"),
21
22 IMPORT_COMPLETED("IMPORT_COMPLETED"),
23
24 EXPORTING("EXPORTING");
25
26 private String value;
27
28 StatusEnum(String value) {
29 this.value = value;
30 }
31
32 @Override
33 @JsonValue
34 public String toString() {
35 return String.valueOf(value);
36 }
37
38 @JsonCreator
39 public static StatusEnum fromValue(String text) {
40 for (StatusEnum b : StatusEnum.values()) {
41 if (String.valueOf(b.value).equals(text)) {
42 return b;
43 }
44 }
45 throw new IllegalArgumentException("Unexpected value '" + text + "'");
46 }
47 }
48
49 @JsonProperty("status")
50 private StatusEnum status;
51
52 @JsonProperty("message")
53 private String message;
54
55 @JsonProperty("status_url")
56 private String statusUrl;
57
58 @JsonProperty("export_url")
59 private String exportUrl;
60
61
62
63
64 public ConflictDownloadResponse error(String error) {
65 this.error = error;
66 return this;
67 }
68
69 @ApiModelProperty(example = "Document not ready for download", required = true, value = "Error message")
70 @JsonProperty("error")
71 public String getError() {
72 return error;
73 }
74
75 public void setError(String error) {
76 this.error = error;
77 }
78
79
80
81
82 public ConflictDownloadResponse status(StatusEnum status) {
83 this.status = status;
84 return this;
85 }
86
87 @ApiModelProperty(example = "IMPORT_COMPLETED", required = true, value = "Current status of the document")
88 @JsonProperty("status")
89 public StatusEnum getStatus() {
90 return status;
91 }
92
93 public void setStatus(StatusEnum status) {
94 this.status = status;
95 }
96
97
98
99
100 public ConflictDownloadResponse message(String message) {
101 this.message = message;
102 return this;
103 }
104
105 @ApiModelProperty(example = "Call POST /document/{doc_id}/export to generate the translation", required = true, value = "Detailed message about why download is not available")
106 @JsonProperty("message")
107 public String getMessage() {
108 return message;
109 }
110
111 public void setMessage(String message) {
112 this.message = message;
113 }
114
115
116
117
118 public ConflictDownloadResponse statusUrl(String statusUrl) {
119 this.statusUrl = statusUrl;
120 return this;
121 }
122
123 @ApiModelProperty(example = "/document/550e8400-e29b-41d4-a716-446655440000/status", value = "URL to check processing status")
124 @JsonProperty("status_url")
125 public String getStatusUrl() {
126 return statusUrl;
127 }
128
129 public void setStatusUrl(String statusUrl) {
130 this.statusUrl = statusUrl;
131 }
132
133
134
135
136 public ConflictDownloadResponse exportUrl(String exportUrl) {
137 this.exportUrl = exportUrl;
138 return this;
139 }
140
141 @ApiModelProperty(example = "/document/550e8400-e29b-41d4-a716-446655440000/export", value = "URL to trigger export (only present when status is IMPORT_COMPLETED)")
142 @JsonProperty("export_url")
143 public String getExportUrl() {
144 return exportUrl;
145 }
146
147 public void setExportUrl(String exportUrl) {
148 this.exportUrl = exportUrl;
149 }
150
151 @Override
152 public boolean equals(Object o) {
153 if (this == o) {
154 return true;
155 }
156 if (o == null || getClass() != o.getClass()) {
157 return false;
158 }
159 ConflictDownloadResponse conflictDownloadResponse = (ConflictDownloadResponse) o;
160 return Objects.equals(error, conflictDownloadResponse.error) &&
161 Objects.equals(status, conflictDownloadResponse.status) &&
162 Objects.equals(message, conflictDownloadResponse.message) &&
163 Objects.equals(statusUrl, conflictDownloadResponse.statusUrl) &&
164 Objects.equals(exportUrl, conflictDownloadResponse.exportUrl);
165 }
166
167 @Override
168 public int hashCode() {
169 return Objects.hash(error, status, message, statusUrl, exportUrl);
170 }
171
172 @Override
173 public String toString() {
174 StringBuilder sb = new StringBuilder();
175 sb.append("class ConflictDownloadResponse {\n");
176
177 sb.append(" error: ").append(toIndentedString(error)).append("\n");
178 sb.append(" status: ").append(toIndentedString(status)).append("\n");
179 sb.append(" message: ").append(toIndentedString(message)).append("\n");
180 sb.append(" statusUrl: ").append(toIndentedString(statusUrl)).append("\n");
181 sb.append(" exportUrl: ").append(toIndentedString(exportUrl)).append("\n");
182 sb.append("}");
183 return sb.toString();
184 }
185
186
187
188
189
190 private String toIndentedString(Object o) {
191 if (o == null) {
192 return "null";
193 }
194 return o.toString().replace("\n", "\n ");
195 }
196 }