View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.Objects;
4   import java.util.UUID;
5   
6   import com.fasterxml.jackson.annotation.JsonProperty;
7   
8   import io.swagger.annotations.ApiModelProperty;
9   
10  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
11  public class ConflictResponse {
12    @JsonProperty("error")
13    private String error = "";
14  
15    @JsonProperty("status")
16    private DocumentStatus status;
17  
18    @JsonProperty("doc_id")
19    private UUID docId;
20  
21    @JsonProperty("message")
22    private String message = "";
23  
24    @JsonProperty("status_url")
25    private String statusUrl = "";
26  
27    /**
28     * Error message.
29     **/
30    public ConflictResponse error(String error) {
31      this.error = error;
32      return this;
33    }
34  
35    @ApiModelProperty(example = "Processing already in progress", required = true, value = "Error message.")
36    @JsonProperty("error")
37    public String getError() {
38      return error;
39    }
40  
41    public void setError(String error) {
42      this.error = error;
43    }
44  
45    /**
46     **/
47    public ConflictResponse status(DocumentStatus status) {
48      this.status = status;
49      return this;
50    }
51  
52    @ApiModelProperty(required = true, value = "")
53    @JsonProperty("status")
54    public DocumentStatus getStatus() {
55      return status;
56    }
57  
58    public void setStatus(DocumentStatus status) {
59      this.status = status;
60    }
61  
62    /**
63     * Unique identifier of the document.
64     **/
65    public ConflictResponse docId(UUID docId) {
66      this.docId = docId;
67      return this;
68    }
69  
70    @ApiModelProperty(example = "550e8400-e29b-41d4-a716-446655440000", required = true, value = "Unique identifier of the document.")
71    @JsonProperty("doc_id")
72    public UUID getDocId() {
73      return docId;
74    }
75  
76    public void setDocId(UUID docId) {
77      this.docId = docId;
78    }
79  
80    /**
81     * Detailed message about the conflict.
82     **/
83    public ConflictResponse message(String message) {
84      this.message = message;
85      return this;
86    }
87  
88    @ApiModelProperty(example = "Import must be completed before export can be triggered", value = "Detailed message about the conflict.")
89    @JsonProperty("message")
90    public String getMessage() {
91      return message;
92    }
93  
94    public void setMessage(String message) {
95      this.message = message;
96    }
97  
98    /**
99     * URL to check processing status.
100    **/
101   public ConflictResponse statusUrl(String statusUrl) {
102     this.statusUrl = statusUrl;
103     return this;
104   }
105 
106   @ApiModelProperty(example = "/document/550e8400-e29b-41d4-a716-446655440000/status", value = "URL to check processing status.")
107   @JsonProperty("status_url")
108   public String getStatusUrl() {
109     return statusUrl;
110   }
111 
112   public void setStatusUrl(String statusUrl) {
113     this.statusUrl = statusUrl;
114   }
115 
116   @Override
117   public boolean equals(Object o) {
118     if (this == o) {
119       return true;
120     }
121     if (o == null || getClass() != o.getClass()) {
122       return false;
123     }
124     ConflictResponse conflictResponse = (ConflictResponse) o;
125     return Objects.equals(error, conflictResponse.error) &&
126         Objects.equals(status, conflictResponse.status) &&
127         Objects.equals(docId, conflictResponse.docId) &&
128         Objects.equals(message, conflictResponse.message) &&
129         Objects.equals(statusUrl, conflictResponse.statusUrl);
130   }
131 
132   @Override
133   public int hashCode() {
134     return Objects.hash(error, status, docId, message, statusUrl);
135   }
136 
137   @Override
138   public String toString() {
139     StringBuilder sb = new StringBuilder();
140     sb.append("class ConflictResponse {\n");
141 
142     sb.append("    error: ").append(toIndentedString(error)).append("\n");
143     sb.append("    status: ").append(toIndentedString(status)).append("\n");
144     sb.append("    docId: ").append(toIndentedString(docId)).append("\n");
145     sb.append("    message: ").append(toIndentedString(message)).append("\n");
146     sb.append("    statusUrl: ").append(toIndentedString(statusUrl)).append("\n");
147     sb.append("}");
148     return sb.toString();
149   }
150 
151   /**
152    * Convert the given object to string with each line indented by 4 spaces
153    * (except the first line).
154    */
155   private String toIndentedString(Object o) {
156     if (o == null) {
157       return "null";
158     }
159     return o.toString().replace("\n", "\n    ");
160   }
161 }