1 package com.acumenvelocity.ath.model;
2
3 import java.net.URI;
4 import java.util.ArrayList;
5 import java.util.List;
6 import java.util.Objects;
7 import java.util.UUID;
8
9 import com.fasterxml.jackson.annotation.JsonProperty;
10
11 import io.swagger.annotations.ApiModelProperty;
12
13 @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
14 public class TrainModelRequest {
15 @JsonProperty("training_job_id")
16 private UUID trainingJobId;
17
18 @JsonProperty("model_name")
19 private String modelName = "";
20
21 @JsonProperty("src_lang")
22 private String srcLang = "en";
23
24 @JsonProperty("trg_lang")
25 private String trgLang = "fr";
26
27 @JsonProperty("gcs_buckets")
28 private List<URI> gcsBuckets = new ArrayList<>();
29
30 @JsonProperty("project_id")
31 private String projectId = "";
32
33 @JsonProperty("location")
34 private String location = "us-central1";
35
36 @JsonProperty("user_id")
37 private UUID userId;
38
39
40
41
42 public TrainModelRequest trainingJobId(UUID trainingJobId) {
43 this.trainingJobId = trainingJobId;
44 return this;
45 }
46
47 @ApiModelProperty(required = true, value = "UUID assigned by the caller to identify the training job.")
48 @JsonProperty("training_job_id")
49 public UUID getTrainingJobId() {
50 return trainingJobId;
51 }
52
53 public void setTrainingJobId(UUID trainingJobId) {
54 this.trainingJobId = trainingJobId;
55 }
56
57
58
59
60 public TrainModelRequest modelName(String modelName) {
61 this.modelName = modelName;
62 return this;
63 }
64
65 @ApiModelProperty(example = "my-custom-en-es-model", required = true, value = "Display name for the trained model.")
66 @JsonProperty("model_name")
67 public String getModelName() {
68 return modelName;
69 }
70
71 public void setModelName(String modelName) {
72 this.modelName = modelName;
73 }
74
75
76
77
78 public TrainModelRequest srcLang(String srcLang) {
79 this.srcLang = srcLang;
80 return this;
81 }
82
83 @ApiModelProperty(example = "en", required = true, value = "Source language ISO code (e.g., \"en\", \"fr\", \"de\").")
84 @JsonProperty("src_lang")
85 public String getSrcLang() {
86 return srcLang;
87 }
88
89 public void setSrcLang(String srcLang) {
90 this.srcLang = srcLang;
91 }
92
93
94
95
96 public TrainModelRequest trgLang(String trgLang) {
97 this.trgLang = trgLang;
98 return this;
99 }
100
101 @ApiModelProperty(example = "es", required = true, value = "Target language ISO code (e.g., \"es\", \"fr\", \"de\").")
102 @JsonProperty("trg_lang")
103 public String getTrgLang() {
104 return trgLang;
105 }
106
107 public void setTrgLang(String trgLang) {
108 this.trgLang = trgLang;
109 }
110
111
112
113
114
115 public TrainModelRequest gcsBuckets(List<URI> gcsBuckets) {
116 this.gcsBuckets = gcsBuckets;
117 return this;
118 }
119
120 @ApiModelProperty(example = "[\"gs://my-training-data\",\"gs://shared-tm-bucket\"]", required = true, value = "List of GCS bucket URIs to scan for training files. Supports TMX, TSV, CSV, and TXT files. Example: [\"gs://my-bucket\", \"gs://shared-bucket/subfolder\"]")
121 @JsonProperty("gcs_buckets")
122 public List<URI> getGcsBuckets() {
123 return gcsBuckets;
124 }
125
126 public void setGcsBuckets(List<URI> gcsBuckets) {
127 this.gcsBuckets = gcsBuckets;
128 }
129
130
131
132
133 public TrainModelRequest projectId(String projectId) {
134 this.projectId = projectId;
135 return this;
136 }
137
138 @ApiModelProperty(example = "my-gcp-project", required = true, value = "Google Cloud project ID where the AutoML dataset and model will be created.")
139 @JsonProperty("project_id")
140 public String getProjectId() {
141 return projectId;
142 }
143
144 public void setProjectId(String projectId) {
145 this.projectId = projectId;
146 }
147
148
149
150
151 public TrainModelRequest location(String location) {
152 this.location = location;
153 return this;
154 }
155
156 @ApiModelProperty(example = "us-central1", required = true, value = "Google Cloud region for AutoML resources (e.g., \"us-central1\", \"europe-west4\").")
157 @JsonProperty("location")
158 public String getLocation() {
159 return location;
160 }
161
162 public void setLocation(String location) {
163 this.location = location;
164 }
165
166
167
168
169 public TrainModelRequest userId(UUID userId) {
170 this.userId = userId;
171 return this;
172 }
173
174 @ApiModelProperty(required = true, value = "UUID of the user initiating the training.")
175 @JsonProperty("user_id")
176 public UUID getUserId() {
177 return userId;
178 }
179
180 public void setUserId(UUID userId) {
181 this.userId = userId;
182 }
183
184 @Override
185 public boolean equals(Object o) {
186 if (this == o) {
187 return true;
188 }
189 if (o == null || getClass() != o.getClass()) {
190 return false;
191 }
192 TrainModelRequest trainModelRequest = (TrainModelRequest) o;
193 return Objects.equals(trainingJobId, trainModelRequest.trainingJobId) &&
194 Objects.equals(modelName, trainModelRequest.modelName) &&
195 Objects.equals(srcLang, trainModelRequest.srcLang) &&
196 Objects.equals(trgLang, trainModelRequest.trgLang) &&
197 Objects.equals(gcsBuckets, trainModelRequest.gcsBuckets) &&
198 Objects.equals(projectId, trainModelRequest.projectId) &&
199 Objects.equals(location, trainModelRequest.location) &&
200 Objects.equals(userId, trainModelRequest.userId);
201 }
202
203 @Override
204 public int hashCode() {
205 return Objects.hash(trainingJobId, modelName, srcLang, trgLang, gcsBuckets, projectId, location,
206 userId);
207 }
208
209 @Override
210 public String toString() {
211 StringBuilder sb = new StringBuilder();
212 sb.append("class TrainModelRequest {\n");
213
214 sb.append(" trainingJobId: ").append(toIndentedString(trainingJobId)).append("\n");
215 sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n");
216 sb.append(" srcLang: ").append(toIndentedString(srcLang)).append("\n");
217 sb.append(" trgLang: ").append(toIndentedString(trgLang)).append("\n");
218 sb.append(" gcsBuckets: ").append(toIndentedString(gcsBuckets)).append("\n");
219 sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
220 sb.append(" location: ").append(toIndentedString(location)).append("\n");
221 sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
222 sb.append("}");
223 return sb.toString();
224 }
225
226
227
228
229
230 private String toIndentedString(Object o) {
231 if (o == null) {
232 return "null";
233 }
234 return o.toString().replace("\n", "\n ");
235 }
236 }