View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.net.URI;
4   import java.util.Date;
5   import java.util.Objects;
6   import java.util.UUID;
7   
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   
10  import io.swagger.annotations.ApiModel;
11  import io.swagger.annotations.ApiModelProperty;
12  
13  /**
14   * Document information.
15   **/
16  
17  @ApiModel(description = "Document information.")
18  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
19  public class DocumentInfo {
20    @JsonProperty("doc_id")
21    private UUID docId;
22  
23    @JsonProperty("doc_file_name")
24    private String docFileName = "";
25  
26    @JsonProperty("doc_gcs_url")
27    private URI docGcsUrl = URI.create("");
28  
29    @JsonProperty("doc_trl_gcs_url")
30    private URI docTrlGcsUrl = URI.create("");
31  
32    @JsonProperty("src_lang")
33    private String srcLang = "en";
34  
35    @JsonProperty("trg_lang")
36    private String trgLang = "fr";
37  
38    @JsonProperty("segments_count")
39    private Long segmentsCount = 0l;
40  
41    @JsonProperty("created_by")
42    private UUID createdBy;
43  
44    @JsonProperty("created_at")
45    private Date createdAt;
46  
47    @JsonProperty("updated_by")
48    private UUID updatedBy;
49  
50    @JsonProperty("updated_at")
51    private Date updatedAt;
52  
53    /**
54     * UUID of the document.
55     **/
56    public DocumentInfo docId(UUID docId) {
57      this.docId = docId;
58      return this;
59    }
60  
61    @ApiModelProperty(required = true, value = "UUID of the document.")
62    @JsonProperty("doc_id")
63    public UUID getDocId() {
64      return docId;
65    }
66  
67    public void setDocId(UUID docId) {
68      this.docId = docId;
69    }
70  
71    /**
72     * Name of the document.
73     **/
74    public DocumentInfo docFileName(String docFileName) {
75      this.docFileName = docFileName;
76      return this;
77    }
78  
79    @ApiModelProperty(required = true, value = "Name of the document.")
80    @JsonProperty("doc_file_name")
81    public String getDocFileName() {
82      return docFileName;
83    }
84  
85    public void setDocFileName(String docFileName) {
86      this.docFileName = docFileName;
87    }
88  
89    /**
90     * GCS URL (gs://bucket/blob) of the original document content.
91     **/
92    public DocumentInfo docGcsUrl(URI docGcsUrl) {
93      this.docGcsUrl = docGcsUrl;
94      return this;
95    }
96  
97    @ApiModelProperty(value = "GCS URL (gs://bucket/blob) of the original document content.")
98    @JsonProperty("doc_gcs_url")
99    public URI getDocGcsUrl() {
100     return docGcsUrl;
101   }
102 
103   public void setDocGcsUrl(URI docGcsUrl) {
104     this.docGcsUrl = docGcsUrl;
105   }
106 
107   /**
108    * Optional GCS URL (gs://bucket/blob) of an existing translation if to be imported along with the
109    * original document. If specified, the passed translation is segmented and aligned with extracted
110    * original document's segments. If the number of segments is different, the translation is
111    * ignored and regular import pipeline with TM and MT is run on the original document. The caller
112    * takes the risk of the possible segments' misalignment, in which case manual postediting of
113    * misaligned segments is requered.
114    **/
115   public DocumentInfo docTrlGcsUrl(URI docTrlGcsUrl) {
116     this.docTrlGcsUrl = docTrlGcsUrl;
117     return this;
118   }
119 
120   @ApiModelProperty(value = "Optional 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.")
121   @JsonProperty("doc_trl_gcs_url")
122   public URI getDocTrlGcsUrl() {
123     return docTrlGcsUrl;
124   }
125 
126   public void setDocTrlGcsUrl(URI docTrlGcsUrl) {
127     this.docTrlGcsUrl = docTrlGcsUrl;
128   }
129 
130   /**
131    * Source language ISO code.
132    **/
133   public DocumentInfo srcLang(String srcLang) {
134     this.srcLang = srcLang;
135     return this;
136   }
137 
138   @ApiModelProperty(required = true, value = "Source language ISO code.")
139   @JsonProperty("src_lang")
140   public String getSrcLang() {
141     return srcLang;
142   }
143 
144   public void setSrcLang(String srcLang) {
145     this.srcLang = srcLang;
146   }
147 
148   /**
149    * Target language ISO code.
150    **/
151   public DocumentInfo trgLang(String trgLang) {
152     this.trgLang = trgLang;
153     return this;
154   }
155 
156   @ApiModelProperty(required = true, value = "Target language ISO code.")
157   @JsonProperty("trg_lang")
158   public String getTrgLang() {
159     return trgLang;
160   }
161 
162   public void setTrgLang(String trgLang) {
163     this.trgLang = trgLang;
164   }
165 
166   /**
167    * Number of translation segments in the document.
168    **/
169   public DocumentInfo segmentsCount(Long segmentsCount) {
170     this.segmentsCount = segmentsCount;
171     return this;
172   }
173 
174   @ApiModelProperty(value = "Number of translation segments in the document.")
175   @JsonProperty("segments_count")
176   public Long getSegmentsCount() {
177     return segmentsCount;
178   }
179 
180   public void setSegmentsCount(Long segmentsCount) {
181     this.segmentsCount = segmentsCount;
182   }
183 
184   /**
185    * UUID of the user who created the document.
186    **/
187   public DocumentInfo createdBy(UUID createdBy) {
188     this.createdBy = createdBy;
189     return this;
190   }
191 
192   @ApiModelProperty(required = true, value = "UUID of the user who created the document.")
193   @JsonProperty("created_by")
194   public UUID getCreatedBy() {
195     return createdBy;
196   }
197 
198   public void setCreatedBy(UUID createdBy) {
199     this.createdBy = createdBy;
200   }
201 
202   /**
203    * Creation timestamp.
204    **/
205   public DocumentInfo createdAt(Date createdAt) {
206     this.createdAt = createdAt;
207     return this;
208   }
209 
210   @ApiModelProperty(required = true, value = "Creation timestamp.")
211   @JsonProperty("created_at")
212   public Date getCreatedAt() {
213     return createdAt;
214   }
215 
216   public void setCreatedAt(Date createdAt) {
217     this.createdAt = createdAt;
218   }
219 
220   /**
221    * UUID of the user who last updated the document.
222    **/
223   public DocumentInfo updatedBy(UUID updatedBy) {
224     this.updatedBy = updatedBy;
225     return this;
226   }
227 
228   @ApiModelProperty(required = true, value = "UUID of the user who last updated the document.")
229   @JsonProperty("updated_by")
230   public UUID getUpdatedBy() {
231     return updatedBy;
232   }
233 
234   public void setUpdatedBy(UUID updatedBy) {
235     this.updatedBy = updatedBy;
236   }
237 
238   /**
239    * Last update timestamp.
240    **/
241   public DocumentInfo updatedAt(Date updatedAt) {
242     this.updatedAt = updatedAt;
243     return this;
244   }
245 
246   @ApiModelProperty(required = true, value = "Last update timestamp.")
247   @JsonProperty("updated_at")
248   public Date getUpdatedAt() {
249     return updatedAt;
250   }
251 
252   public void setUpdatedAt(Date updatedAt) {
253     this.updatedAt = updatedAt;
254   }
255 
256   @Override
257   public boolean equals(Object o) {
258     if (this == o) {
259       return true;
260     }
261     if (o == null || getClass() != o.getClass()) {
262       return false;
263     }
264     DocumentInfo documentInfo = (DocumentInfo) o;
265     return Objects.equals(docId, documentInfo.docId) &&
266         Objects.equals(docFileName, documentInfo.docFileName) &&
267         Objects.equals(docGcsUrl, documentInfo.docGcsUrl) &&
268         Objects.equals(docTrlGcsUrl, documentInfo.docTrlGcsUrl) &&
269         Objects.equals(srcLang, documentInfo.srcLang) &&
270         Objects.equals(trgLang, documentInfo.trgLang) &&
271         Objects.equals(segmentsCount, documentInfo.segmentsCount) &&
272         Objects.equals(createdBy, documentInfo.createdBy) &&
273         Objects.equals(createdAt, documentInfo.createdAt) &&
274         Objects.equals(updatedBy, documentInfo.updatedBy) &&
275         Objects.equals(updatedAt, documentInfo.updatedAt);
276   }
277 
278   @Override
279   public int hashCode() {
280     return Objects.hash(docId, docFileName, docGcsUrl, docTrlGcsUrl, srcLang, trgLang,
281         segmentsCount, createdBy, createdAt, updatedBy, updatedAt);
282   }
283 
284   @Override
285   public String toString() {
286     StringBuilder sb = new StringBuilder();
287     sb.append("class DocumentInfo {\n");
288 
289     sb.append("    docId: ").append(toIndentedString(docId)).append("\n");
290     sb.append("    docFileName: ").append(toIndentedString(docFileName)).append("\n");
291     sb.append("    docGcsUrl: ").append(toIndentedString(docGcsUrl)).append("\n");
292     sb.append("    docTrlGcsUrl: ").append(toIndentedString(docTrlGcsUrl)).append("\n");
293     sb.append("    srcLang: ").append(toIndentedString(srcLang)).append("\n");
294     sb.append("    trgLang: ").append(toIndentedString(trgLang)).append("\n");
295     sb.append("    segmentsCount: ").append(toIndentedString(segmentsCount)).append("\n");
296     sb.append("    createdBy: ").append(toIndentedString(createdBy)).append("\n");
297     sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
298     sb.append("    updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
299     sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
300     sb.append("}");
301     return sb.toString();
302   }
303 
304   /**
305    * Convert the given object to string with each line indented by 4 spaces
306    * (except the first line).
307    */
308   private String toIndentedString(Object o) {
309     if (o == null) {
310       return "null";
311     }
312     return o.toString().replace("\n", "\n    ");
313   }
314 }