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("adjust_target_pages")
23    private Boolean adjustTargetPages = true;
24  
25    @JsonProperty("user_id")
26    private UUID userId;
27  
28    /**
29     * GCS URL (gs://bucket/blob) to store the translated document contents at.
30     **/
31    public ExportDocumentRequest docOutGcsUrl(URI docOutGcsUrl) {
32      this.docOutGcsUrl = docOutGcsUrl;
33      return this;
34    }
35  
36    @ApiModelProperty(required = true, value = "GCS URL (gs://bucket/blob) to store the translated document contents at.")
37    @JsonProperty("doc_out_gcs_url")
38    public URI getDocOutGcsUrl() {
39      return docOutGcsUrl;
40    }
41  
42    public void setDocOutGcsUrl(URI docOutGcsUrl) {
43      this.docOutGcsUrl = docOutGcsUrl;
44    }
45  
46    /**
47     * Optional translated document encoding. If omitted, the original document's encoding will be
48     * used.
49     **/
50    public ExportDocumentRequest docOutEncoding(String docOutEncoding) {
51      this.docOutEncoding = docOutEncoding;
52      return this;
53    }
54  
55    @ApiModelProperty(value = "Optional translated document encoding. If omitted, the original document's  encoding will be used.")
56    @JsonProperty("doc_out_encoding")
57    public String getDocOutEncoding() {
58      return docOutEncoding;
59    }
60  
61    public void setDocOutEncoding(String docOutEncoding) {
62      this.docOutEncoding = docOutEncoding;
63    }
64  
65    /**
66     * Optional translation memory ID to update with the translated document segments.
67     **/
68    public ExportDocumentRequest tmId(UUID tmId) {
69      this.tmId = tmId;
70      return this;
71    }
72  
73    @ApiModelProperty(value = "Optional translation memory ID to update with the translated document segments.")
74    @JsonProperty("tm_id")
75    public UUID getTmId() {
76      return tmId;
77    }
78  
79    public void setTmId(UUID tmId) {
80      this.tmId = tmId;
81    }
82  
83    /**
84     * True to modify font sizes in the PDF or DOCX translation document to have the page count less
85     * or equal to the page count of the original document. Has no effect for other document formats.
86     **/
87    public ExportDocumentRequest adjustTargetPages(Boolean adjustTargetPages) {
88      this.adjustTargetPages = adjustTargetPages;
89      return this;
90    }
91  
92    @ApiModelProperty(value = "True to modify font sizes in the PDF or DOCX translation document to have the page count less or equal to the page count of the original document. Has no effect for other document formats. ")
93    @JsonProperty("adjust_target_pages")
94    public Boolean getAdjustTargetPages() {
95      return adjustTargetPages;
96    }
97  
98    public void setAdjustTargetPages(Boolean adjustTargetPages) {
99      this.adjustTargetPages = adjustTargetPages;
100   }
101 
102   /**
103    * UUID of the user exporting the document.
104    **/
105   public ExportDocumentRequest userId(UUID userId) {
106     this.userId = userId;
107     return this;
108   }
109 
110   @ApiModelProperty(required = true, value = "UUID of the user exporting the document.")
111   @JsonProperty("user_id")
112   public UUID getUserId() {
113     return userId;
114   }
115 
116   public void setUserId(UUID userId) {
117     this.userId = userId;
118   }
119 
120   @Override
121   public boolean equals(Object o) {
122     if (this == o) {
123       return true;
124     }
125     if (o == null || getClass() != o.getClass()) {
126       return false;
127     }
128     ExportDocumentRequest exportDocumentRequest = (ExportDocumentRequest) o;
129     return Objects.equals(docOutGcsUrl, exportDocumentRequest.docOutGcsUrl) &&
130         Objects.equals(docOutEncoding, exportDocumentRequest.docOutEncoding) &&
131         Objects.equals(tmId, exportDocumentRequest.tmId) &&
132         Objects.equals(adjustTargetPages, exportDocumentRequest.adjustTargetPages) &&
133         Objects.equals(userId, exportDocumentRequest.userId);
134   }
135 
136   @Override
137   public int hashCode() {
138     return Objects.hash(docOutGcsUrl, docOutEncoding, tmId, adjustTargetPages, userId);
139   }
140 
141   @Override
142   public String toString() {
143     StringBuilder sb = new StringBuilder();
144     sb.append("class ExportDocumentRequest {\n");
145 
146     sb.append("    docOutGcsUrl: ").append(toIndentedString(docOutGcsUrl)).append("\n");
147     sb.append("    docOutEncoding: ").append(toIndentedString(docOutEncoding)).append("\n");
148     sb.append("    tmId: ").append(toIndentedString(tmId)).append("\n");
149     sb.append("    adjustTargetPages: ").append(toIndentedString(adjustTargetPages)).append("\n");
150     sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
151     sb.append("}");
152     return sb.toString();
153   }
154 
155   /**
156    * Convert the given object to string with each line indented by 4 spaces
157    * (except the first line).
158    */
159   private String toIndentedString(Object o) {
160     if (o == null) {
161       return "null";
162     }
163     return o.toString().replace("\n", "\n    ");
164   }
165 }