View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.net.URI;
4   import java.util.Objects;
5   import java.util.UUID;
6   
7   import com.fasterxml.jackson.annotation.JsonProperty;
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 ExportDocumentRequest {
13    @JsonProperty("doc_out_gcs_url")
14    private URI docOutGcsUrl = URI.create("");
15  
16    @JsonProperty("doc_out_encoding")
17    private String docOutEncoding = "";
18  
19    @JsonProperty("tm_id")
20    private UUID tmId;
21  
22    @JsonProperty("user_id")
23    private UUID userId;
24  
25    /**
26     * GCS URL (gs://bucket/blob) to store the translated document contents at.
27     **/
28    public ExportDocumentRequest docOutGcsUrl(URI docOutGcsUrl) {
29      this.docOutGcsUrl = docOutGcsUrl;
30      return this;
31    }
32  
33    @ApiModelProperty(required = true, value = "GCS URL (gs://bucket/blob) to store the translated document contents at.")
34    @JsonProperty("doc_out_gcs_url")
35    public URI getDocOutGcsUrl() {
36      return docOutGcsUrl;
37    }
38  
39    public void setDocOutGcsUrl(URI docOutGcsUrl) {
40      this.docOutGcsUrl = docOutGcsUrl;
41    }
42  
43    /**
44     * Optional translated document encoding. If omitted, the original document's encoding will be
45     * used.
46     **/
47    public ExportDocumentRequest docOutEncoding(String docOutEncoding) {
48      this.docOutEncoding = docOutEncoding;
49      return this;
50    }
51  
52    @ApiModelProperty(value = "Optional translated document encoding. If omitted, the original document's  encoding will be used.")
53    @JsonProperty("doc_out_encoding")
54    public String getDocOutEncoding() {
55      return docOutEncoding;
56    }
57  
58    public void setDocOutEncoding(String docOutEncoding) {
59      this.docOutEncoding = docOutEncoding;
60    }
61  
62    /**
63     * Optional translation memory ID to update with the translated document segments.
64     **/
65    public ExportDocumentRequest tmId(UUID tmId) {
66      this.tmId = tmId;
67      return this;
68    }
69  
70    @ApiModelProperty(value = "Optional translation memory ID to update with the translated document segments.")
71    @JsonProperty("tm_id")
72    public UUID getTmId() {
73      return tmId;
74    }
75  
76    public void setTmId(UUID tmId) {
77      this.tmId = tmId;
78    }
79  
80    /**
81     * UUID of the user exporting the document.
82     **/
83    public ExportDocumentRequest userId(UUID userId) {
84      this.userId = userId;
85      return this;
86    }
87  
88    @ApiModelProperty(required = true, value = "UUID of the user exporting the document.")
89    @JsonProperty("user_id")
90    public UUID getUserId() {
91      return userId;
92    }
93  
94    public void setUserId(UUID userId) {
95      this.userId = userId;
96    }
97  
98    @Override
99    public boolean equals(Object o) {
100     if (this == o) {
101       return true;
102     }
103     if (o == null || getClass() != o.getClass()) {
104       return false;
105     }
106     ExportDocumentRequest exportDocumentRequest = (ExportDocumentRequest) o;
107     return Objects.equals(docOutGcsUrl, exportDocumentRequest.docOutGcsUrl) &&
108         Objects.equals(docOutEncoding, exportDocumentRequest.docOutEncoding) &&
109         Objects.equals(tmId, exportDocumentRequest.tmId) &&
110         Objects.equals(userId, exportDocumentRequest.userId);
111   }
112 
113   @Override
114   public int hashCode() {
115     return Objects.hash(docOutGcsUrl, docOutEncoding, tmId, userId);
116   }
117 
118   @Override
119   public String toString() {
120     StringBuilder sb = new StringBuilder();
121     sb.append("class ExportDocumentRequest {\n");
122 
123     sb.append("    docOutGcsUrl: ").append(toIndentedString(docOutGcsUrl)).append("\n");
124     sb.append("    docOutEncoding: ").append(toIndentedString(docOutEncoding)).append("\n");
125     sb.append("    tmId: ").append(toIndentedString(tmId)).append("\n");
126     sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
127     sb.append("}");
128     return sb.toString();
129   }
130 
131   /**
132    * Convert the given object to string with each line indented by 4 spaces
133    * (except the first line).
134    */
135   private String toIndentedString(Object o) {
136     if (o == null) {
137       return "null";
138     }
139     return o.toString().replace("\n", "\n    ");
140   }
141 }