View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.Date;
4   import java.util.Objects;
5   import java.util.UUID;
6   
7   import com.acumenvelocity.ath.model.x.LayeredTextX;
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   
10  import io.swagger.annotations.ApiModel;
11  import io.swagger.annotations.ApiModelProperty;
12  
13  /**
14   * Translation Memory segment.
15   **/
16  
17  @ApiModel(description = "Translation Memory segment.")
18  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
19  public class TmSegment {
20    @JsonProperty("id")
21    private String id;
22  
23    @JsonProperty("tm_seg_id")
24    private UUID tmSegId;
25  
26    @JsonProperty("tm_id")
27    private UUID tmId;
28  
29    @JsonProperty("tm_file_name")
30    private String tmFileName;
31  
32    @JsonProperty("doc_id")
33    private UUID docId;
34  
35    @JsonProperty("doc_file_name")
36    private String docFileName;
37  
38    @JsonProperty("src_lang")
39    private String srcLang;
40  
41    @JsonProperty("trg_lang")
42    private String trgLang;
43  
44    @JsonProperty("source")
45    private LayeredTextX source;
46  
47    @JsonProperty("target")
48    private LayeredTextX target;
49  
50    @JsonProperty("created_by")
51    private UUID createdBy;
52  
53    @JsonProperty("created_at")
54    private Date createdAt;
55  
56    @JsonProperty("updated_by")
57    private UUID updatedBy;
58  
59    @JsonProperty("updated_at")
60    private Date updatedAt;
61  
62    /**
63     * Unique id of the TM segment
64     **/
65    public TmSegment id(String id) {
66      this.id = id;
67      return this;
68    }
69  
70    @ApiModelProperty(required = true, value = "Unique id of the TM segment")
71    @JsonProperty("id")
72    public String getId() {
73      return id;
74    }
75  
76    public void setId(String id) {
77      this.id = id;
78    }
79  
80    /**
81     * UUID of the TM segment
82     **/
83    public TmSegment tmSegId(UUID tmSegId) {
84      this.tmSegId = tmSegId;
85      return this;
86    }
87  
88    @ApiModelProperty(required = true, value = "UUID of the TM segment")
89    @JsonProperty("tm_seg_id")
90    public UUID getTmSegId() {
91      return tmSegId;
92    }
93  
94    public void setTmSegId(UUID tmSegId) {
95      this.tmSegId = tmSegId;
96    }
97  
98    /**
99     * UUID of the Translation Memory
100    **/
101   public TmSegment tmId(UUID tmId) {
102     this.tmId = tmId;
103     return this;
104   }
105 
106   @ApiModelProperty(required = true, value = "UUID of the Translation Memory")
107   @JsonProperty("tm_id")
108   public UUID getTmId() {
109     return tmId;
110   }
111 
112   public void setTmId(UUID tmId) {
113     this.tmId = tmId;
114   }
115 
116   /**
117    * Name of the Translation Memory
118    **/
119   public TmSegment tmFileName(String tmFileName) {
120     this.tmFileName = tmFileName;
121     return this;
122   }
123 
124   @ApiModelProperty(required = true, value = "Name of the Translation Memory")
125   @JsonProperty("tm_file_name")
126   public String getTmFileName() {
127     return tmFileName;
128   }
129 
130   public void setTmFileName(String tmFileName) {
131     this.tmFileName = tmFileName;
132   }
133 
134   /**
135    * UUID of the document if the TM segment was imported from a document
136    **/
137   public TmSegment docId(UUID docId) {
138     this.docId = docId;
139     return this;
140   }
141 
142   @ApiModelProperty(value = "UUID of the document if the TM segment was imported from a document")
143   @JsonProperty("doc_id")
144   public UUID getDocId() {
145     return docId;
146   }
147 
148   public void setDocId(UUID docId) {
149     this.docId = docId;
150   }
151 
152   /**
153    * Name of the document if the TM segment was imported from a document
154    **/
155   public TmSegment docFileName(String docFileName) {
156     this.docFileName = docFileName;
157     return this;
158   }
159 
160   @ApiModelProperty(value = "Name of the document if the TM segment was imported from a document")
161   @JsonProperty("doc_file_name")
162   public String getDocFileName() {
163     return docFileName;
164   }
165 
166   public void setDocFileName(String docFileName) {
167     this.docFileName = docFileName;
168   }
169 
170   /**
171    * Source language ISO code
172    **/
173   public TmSegment srcLang(String srcLang) {
174     this.srcLang = srcLang;
175     return this;
176   }
177 
178   @ApiModelProperty(required = true, value = "Source language ISO code")
179   @JsonProperty("src_lang")
180   public String getSrcLang() {
181     return srcLang;
182   }
183 
184   public void setSrcLang(String srcLang) {
185     this.srcLang = srcLang;
186   }
187 
188   /**
189    * Target language ISO code
190    **/
191   public TmSegment trgLang(String trgLang) {
192     this.trgLang = trgLang;
193     return this;
194   }
195 
196   @ApiModelProperty(required = true, value = "Target language ISO code")
197   @JsonProperty("trg_lang")
198   public String getTrgLang() {
199     return trgLang;
200   }
201 
202   public void setTrgLang(String trgLang) {
203     this.trgLang = trgLang;
204   }
205 
206   /**
207    **/
208   public TmSegment source(LayeredTextX source) {
209     this.source = source;
210     return this;
211   }
212 
213   @ApiModelProperty(required = true, value = "")
214   @JsonProperty("source")
215   public LayeredTextX getSource() {
216     return source;
217   }
218 
219   public void setSource(LayeredTextX source) {
220     this.source = source;
221   }
222 
223   /**
224    **/
225   public TmSegment target(LayeredTextX target) {
226     this.target = target;
227     return this;
228   }
229 
230   @ApiModelProperty(required = true, value = "")
231   @JsonProperty("target")
232   public LayeredTextX getTarget() {
233     return target;
234   }
235 
236   public void setTarget(LayeredTextX target) {
237     this.target = target;
238   }
239 
240   /**
241    * UUID of the user who created the segment
242    **/
243   public TmSegment createdBy(UUID createdBy) {
244     this.createdBy = createdBy;
245     return this;
246   }
247 
248   @ApiModelProperty(value = "UUID of the user who created the segment")
249   @JsonProperty("created_by")
250   public UUID getCreatedBy() {
251     return createdBy;
252   }
253 
254   public void setCreatedBy(UUID createdBy) {
255     this.createdBy = createdBy;
256   }
257 
258   /**
259    * Creation timestamp
260    **/
261   public TmSegment createdAt(Date createdAt) {
262     this.createdAt = createdAt;
263     return this;
264   }
265 
266   @ApiModelProperty(value = "Creation timestamp")
267   @JsonProperty("created_at")
268   public Date getCreatedAt() {
269     return createdAt;
270   }
271 
272   public void setCreatedAt(Date createdAt) {
273     this.createdAt = createdAt;
274   }
275 
276   /**
277    * UUID of the user who last updated the segment
278    **/
279   public TmSegment updatedBy(UUID updatedBy) {
280     this.updatedBy = updatedBy;
281     return this;
282   }
283 
284   @ApiModelProperty(value = "UUID of the user who last updated the segment")
285   @JsonProperty("updated_by")
286   public UUID getUpdatedBy() {
287     return updatedBy;
288   }
289 
290   public void setUpdatedBy(UUID updatedBy) {
291     this.updatedBy = updatedBy;
292   }
293 
294   /**
295    * Last update timestamp
296    **/
297   public TmSegment updatedAt(Date updatedAt) {
298     this.updatedAt = updatedAt;
299     return this;
300   }
301 
302   @ApiModelProperty(value = "Last update timestamp")
303   @JsonProperty("updated_at")
304   public Date getUpdatedAt() {
305     return updatedAt;
306   }
307 
308   public void setUpdatedAt(Date updatedAt) {
309     this.updatedAt = updatedAt;
310   }
311 
312   @Override
313   public boolean equals(Object o) {
314     if (this == o) {
315       return true;
316     }
317     if (o == null || getClass() != o.getClass()) {
318       return false;
319     }
320     TmSegment tmSegment = (TmSegment) o;
321     return Objects.equals(id, tmSegment.id) &&
322         Objects.equals(tmSegId, tmSegment.tmSegId) &&
323         Objects.equals(tmId, tmSegment.tmId) &&
324         Objects.equals(tmFileName, tmSegment.tmFileName) &&
325         Objects.equals(docId, tmSegment.docId) &&
326         Objects.equals(docFileName, tmSegment.docFileName) &&
327         Objects.equals(srcLang, tmSegment.srcLang) &&
328         Objects.equals(trgLang, tmSegment.trgLang) &&
329         Objects.equals(source, tmSegment.source) &&
330         Objects.equals(target, tmSegment.target) &&
331         Objects.equals(createdBy, tmSegment.createdBy) &&
332         Objects.equals(createdAt, tmSegment.createdAt) &&
333         Objects.equals(updatedBy, tmSegment.updatedBy) &&
334         Objects.equals(updatedAt, tmSegment.updatedAt);
335   }
336 
337   @Override
338   public int hashCode() {
339     return Objects.hash(id, tmSegId, tmId, tmFileName, docId, docFileName, srcLang, trgLang, source,
340         target, createdBy, createdAt, updatedBy, updatedAt);
341   }
342 
343   @Override
344   public String toString() {
345     StringBuilder sb = new StringBuilder();
346     sb.append("class TmSegment {\n");
347 
348     sb.append("    id: ").append(toIndentedString(id)).append("\n");
349     sb.append("    tmSegId: ").append(toIndentedString(tmSegId)).append("\n");
350     sb.append("    tmId: ").append(toIndentedString(tmId)).append("\n");
351     sb.append("    tmFileName: ").append(toIndentedString(tmFileName)).append("\n");
352     sb.append("    docId: ").append(toIndentedString(docId)).append("\n");
353     sb.append("    docFileName: ").append(toIndentedString(docFileName)).append("\n");
354     sb.append("    srcLang: ").append(toIndentedString(srcLang)).append("\n");
355     sb.append("    trgLang: ").append(toIndentedString(trgLang)).append("\n");
356     sb.append("    source: ").append(toIndentedString(source)).append("\n");
357     sb.append("    target: ").append(toIndentedString(target)).append("\n");
358     sb.append("    createdBy: ").append(toIndentedString(createdBy)).append("\n");
359     sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
360     sb.append("    updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
361     sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
362     sb.append("}");
363     return sb.toString();
364   }
365 
366   /**
367    * Convert the given object to string with each line indented by 4 spaces
368    * (except the first line).
369    */
370   private String toIndentedString(Object o) {
371     if (o == null) {
372       return "null";
373     }
374     return o.toString().replace("\n", "\n    ");
375   }
376 }