View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.List;
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 ImportDocumentRequest {
13    @JsonProperty("src_lang")
14    private String srcLang = "en";
15  
16    @JsonProperty("trg_lang")
17    private String trgLang = "fr";
18  
19    @JsonProperty("filter_id")
20    private String filterId = "";
21  
22    @JsonProperty("filter_params")
23    private String filterParams = "";
24  
25    @JsonProperty("src_srx")
26    private String srcSrx = "";
27  
28    @JsonProperty("tm_id")
29    private UUID tmId;
30  
31    @JsonProperty("tm_threshold")
32    private Integer tmThreshold = 75;
33  
34    @JsonProperty("mt_engine_id")
35    private String mtEngineId = "GoogleMTv3";
36  
37    @JsonProperty("mt_engine_params")
38    private String mtEngineParams = "";
39  
40    @JsonProperty("mt_custom_resources")
41    private List<MtResources> mtCustomResources = null;
42  
43    @JsonProperty("mt_use_translate_llm")
44    private Boolean mtUseTranslateLlm = false;
45  
46    @JsonProperty("mt_send_plain_text")
47    private Boolean mtSendPlainText = false;
48  
49    @JsonProperty("mt_provide_confidence_scores")
50    private Boolean mtProvideConfidenceScores = false;
51  
52    @JsonProperty("use_codes_reinsertion_model")
53    private Boolean useCodesReinsertionModel = false;
54  
55    @JsonProperty("codes_reinsertion_model_name")
56    private String codesReinsertionModelName = "gemini-2.5-flash";
57  
58    @JsonProperty("user_id")
59    private UUID userId;
60  
61    /**
62     * Source language ISO code.
63     **/
64    public ImportDocumentRequest srcLang(String srcLang) {
65      this.srcLang = srcLang;
66      return this;
67    }
68  
69    @ApiModelProperty(required = true, value = "Source language ISO code.")
70    @JsonProperty("src_lang")
71    public String getSrcLang() {
72      return srcLang;
73    }
74  
75    public void setSrcLang(String srcLang) {
76      this.srcLang = srcLang;
77    }
78  
79    /**
80     * Target language ISO code.
81     **/
82    public ImportDocumentRequest trgLang(String trgLang) {
83      this.trgLang = trgLang;
84      return this;
85    }
86  
87    @ApiModelProperty(required = true, value = "Target language ISO code.")
88    @JsonProperty("trg_lang")
89    public String getTrgLang() {
90      return trgLang;
91    }
92  
93    public void setTrgLang(String trgLang) {
94      this.trgLang = trgLang;
95    }
96  
97    /**
98     * Filter configuration ID to use for document import.
99     **/
100   public ImportDocumentRequest filterId(String filterId) {
101     this.filterId = filterId;
102     return this;
103   }
104 
105   @ApiModelProperty(value = "Filter configuration ID to use for document import.")
106   @JsonProperty("filter_id")
107   public String getFilterId() {
108     return filterId;
109   }
110 
111   public void setFilterId(String filterId) {
112     this.filterId = filterId;
113   }
114 
115   /**
116    * Optional string with filter configuration parameters, filter defaults are used if omitted.
117    **/
118   public ImportDocumentRequest filterParams(String filterParams) {
119     this.filterParams = filterParams;
120     return this;
121   }
122 
123   @ApiModelProperty(value = "Optional string with filter configuration parameters, filter defaults are used  if omitted.")
124   @JsonProperty("filter_params")
125   public String getFilterParams() {
126     return filterParams;
127   }
128 
129   public void setFilterParams(String filterParams) {
130     this.filterParams = filterParams;
131   }
132 
133   /**
134    * Optional SRX string for source segmentation.
135    **/
136   public ImportDocumentRequest srcSrx(String srcSrx) {
137     this.srcSrx = srcSrx;
138     return this;
139   }
140 
141   @ApiModelProperty(value = "Optional SRX string for source segmentation.")
142   @JsonProperty("src_srx")
143   public String getSrcSrx() {
144     return srcSrx;
145   }
146 
147   public void setSrcSrx(String srcSrx) {
148     this.srcSrx = srcSrx;
149   }
150 
151   /**
152    * Translation memory ID.
153    **/
154   public ImportDocumentRequest tmId(UUID tmId) {
155     this.tmId = tmId;
156     return this;
157   }
158 
159   @ApiModelProperty(value = "Translation memory ID.")
160   @JsonProperty("tm_id")
161   public UUID getTmId() {
162     return tmId;
163   }
164 
165   public void setTmId(UUID tmId) {
166     this.tmId = tmId;
167   }
168 
169   /**
170    * Translation memory threshold percentage (0-101, where 100 means exact, 101 in-context exact
171    * match).
172    * minimum: 0
173    * maximum: 101
174    **/
175   public ImportDocumentRequest tmThreshold(Integer tmThreshold) {
176     this.tmThreshold = tmThreshold;
177     return this;
178   }
179 
180   @ApiModelProperty(value = "Translation memory threshold percentage (0-101, where 100 means exact,  101 in-context exact match).")
181   @JsonProperty("tm_threshold")
182   public Integer getTmThreshold() {
183     return tmThreshold;
184   }
185 
186   public void setTmThreshold(Integer tmThreshold) {
187     this.tmThreshold = tmThreshold;
188   }
189 
190   /**
191    * Optional name of the MT engine if MT is used.
192    **/
193   public ImportDocumentRequest mtEngineId(String mtEngineId) {
194     this.mtEngineId = mtEngineId;
195     return this;
196   }
197 
198   @ApiModelProperty(value = "Optional name of the MT engine if MT is used.")
199   @JsonProperty("mt_engine_id")
200   public String getMtEngineId() {
201     return mtEngineId;
202   }
203 
204   public void setMtEngineId(String mtEngineId) {
205     this.mtEngineId = mtEngineId;
206   }
207 
208   /**
209    * Optional parameters of the MT engine if MT is used (API key, model name etc. in the format the
210    * MT engine expects).
211    **/
212   public ImportDocumentRequest mtEngineParams(String mtEngineParams) {
213     this.mtEngineParams = mtEngineParams;
214     return this;
215   }
216 
217   @ApiModelProperty(value = "Optional parameters of the MT engine if MT is used (API key, model name etc.  in the format the MT engine expects).")
218   @JsonProperty("mt_engine_params")
219   public String getMtEngineParams() {
220     return mtEngineParams;
221   }
222 
223   public void setMtEngineParams(String mtEngineParams) {
224     this.mtEngineParams = mtEngineParams;
225   }
226 
227   /**
228    * Array of MT resources (glossary + custom model) objects. Some MT resources are hardcoded in the
229    * controller, this array contains additional resources like client glossaries and models.
230    **/
231   public ImportDocumentRequest mtCustomResources(List<MtResources> mtCustomResources) {
232     this.mtCustomResources = mtCustomResources;
233     return this;
234   }
235 
236   @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.")
237   @JsonProperty("mt_custom_resources")
238   public List<MtResources> getMtCustomResources() {
239     return mtCustomResources;
240   }
241 
242   public void setMtCustomResources(List<MtResources> mtCustomResources) {
243     this.mtCustomResources = mtCustomResources;
244   }
245 
246   /**
247    * True to use Google Translate LLM instead of NMT when confidence scores are not calculated
248    * (`mt_provide_confidence_scores` is false).
249    **/
250   public ImportDocumentRequest mtUseTranslateLlm(Boolean mtUseTranslateLlm) {
251     this.mtUseTranslateLlm = mtUseTranslateLlm;
252     return this;
253   }
254 
255   @ApiModelProperty(value = "True to use Google Translate LLM instead of NMT when confidence scores  are not calculated (`mt_provide_confidence_scores` is false).")
256   @JsonProperty("mt_use_translate_llm")
257   public Boolean getMtUseTranslateLlm() {
258     return mtUseTranslateLlm;
259   }
260 
261   public void setMtUseTranslateLlm(Boolean mtUseTranslateLlm) {
262     this.mtUseTranslateLlm = mtUseTranslateLlm;
263   }
264 
265   /**
266    * True to remove inline codes from the souce text before sending it for MT. Some models
267    * hallucinate when a text flow is interrupted with codes and cannot provide a high quality
268    * translation.
269    **/
270   public ImportDocumentRequest mtSendPlainText(Boolean mtSendPlainText) {
271     this.mtSendPlainText = mtSendPlainText;
272     return this;
273   }
274 
275   @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.")
276   @JsonProperty("mt_send_plain_text")
277   public Boolean getMtSendPlainText() {
278     return mtSendPlainText;
279   }
280 
281   public void setMtSendPlainText(Boolean mtSendPlainText) {
282     this.mtSendPlainText = mtSendPlainText;
283   }
284 
285   /**
286    * True to provide several translations, each by a separate MT service, then calculate confidence
287    * scores for them. If GCT v3 (`GoogleMTv3`) is specified in `mt_engine_id` and the flag set to
288    * true, then the following models are inferenced in parallel: Goodle Cloud Translation v3 NMT,
289    * Translation LLM, and all the AutoML models specified in `mt_custom_resources`. If set to false,
290    * only one translation is generated by the MT engine specified in `mt_engine_id`, and the
291    * confidence score is 0.
292    **/
293   public ImportDocumentRequest mtProvideConfidenceScores(Boolean mtProvideConfidenceScores) {
294     this.mtProvideConfidenceScores = mtProvideConfidenceScores;
295     return this;
296   }
297 
298   @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.")
299   @JsonProperty("mt_provide_confidence_scores")
300   public Boolean getMtProvideConfidenceScores() {
301     return mtProvideConfidenceScores;
302   }
303 
304   public void setMtProvideConfidenceScores(Boolean mtProvideConfidenceScores) {
305     this.mtProvideConfidenceScores = mtProvideConfidenceScores;
306   }
307 
308   /**
309    * True to use LLM-based target codes reinsertion, false to have Okapi reinsert. This option has
310    * effect only when plainTextMT is true.
311    **/
312   public ImportDocumentRequest useCodesReinsertionModel(Boolean useCodesReinsertionModel) {
313     this.useCodesReinsertionModel = useCodesReinsertionModel;
314     return this;
315   }
316 
317   @ApiModelProperty(value = "True to use LLM-based target codes reinsertion, false to have Okapi reinsert. This option has effect only when plainTextMT is true.")
318   @JsonProperty("use_codes_reinsertion_model")
319   public Boolean getUseCodesReinsertionModel() {
320     return useCodesReinsertionModel;
321   }
322 
323   public void setUseCodesReinsertionModel(Boolean useCodesReinsertionModel) {
324     this.useCodesReinsertionModel = useCodesReinsertionModel;
325   }
326 
327   /**
328    * Gemini AI model name to use for target codes reinsertion.
329    **/
330   public ImportDocumentRequest codesReinsertionModelName(String codesReinsertionModelName) {
331     this.codesReinsertionModelName = codesReinsertionModelName;
332     return this;
333   }
334 
335   @ApiModelProperty(value = "Gemini AI model name to use for target codes reinsertion.")
336   @JsonProperty("codes_reinsertion_model_name")
337   public String getCodesReinsertionModelName() {
338     return codesReinsertionModelName;
339   }
340 
341   public void setCodesReinsertionModelName(String codesReinsertionModelName) {
342     this.codesReinsertionModelName = codesReinsertionModelName;
343   }
344 
345   /**
346    * UUID of the user importing the document.
347    **/
348   public ImportDocumentRequest userId(UUID userId) {
349     this.userId = userId;
350     return this;
351   }
352 
353   @ApiModelProperty(required = true, value = "UUID of the user importing the document.")
354   @JsonProperty("user_id")
355   public UUID getUserId() {
356     return userId;
357   }
358 
359   public void setUserId(UUID userId) {
360     this.userId = userId;
361   }
362 
363   @Override
364   public boolean equals(Object o) {
365     if (this == o) {
366       return true;
367     }
368     if (o == null || getClass() != o.getClass()) {
369       return false;
370     }
371     ImportDocumentRequest importDocumentRequest = (ImportDocumentRequest) o;
372     return Objects.equals(srcLang, importDocumentRequest.srcLang) &&
373         Objects.equals(trgLang, importDocumentRequest.trgLang) &&
374         Objects.equals(filterId, importDocumentRequest.filterId) &&
375         Objects.equals(filterParams, importDocumentRequest.filterParams) &&
376         Objects.equals(srcSrx, importDocumentRequest.srcSrx) &&
377         Objects.equals(tmId, importDocumentRequest.tmId) &&
378         Objects.equals(tmThreshold, importDocumentRequest.tmThreshold) &&
379         Objects.equals(mtEngineId, importDocumentRequest.mtEngineId) &&
380         Objects.equals(mtEngineParams, importDocumentRequest.mtEngineParams) &&
381         Objects.equals(mtCustomResources, importDocumentRequest.mtCustomResources) &&
382         Objects.equals(mtUseTranslateLlm, importDocumentRequest.mtUseTranslateLlm) &&
383         Objects.equals(mtSendPlainText, importDocumentRequest.mtSendPlainText) &&
384         Objects.equals(mtProvideConfidenceScores, importDocumentRequest.mtProvideConfidenceScores)
385         &&
386         Objects.equals(useCodesReinsertionModel, importDocumentRequest.useCodesReinsertionModel) &&
387         Objects.equals(codesReinsertionModelName, importDocumentRequest.codesReinsertionModelName)
388         &&
389         Objects.equals(userId, importDocumentRequest.userId);
390   }
391 
392   @Override
393   public int hashCode() {
394     return Objects.hash(srcLang, trgLang, filterId, filterParams, srcSrx, tmId, tmThreshold,
395         mtEngineId, mtEngineParams, mtCustomResources, mtUseTranslateLlm, mtSendPlainText,
396         mtProvideConfidenceScores, useCodesReinsertionModel, codesReinsertionModelName, userId);
397   }
398 
399   @Override
400   public String toString() {
401     StringBuilder sb = new StringBuilder();
402     sb.append("class ImportDocumentRequest {\n");
403 
404     sb.append("    srcLang: ").append(toIndentedString(srcLang)).append("\n");
405     sb.append("    trgLang: ").append(toIndentedString(trgLang)).append("\n");
406     sb.append("    filterId: ").append(toIndentedString(filterId)).append("\n");
407     sb.append("    filterParams: ").append(toIndentedString(filterParams)).append("\n");
408     sb.append("    srcSrx: ").append(toIndentedString(srcSrx)).append("\n");
409     sb.append("    tmId: ").append(toIndentedString(tmId)).append("\n");
410     sb.append("    tmThreshold: ").append(toIndentedString(tmThreshold)).append("\n");
411     sb.append("    mtEngineId: ").append(toIndentedString(mtEngineId)).append("\n");
412     sb.append("    mtEngineParams: ").append(toIndentedString(mtEngineParams)).append("\n");
413     sb.append("    mtCustomResources: ").append(toIndentedString(mtCustomResources)).append("\n");
414     sb.append("    mtUseTranslateLlm: ").append(toIndentedString(mtUseTranslateLlm)).append("\n");
415     sb.append("    mtSendPlainText: ").append(toIndentedString(mtSendPlainText)).append("\n");
416     sb.append("    mtProvideConfidenceScores: ").append(toIndentedString(mtProvideConfidenceScores))
417         .append("\n");
418     sb.append("    useCodesReinsertionModel: ").append(toIndentedString(useCodesReinsertionModel))
419         .append("\n");
420     sb.append("    codesReinsertionModelName: ").append(toIndentedString(codesReinsertionModelName))
421         .append("\n");
422     sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
423     sb.append("}");
424     return sb.toString();
425   }
426 
427   /**
428    * Convert the given object to string with each line indented by 4 spaces
429    * (except the first line).
430    */
431   private String toIndentedString(Object o) {
432     if (o == null) {
433       return "null";
434     }
435     return o.toString().replace("\n", "\n    ");
436   }
437 }