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 AlignDocumentRequest {
13 @JsonProperty("src_lang")
14 private String srcLang = "en";
15
16 @JsonProperty("trg_lang")
17 private String trgLang = "fr";
18
19 @JsonProperty("doc_trl_gcs_url")
20 private URI docTrlGcsUrl = URI.create("");
21
22 @JsonProperty("doc_trl_encoding")
23 private String docTrlEncoding = "";
24
25 @JsonProperty("src_srx")
26 private String srcSrx = "";
27
28 @JsonProperty("trg_srx")
29 private String trgSrx = "";
30
31 @JsonProperty("use_alignment_model")
32 private Boolean useAlignmentModel = false;
33
34 @JsonProperty("alignment_model_name")
35 private String alignmentModelName = "gemini-2.5-pro";
36
37 @JsonProperty("use_codes_reinsertion_model")
38 private Boolean useCodesReinsertionModel = false;
39
40 @JsonProperty("codes_reinsertion_model_name")
41 private String codesReinsertionModelName = "gemini-2.5-flash";
42
43 @JsonProperty("user_id")
44 private UUID userId;
45
46
47
48
49 public AlignDocumentRequest srcLang(String srcLang) {
50 this.srcLang = srcLang;
51 return this;
52 }
53
54 @ApiModelProperty(required = true, value = "Source language ISO code.")
55 @JsonProperty("src_lang")
56 public String getSrcLang() {
57 return srcLang;
58 }
59
60 public void setSrcLang(String srcLang) {
61 this.srcLang = srcLang;
62 }
63
64
65
66
67 public AlignDocumentRequest trgLang(String trgLang) {
68 this.trgLang = trgLang;
69 return this;
70 }
71
72 @ApiModelProperty(required = true, value = "Target language ISO code.")
73 @JsonProperty("trg_lang")
74 public String getTrgLang() {
75 return trgLang;
76 }
77
78 public void setTrgLang(String trgLang) {
79 this.trgLang = trgLang;
80 }
81
82
83
84
85
86
87
88
89
90 public AlignDocumentRequest docTrlGcsUrl(URI docTrlGcsUrl) {
91 this.docTrlGcsUrl = docTrlGcsUrl;
92 return this;
93 }
94
95 @ApiModelProperty(required = true, value = "GCS URL (gs://bucket/blob) of an existing translation if to be imported along with the original document. If specified, the passed translation is segmented and aligned with extracted original document's segments. If the number of segments is different, the translation is ignored and regular import pipeline with TM and MT is run on the original document. The caller takes the risk of the possible segments' misalignment, in which case manual postediting of misaligned segments is requered.")
96 @JsonProperty("doc_trl_gcs_url")
97 public URI getDocTrlGcsUrl() {
98 return docTrlGcsUrl;
99 }
100
101 public void setDocTrlGcsUrl(URI docTrlGcsUrl) {
102 this.docTrlGcsUrl = docTrlGcsUrl;
103 }
104
105
106
107
108
109 public AlignDocumentRequest docTrlEncoding(String docTrlEncoding) {
110 this.docTrlEncoding = docTrlEncoding;
111 return this;
112 }
113
114 @ApiModelProperty(value = "Optional translation encoding if `doc_trl_gcs_url` is specified. If omitted and `doc_trl_gcs_url` is specified, the original document's encoding will be used.")
115 @JsonProperty("doc_trl_encoding")
116 public String getDocTrlEncoding() {
117 return docTrlEncoding;
118 }
119
120 public void setDocTrlEncoding(String docTrlEncoding) {
121 this.docTrlEncoding = docTrlEncoding;
122 }
123
124
125
126
127 public AlignDocumentRequest srcSrx(String srcSrx) {
128 this.srcSrx = srcSrx;
129 return this;
130 }
131
132 @ApiModelProperty(value = "Optional SRX string for source segmentation.")
133 @JsonProperty("src_srx")
134 public String getSrcSrx() {
135 return srcSrx;
136 }
137
138 public void setSrcSrx(String srcSrx) {
139 this.srcSrx = srcSrx;
140 }
141
142
143
144
145 public AlignDocumentRequest trgSrx(String trgSrx) {
146 this.trgSrx = trgSrx;
147 return this;
148 }
149
150 @ApiModelProperty(value = "Optional SRX string for target segmentation.")
151 @JsonProperty("trg_srx")
152 public String getTrgSrx() {
153 return trgSrx;
154 }
155
156 public void setTrgSrx(String trgSrx) {
157 this.trgSrx = trgSrx;
158 }
159
160
161
162
163 public AlignDocumentRequest useAlignmentModel(Boolean useAlignmentModel) {
164 this.useAlignmentModel = useAlignmentModel;
165 return this;
166 }
167
168 @ApiModelProperty(value = "True to use LLM-based documents alignment, false to have Okapi align documents.")
169 @JsonProperty("use_alignment_model")
170 public Boolean getUseAlignmentModel() {
171 return useAlignmentModel;
172 }
173
174 public void setUseAlignmentModel(Boolean useAlignmentModel) {
175 this.useAlignmentModel = useAlignmentModel;
176 }
177
178
179
180
181 public AlignDocumentRequest alignmentModelName(String alignmentModelName) {
182 this.alignmentModelName = alignmentModelName;
183 return this;
184 }
185
186 @ApiModelProperty(value = "Gemini AI model name to use for documents alignment.")
187 @JsonProperty("alignment_model_name")
188 public String getAlignmentModelName() {
189 return alignmentModelName;
190 }
191
192 public void setAlignmentModelName(String alignmentModelName) {
193 this.alignmentModelName = alignmentModelName;
194 }
195
196
197
198
199
200 public AlignDocumentRequest useCodesReinsertionModel(Boolean useCodesReinsertionModel) {
201 this.useCodesReinsertionModel = useCodesReinsertionModel;
202 return this;
203 }
204
205 @ApiModelProperty(value = "True to use LLM-based target codes reinsertion, false to have Okapi reinsert. This option has effect only when plainTextMT is true.")
206 @JsonProperty("use_codes_reinsertion_model")
207 public Boolean getUseCodesReinsertionModel() {
208 return useCodesReinsertionModel;
209 }
210
211 public void setUseCodesReinsertionModel(Boolean useCodesReinsertionModel) {
212 this.useCodesReinsertionModel = useCodesReinsertionModel;
213 }
214
215
216
217
218 public AlignDocumentRequest codesReinsertionModelName(String codesReinsertionModelName) {
219 this.codesReinsertionModelName = codesReinsertionModelName;
220 return this;
221 }
222
223 @ApiModelProperty(value = "Gemini AI model name to use for target codes reinsertion.")
224 @JsonProperty("codes_reinsertion_model_name")
225 public String getCodesReinsertionModelName() {
226 return codesReinsertionModelName;
227 }
228
229 public void setCodesReinsertionModelName(String codesReinsertionModelName) {
230 this.codesReinsertionModelName = codesReinsertionModelName;
231 }
232
233
234
235
236 public AlignDocumentRequest userId(UUID userId) {
237 this.userId = userId;
238 return this;
239 }
240
241 @ApiModelProperty(required = true, value = "UUID of the user importing the document.")
242 @JsonProperty("user_id")
243 public UUID getUserId() {
244 return userId;
245 }
246
247 public void setUserId(UUID userId) {
248 this.userId = userId;
249 }
250
251 @Override
252 public boolean equals(Object o) {
253 if (this == o) {
254 return true;
255 }
256 if (o == null || getClass() != o.getClass()) {
257 return false;
258 }
259 AlignDocumentRequest alignDocumentRequest = (AlignDocumentRequest) o;
260 return Objects.equals(srcLang, alignDocumentRequest.srcLang) &&
261 Objects.equals(trgLang, alignDocumentRequest.trgLang) &&
262 Objects.equals(docTrlGcsUrl, alignDocumentRequest.docTrlGcsUrl) &&
263 Objects.equals(docTrlEncoding, alignDocumentRequest.docTrlEncoding) &&
264 Objects.equals(srcSrx, alignDocumentRequest.srcSrx) &&
265 Objects.equals(trgSrx, alignDocumentRequest.trgSrx) &&
266 Objects.equals(useAlignmentModel, alignDocumentRequest.useAlignmentModel) &&
267 Objects.equals(alignmentModelName, alignDocumentRequest.alignmentModelName) &&
268 Objects.equals(useCodesReinsertionModel, alignDocumentRequest.useCodesReinsertionModel) &&
269 Objects.equals(codesReinsertionModelName, alignDocumentRequest.codesReinsertionModelName) &&
270 Objects.equals(userId, alignDocumentRequest.userId);
271 }
272
273 @Override
274 public int hashCode() {
275 return Objects.hash(srcLang, trgLang, docTrlGcsUrl, docTrlEncoding, srcSrx, trgSrx,
276 useAlignmentModel, alignmentModelName, useCodesReinsertionModel, codesReinsertionModelName,
277 userId);
278 }
279
280 @Override
281 public String toString() {
282 StringBuilder sb = new StringBuilder();
283 sb.append("class AlignDocumentRequest {\n");
284
285 sb.append(" srcLang: ").append(toIndentedString(srcLang)).append("\n");
286 sb.append(" trgLang: ").append(toIndentedString(trgLang)).append("\n");
287 sb.append(" docTrlGcsUrl: ").append(toIndentedString(docTrlGcsUrl)).append("\n");
288 sb.append(" docTrlEncoding: ").append(toIndentedString(docTrlEncoding)).append("\n");
289 sb.append(" srcSrx: ").append(toIndentedString(srcSrx)).append("\n");
290 sb.append(" trgSrx: ").append(toIndentedString(trgSrx)).append("\n");
291 sb.append(" useAlignmentModel: ").append(toIndentedString(useAlignmentModel)).append("\n");
292 sb.append(" alignmentModelName: ").append(toIndentedString(alignmentModelName)).append("\n");
293 sb.append(" useCodesReinsertionModel: ").append(toIndentedString(useCodesReinsertionModel))
294 .append("\n");
295 sb.append(" codesReinsertionModelName: ").append(toIndentedString(codesReinsertionModelName))
296 .append("\n");
297 sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
298 sb.append("}");
299 return sb.toString();
300 }
301
302
303
304
305
306 private String toIndentedString(Object o) {
307 if (o == null) {
308 return "null";
309 }
310 return o.toString().replace("\n", "\n ");
311 }
312 }