View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.net.URI;
4   import java.util.List;
5   import java.util.Objects;
6   import java.util.UUID;
7   
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   
10  import io.swagger.annotations.ApiModelProperty;
11  
12  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
13  public class ProcessDocumentRequest {
14    @JsonProperty("doc_gcs_url")
15    private URI docGcsUrl;
16  
17    @JsonProperty("doc_out_gcs_url")
18    private URI docOutGcsUrl;
19  
20    @JsonProperty("doc_file_name")
21    private String docFileName;
22  
23    @JsonProperty("src_lang")
24    private String srcLang = "en";
25  
26    @JsonProperty("trg_lang")
27    private String trgLang = "fr";
28  
29    @JsonProperty("doc_encoding")
30    private String docEncoding = "";
31  
32    @JsonProperty("doc_out_encoding")
33    private String docOutEncoding = "";
34  
35    @JsonProperty("filter_id")
36    private String filterId = "";
37  
38    @JsonProperty("filter_params")
39    private String filterParams = "";
40  
41    @JsonProperty("src_srx")
42    private String srcSrx = "";
43  
44    @JsonProperty("tm_id")
45    private UUID tmId;
46  
47    @JsonProperty("tm_threshold")
48    private Integer tmThreshold = 75;
49  
50    @JsonProperty("mt_engine_id")
51    private String mtEngineId = "GoogleMTv3";
52  
53    @JsonProperty("mt_engine_params")
54    private String mtEngineParams = "";
55  
56    @JsonProperty("mt_custom_resources")
57    private List<MtResources> mtCustomResources = null;
58  
59    @JsonProperty("mt_use_translate_llm")
60    private Boolean mtUseTranslateLlm = false;
61  
62    @JsonProperty("mt_send_plain_text")
63    private Boolean mtSendPlainText = true;
64  
65    @JsonProperty("mt_provide_confidence_scores")
66    private Boolean mtProvideConfidenceScores = false;
67  
68    @JsonProperty("use_codes_reinsertion_model")
69    private Boolean useCodesReinsertionModel = false;
70  
71    @JsonProperty("codes_reinsertion_model_name")
72    private String codesReinsertionModelName = "gemini-2.5-flash";
73  
74    @JsonProperty("adjust_target_pages")
75    private Boolean adjustTargetPages = true;
76  
77    @JsonProperty("user_id")
78    private UUID userId;
79  
80    /**
81     * GCS URL (gs://...) of the source document to process.
82     **/
83    public ProcessDocumentRequest docGcsUrl(URI docGcsUrl) {
84      this.docGcsUrl = docGcsUrl;
85      return this;
86    }
87  
88    @ApiModelProperty(required = true, value = "GCS URL (gs://...) of the source document to process.")
89    @JsonProperty("doc_gcs_url")
90    public URI getDocGcsUrl() {
91      return docGcsUrl;
92    }
93  
94    public void setDocGcsUrl(URI docGcsUrl) {
95      this.docGcsUrl = docGcsUrl;
96    }
97  
98    /**
99     * GCS URL (gs://...) where the translated document will be written.
100    **/
101   public ProcessDocumentRequest docOutGcsUrl(URI docOutGcsUrl) {
102     this.docOutGcsUrl = docOutGcsUrl;
103     return this;
104   }
105 
106   @ApiModelProperty(required = true, value = "GCS URL (gs://...) where the translated document will be written.")
107   @JsonProperty("doc_out_gcs_url")
108   public URI getDocOutGcsUrl() {
109     return docOutGcsUrl;
110   }
111 
112   public void setDocOutGcsUrl(URI docOutGcsUrl) {
113     this.docOutGcsUrl = docOutGcsUrl;
114   }
115 
116   /**
117    * Original filename (used for filter detection and metadata).
118    **/
119   public ProcessDocumentRequest docFileName(String docFileName) {
120     this.docFileName = docFileName;
121     return this;
122   }
123 
124   @ApiModelProperty(required = true, value = "Original filename (used for filter detection and metadata).")
125   @JsonProperty("doc_file_name")
126   public String getDocFileName() {
127     return docFileName;
128   }
129 
130   public void setDocFileName(String docFileName) {
131     this.docFileName = docFileName;
132   }
133 
134   /**
135    * Source language ISO code.
136    **/
137   public ProcessDocumentRequest srcLang(String srcLang) {
138     this.srcLang = srcLang;
139     return this;
140   }
141 
142   @ApiModelProperty(required = true, value = "Source language ISO code.")
143   @JsonProperty("src_lang")
144   public String getSrcLang() {
145     return srcLang;
146   }
147 
148   public void setSrcLang(String srcLang) {
149     this.srcLang = srcLang;
150   }
151 
152   /**
153    * Target language ISO code.
154    **/
155   public ProcessDocumentRequest trgLang(String trgLang) {
156     this.trgLang = trgLang;
157     return this;
158   }
159 
160   @ApiModelProperty(required = true, value = "Target language ISO code.")
161   @JsonProperty("trg_lang")
162   public String getTrgLang() {
163     return trgLang;
164   }
165 
166   public void setTrgLang(String trgLang) {
167     this.trgLang = trgLang;
168   }
169 
170   /**
171    * Source document encoding (if known). If omitted, auto-detected.
172    **/
173   public ProcessDocumentRequest docEncoding(String docEncoding) {
174     this.docEncoding = docEncoding;
175     return this;
176   }
177 
178   @ApiModelProperty(value = "Source document encoding (if known). If omitted, auto-detected.")
179   @JsonProperty("doc_encoding")
180   public String getDocEncoding() {
181     return docEncoding;
182   }
183 
184   public void setDocEncoding(String docEncoding) {
185     this.docEncoding = docEncoding;
186   }
187 
188   /**
189    * Desired output encoding. If omitted, uses source encoding.
190    **/
191   public ProcessDocumentRequest docOutEncoding(String docOutEncoding) {
192     this.docOutEncoding = docOutEncoding;
193     return this;
194   }
195 
196   @ApiModelProperty(value = "Desired output encoding. If omitted, uses source encoding.")
197   @JsonProperty("doc_out_encoding")
198   public String getDocOutEncoding() {
199     return docOutEncoding;
200   }
201 
202   public void setDocOutEncoding(String docOutEncoding) {
203     this.docOutEncoding = docOutEncoding;
204   }
205 
206   /**
207    * Filter configuration ID to use for document import.
208    **/
209   public ProcessDocumentRequest filterId(String filterId) {
210     this.filterId = filterId;
211     return this;
212   }
213 
214   @ApiModelProperty(value = "Filter configuration ID to use for document import.")
215   @JsonProperty("filter_id")
216   public String getFilterId() {
217     return filterId;
218   }
219 
220   public void setFilterId(String filterId) {
221     this.filterId = filterId;
222   }
223 
224   /**
225    * Optional string with filter configuration parameters, filter defaults are used if omitted.
226    **/
227   public ProcessDocumentRequest filterParams(String filterParams) {
228     this.filterParams = filterParams;
229     return this;
230   }
231 
232   @ApiModelProperty(value = "Optional string with filter configuration parameters, filter defaults are used  if omitted.")
233   @JsonProperty("filter_params")
234   public String getFilterParams() {
235     return filterParams;
236   }
237 
238   public void setFilterParams(String filterParams) {
239     this.filterParams = filterParams;
240   }
241 
242   /**
243    * Optional SRX string for source segmentation.
244    **/
245   public ProcessDocumentRequest srcSrx(String srcSrx) {
246     this.srcSrx = srcSrx;
247     return this;
248   }
249 
250   @ApiModelProperty(value = "Optional SRX string for source segmentation.")
251   @JsonProperty("src_srx")
252   public String getSrcSrx() {
253     return srcSrx;
254   }
255 
256   public void setSrcSrx(String srcSrx) {
257     this.srcSrx = srcSrx;
258   }
259 
260   /**
261    * Translation memory ID.
262    **/
263   public ProcessDocumentRequest tmId(UUID tmId) {
264     this.tmId = tmId;
265     return this;
266   }
267 
268   @ApiModelProperty(value = "Translation memory ID.")
269   @JsonProperty("tm_id")
270   public UUID getTmId() {
271     return tmId;
272   }
273 
274   public void setTmId(UUID tmId) {
275     this.tmId = tmId;
276   }
277 
278   /**
279    * Translation memory threshold percentage (0-101, where 100 means exact, 101 in-context exact
280    * match).
281    * minimum: 0
282    * maximum: 101
283    **/
284   public ProcessDocumentRequest tmThreshold(Integer tmThreshold) {
285     this.tmThreshold = tmThreshold;
286     return this;
287   }
288 
289   @ApiModelProperty(value = "Translation memory threshold percentage (0-101, where 100 means exact,  101 in-context exact match).")
290   @JsonProperty("tm_threshold")
291   public Integer getTmThreshold() {
292     return tmThreshold;
293   }
294 
295   public void setTmThreshold(Integer tmThreshold) {
296     this.tmThreshold = tmThreshold;
297   }
298 
299   /**
300    * Optional name of the MT engine if MT is used.
301    **/
302   public ProcessDocumentRequest mtEngineId(String mtEngineId) {
303     this.mtEngineId = mtEngineId;
304     return this;
305   }
306 
307   @ApiModelProperty(value = "Optional name of the MT engine if MT is used.")
308   @JsonProperty("mt_engine_id")
309   public String getMtEngineId() {
310     return mtEngineId;
311   }
312 
313   public void setMtEngineId(String mtEngineId) {
314     this.mtEngineId = mtEngineId;
315   }
316 
317   /**
318    * Optional parameters of the MT engine if MT is used (API key, model name etc. in the format the
319    * MT engine expects).
320    **/
321   public ProcessDocumentRequest mtEngineParams(String mtEngineParams) {
322     this.mtEngineParams = mtEngineParams;
323     return this;
324   }
325 
326   @ApiModelProperty(value = "Optional parameters of the MT engine if MT is used (API key, model name etc.  in the format the MT engine expects).")
327   @JsonProperty("mt_engine_params")
328   public String getMtEngineParams() {
329     return mtEngineParams;
330   }
331 
332   public void setMtEngineParams(String mtEngineParams) {
333     this.mtEngineParams = mtEngineParams;
334   }
335 
336   /**
337    * Array of MT resources (glossary + custom model) objects. Some MT resources are hardcoded in the
338    * controller, this array contains additional resources like client glossaries and models.
339    **/
340   public ProcessDocumentRequest mtCustomResources(List<MtResources> mtCustomResources) {
341     this.mtCustomResources = mtCustomResources;
342     return this;
343   }
344 
345   @ApiModelProperty(value = "Array of MT resources (glossary + custom model) objects. Some MT resources are hardcoded in the controller, this array contains additional resources like client glossaries and models.")
346   @JsonProperty("mt_custom_resources")
347   public List<MtResources> getMtCustomResources() {
348     return mtCustomResources;
349   }
350 
351   public void setMtCustomResources(List<MtResources> mtCustomResources) {
352     this.mtCustomResources = mtCustomResources;
353   }
354 
355   /**
356    * True to use Google Translate LLM instead of NMT when confidence scores are not calculated
357    * (`mt_provide_confidence_scores` is false).
358    **/
359   public ProcessDocumentRequest mtUseTranslateLlm(Boolean mtUseTranslateLlm) {
360     this.mtUseTranslateLlm = mtUseTranslateLlm;
361     return this;
362   }
363 
364   @ApiModelProperty(value = "True to use Google Translate LLM instead of NMT when confidence scores  are not calculated (`mt_provide_confidence_scores` is false).")
365   @JsonProperty("mt_use_translate_llm")
366   public Boolean getMtUseTranslateLlm() {
367     return mtUseTranslateLlm;
368   }
369 
370   public void setMtUseTranslateLlm(Boolean mtUseTranslateLlm) {
371     this.mtUseTranslateLlm = mtUseTranslateLlm;
372   }
373 
374   /**
375    * True to remove inline codes from the souce text before sending it for MT. Some models
376    * hallucinate when a text flow is interrupted with codes and cannot provide a high quality
377    * translation.
378    **/
379   public ProcessDocumentRequest mtSendPlainText(Boolean mtSendPlainText) {
380     this.mtSendPlainText = mtSendPlainText;
381     return this;
382   }
383 
384   @ApiModelProperty(value = "True to remove inline codes from the souce text before sending it for MT. Some models hallucinate when a text flow is interrupted with codes and cannot provide a high quality translation.")
385   @JsonProperty("mt_send_plain_text")
386   public Boolean getMtSendPlainText() {
387     return mtSendPlainText;
388   }
389 
390   public void setMtSendPlainText(Boolean mtSendPlainText) {
391     this.mtSendPlainText = mtSendPlainText;
392   }
393 
394   /**
395    * True to provide several translations, each by a separate MT service, then calculate confidence
396    * scores for them. If GCT v3 (`GoogleMTv3`) is specified in `mt_engine_id` and the flag set to
397    * true, then the following models are inferenced in parallel: Goodle Cloud Translation v3 NMT,
398    * Translation LLM, and all the AutoML models specified in `mt_custom_resources`. If set to false,
399    * only one translation is generated by the MT engine specified in `mt_engine_id`, and the
400    * confidence score is 0.
401    **/
402   public ProcessDocumentRequest mtProvideConfidenceScores(Boolean mtProvideConfidenceScores) {
403     this.mtProvideConfidenceScores = mtProvideConfidenceScores;
404     return this;
405   }
406 
407   @ApiModelProperty(value = "True to provide several translations, each by a separate MT service, then  calculate confidence scores for them. If GCT v3 (`GoogleMTv3`) is specified in  `mt_engine_id` and the flag set to true, then the following models are  inferenced in parallel: Goodle Cloud Translation v3 NMT, Translation LLM, and  all the AutoML models specified in `mt_custom_resources`. If set to false, only one translation is generated by the MT engine specified in  `mt_engine_id`, and the confidence score is 0.")
408   @JsonProperty("mt_provide_confidence_scores")
409   public Boolean getMtProvideConfidenceScores() {
410     return mtProvideConfidenceScores;
411   }
412 
413   public void setMtProvideConfidenceScores(Boolean mtProvideConfidenceScores) {
414     this.mtProvideConfidenceScores = mtProvideConfidenceScores;
415   }
416 
417   /**
418    * True to use LLM-based target codes reinsertion, false to have Okapi reinsert. This option has
419    * effect only when plainTextMT is true.
420    **/
421   public ProcessDocumentRequest useCodesReinsertionModel(Boolean useCodesReinsertionModel) {
422     this.useCodesReinsertionModel = useCodesReinsertionModel;
423     return this;
424   }
425 
426   @ApiModelProperty(value = "True to use LLM-based target codes reinsertion, false to have Okapi reinsert. This option has effect only when plainTextMT is true.")
427   @JsonProperty("use_codes_reinsertion_model")
428   public Boolean getUseCodesReinsertionModel() {
429     return useCodesReinsertionModel;
430   }
431 
432   public void setUseCodesReinsertionModel(Boolean useCodesReinsertionModel) {
433     this.useCodesReinsertionModel = useCodesReinsertionModel;
434   }
435 
436   /**
437    * Gemini AI model name to use for target codes reinsertion.
438    **/
439   public ProcessDocumentRequest codesReinsertionModelName(String codesReinsertionModelName) {
440     this.codesReinsertionModelName = codesReinsertionModelName;
441     return this;
442   }
443 
444   @ApiModelProperty(value = "Gemini AI model name to use for target codes reinsertion.")
445   @JsonProperty("codes_reinsertion_model_name")
446   public String getCodesReinsertionModelName() {
447     return codesReinsertionModelName;
448   }
449 
450   public void setCodesReinsertionModelName(String codesReinsertionModelName) {
451     this.codesReinsertionModelName = codesReinsertionModelName;
452   }
453 
454   /**
455    * True to modify font sizes in the PDF translation document to have the page count less or equal
456    * to the page count of the original document. Has no effect for other document formats.
457    **/
458   public ProcessDocumentRequest adjustTargetPages(Boolean adjustTargetPages) {
459     this.adjustTargetPages = adjustTargetPages;
460     return this;
461   }
462 
463   @ApiModelProperty(value = "True to modify font sizes in the PDF 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. ")
464   @JsonProperty("adjust_target_pages")
465   public Boolean getAdjustTargetPages() {
466     return adjustTargetPages;
467   }
468 
469   public void setAdjustTargetPages(Boolean adjustTargetPages) {
470     this.adjustTargetPages = adjustTargetPages;
471   }
472 
473   /**
474    * UUID of the user importing the document.
475    **/
476   public ProcessDocumentRequest userId(UUID userId) {
477     this.userId = userId;
478     return this;
479   }
480 
481   @ApiModelProperty(required = true, value = "UUID of the user importing the document.")
482   @JsonProperty("user_id")
483   public UUID getUserId() {
484     return userId;
485   }
486 
487   public void setUserId(UUID userId) {
488     this.userId = userId;
489   }
490 
491   @Override
492   public boolean equals(Object o) {
493     if (this == o) {
494       return true;
495     }
496     if (o == null || getClass() != o.getClass()) {
497       return false;
498     }
499     ProcessDocumentRequest processDocumentRequest = (ProcessDocumentRequest) o;
500     return Objects.equals(docGcsUrl, processDocumentRequest.docGcsUrl) &&
501         Objects.equals(docOutGcsUrl, processDocumentRequest.docOutGcsUrl) &&
502         Objects.equals(docFileName, processDocumentRequest.docFileName) &&
503         Objects.equals(srcLang, processDocumentRequest.srcLang) &&
504         Objects.equals(trgLang, processDocumentRequest.trgLang) &&
505         Objects.equals(docEncoding, processDocumentRequest.docEncoding) &&
506         Objects.equals(docOutEncoding, processDocumentRequest.docOutEncoding) &&
507         Objects.equals(filterId, processDocumentRequest.filterId) &&
508         Objects.equals(filterParams, processDocumentRequest.filterParams) &&
509         Objects.equals(srcSrx, processDocumentRequest.srcSrx) &&
510         Objects.equals(tmId, processDocumentRequest.tmId) &&
511         Objects.equals(tmThreshold, processDocumentRequest.tmThreshold) &&
512         Objects.equals(mtEngineId, processDocumentRequest.mtEngineId) &&
513         Objects.equals(mtEngineParams, processDocumentRequest.mtEngineParams) &&
514         Objects.equals(mtCustomResources, processDocumentRequest.mtCustomResources) &&
515         Objects.equals(mtUseTranslateLlm, processDocumentRequest.mtUseTranslateLlm) &&
516         Objects.equals(mtSendPlainText, processDocumentRequest.mtSendPlainText) &&
517         Objects.equals(mtProvideConfidenceScores, processDocumentRequest.mtProvideConfidenceScores)
518         &&
519         Objects.equals(useCodesReinsertionModel, processDocumentRequest.useCodesReinsertionModel) &&
520         Objects.equals(codesReinsertionModelName, processDocumentRequest.codesReinsertionModelName)
521         &&
522         Objects.equals(adjustTargetPages, processDocumentRequest.adjustTargetPages) &&
523         Objects.equals(userId, processDocumentRequest.userId);
524   }
525 
526   @Override
527   public int hashCode() {
528     return Objects.hash(docGcsUrl, docOutGcsUrl, docFileName, srcLang, trgLang, docEncoding,
529         docOutEncoding, filterId, filterParams, srcSrx, tmId, tmThreshold, mtEngineId,
530         mtEngineParams, mtCustomResources, mtUseTranslateLlm, mtSendPlainText,
531         mtProvideConfidenceScores, useCodesReinsertionModel, codesReinsertionModelName,
532         adjustTargetPages, userId);
533   }
534 
535   @Override
536   public String toString() {
537     StringBuilder sb = new StringBuilder();
538     sb.append("class ProcessDocumentRequest {\n");
539 
540     sb.append("    docGcsUrl: ").append(toIndentedString(docGcsUrl)).append("\n");
541     sb.append("    docOutGcsUrl: ").append(toIndentedString(docOutGcsUrl)).append("\n");
542     sb.append("    docFileName: ").append(toIndentedString(docFileName)).append("\n");
543     sb.append("    srcLang: ").append(toIndentedString(srcLang)).append("\n");
544     sb.append("    trgLang: ").append(toIndentedString(trgLang)).append("\n");
545     sb.append("    docEncoding: ").append(toIndentedString(docEncoding)).append("\n");
546     sb.append("    docOutEncoding: ").append(toIndentedString(docOutEncoding)).append("\n");
547     sb.append("    filterId: ").append(toIndentedString(filterId)).append("\n");
548     sb.append("    filterParams: ").append(toIndentedString(filterParams)).append("\n");
549     sb.append("    srcSrx: ").append(toIndentedString(srcSrx)).append("\n");
550     sb.append("    tmId: ").append(toIndentedString(tmId)).append("\n");
551     sb.append("    tmThreshold: ").append(toIndentedString(tmThreshold)).append("\n");
552     sb.append("    mtEngineId: ").append(toIndentedString(mtEngineId)).append("\n");
553     sb.append("    mtEngineParams: ").append(toIndentedString(mtEngineParams)).append("\n");
554     sb.append("    mtCustomResources: ").append(toIndentedString(mtCustomResources)).append("\n");
555     sb.append("    mtUseTranslateLlm: ").append(toIndentedString(mtUseTranslateLlm)).append("\n");
556     sb.append("    mtSendPlainText: ").append(toIndentedString(mtSendPlainText)).append("\n");
557     sb.append("    mtProvideConfidenceScores: ").append(toIndentedString(mtProvideConfidenceScores))
558         .append("\n");
559     sb.append("    useCodesReinsertionModel: ").append(toIndentedString(useCodesReinsertionModel))
560         .append("\n");
561     sb.append("    codesReinsertionModelName: ").append(toIndentedString(codesReinsertionModelName))
562         .append("\n");
563     sb.append("    adjustTargetPages: ").append(toIndentedString(adjustTargetPages)).append("\n");
564     sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
565     sb.append("}");
566     return sb.toString();
567   }
568 
569   /**
570    * Convert the given object to string with each line indented by 4 spaces
571    * (except the first line).
572    */
573   private String toIndentedString(Object o) {
574     if (o == null) {
575       return "null";
576     }
577     return o.toString().replace("\n", "\n    ");
578   }
579 }