View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.Objects;
4   import java.util.UUID;
5   
6   import com.acumenvelocity.ath.model.x.LayeredTextX;
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 CreateTranslationMemorySegmentRequest {
13    @JsonProperty("tm_seg_id")
14    private UUID tmSegId;
15  
16    @JsonProperty("source")
17    private LayeredTextX source;
18  
19    @JsonProperty("target")
20    private LayeredTextX target;
21  
22    @JsonProperty("doc_id")
23    private UUID docId;
24  
25    @JsonProperty("doc_file_name")
26    private String docFileName;
27  
28    @JsonProperty("user_id")
29    private UUID userId;
30  
31    /**
32     * UUID of the new TM segment
33     **/
34    public CreateTranslationMemorySegmentRequest tmSegId(UUID tmSegId) {
35      this.tmSegId = tmSegId;
36      return this;
37    }
38  
39    @ApiModelProperty(required = true, value = "UUID of the new TM segment")
40    @JsonProperty("tm_seg_id")
41    public UUID getTmSegId() {
42      return tmSegId;
43    }
44  
45    public void setTmSegId(UUID tmSegId) {
46      this.tmSegId = tmSegId;
47    }
48  
49    /**
50     **/
51    public CreateTranslationMemorySegmentRequest source(LayeredTextX source) {
52      this.source = source;
53      return this;
54    }
55  
56    @ApiModelProperty(required = true, value = "")
57    @JsonProperty("source")
58    public LayeredTextX getSource() {
59      return source;
60    }
61  
62    public void setSource(LayeredTextX source) {
63      this.source = source;
64    }
65  
66    /**
67     **/
68    public CreateTranslationMemorySegmentRequest target(LayeredTextX target) {
69      this.target = target;
70      return this;
71    }
72  
73    @ApiModelProperty(required = true, value = "")
74    @JsonProperty("target")
75    public LayeredTextX getTarget() {
76      return target;
77    }
78  
79    public void setTarget(LayeredTextX target) {
80      this.target = target;
81    }
82  
83    /**
84     * Optional UUID of the document if the TM segment was imported from a document.
85     **/
86    public CreateTranslationMemorySegmentRequest docId(UUID docId) {
87      this.docId = docId;
88      return this;
89    }
90  
91    @ApiModelProperty(value = "Optional UUID of the document if the TM segment was imported from a document.")
92    @JsonProperty("doc_id")
93    public UUID getDocId() {
94      return docId;
95    }
96  
97    public void setDocId(UUID docId) {
98      this.docId = docId;
99    }
100 
101   /**
102    * Optional name of the document if the TM segment was imported from a document.
103    **/
104   public CreateTranslationMemorySegmentRequest docFileName(String docFileName) {
105     this.docFileName = docFileName;
106     return this;
107   }
108 
109   @ApiModelProperty(value = "Optional name of the document if the TM segment was imported from a document.               ")
110   @JsonProperty("doc_file_name")
111   public String getDocFileName() {
112     return docFileName;
113   }
114 
115   public void setDocFileName(String docFileName) {
116     this.docFileName = docFileName;
117   }
118 
119   /**
120    * UUID of the user creating the TM segment.
121    **/
122   public CreateTranslationMemorySegmentRequest userId(UUID userId) {
123     this.userId = userId;
124     return this;
125   }
126 
127   @ApiModelProperty(required = true, value = "UUID of the user creating the TM segment.")
128   @JsonProperty("user_id")
129   public UUID getUserId() {
130     return userId;
131   }
132 
133   public void setUserId(UUID userId) {
134     this.userId = userId;
135   }
136 
137   @Override
138   public boolean equals(Object o) {
139     if (this == o) {
140       return true;
141     }
142     if (o == null || getClass() != o.getClass()) {
143       return false;
144     }
145     CreateTranslationMemorySegmentRequest createTranslationMemorySegmentRequest = (CreateTranslationMemorySegmentRequest) o;
146     return Objects.equals(tmSegId, createTranslationMemorySegmentRequest.tmSegId) &&
147         Objects.equals(source, createTranslationMemorySegmentRequest.source) &&
148         Objects.equals(target, createTranslationMemorySegmentRequest.target) &&
149         Objects.equals(docId, createTranslationMemorySegmentRequest.docId) &&
150         Objects.equals(docFileName, createTranslationMemorySegmentRequest.docFileName) &&
151         Objects.equals(userId, createTranslationMemorySegmentRequest.userId);
152   }
153 
154   @Override
155   public int hashCode() {
156     return Objects.hash(tmSegId, source, target, docId, docFileName, userId);
157   }
158 
159   @Override
160   public String toString() {
161     StringBuilder sb = new StringBuilder();
162     sb.append("class CreateTranslationMemorySegmentRequest {\n");
163 
164     sb.append("    tmSegId: ").append(toIndentedString(tmSegId)).append("\n");
165     sb.append("    source: ").append(toIndentedString(source)).append("\n");
166     sb.append("    target: ").append(toIndentedString(target)).append("\n");
167     sb.append("    docId: ").append(toIndentedString(docId)).append("\n");
168     sb.append("    docFileName: ").append(toIndentedString(docFileName)).append("\n");
169     sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
170     sb.append("}");
171     return sb.toString();
172   }
173 
174   /**
175    * Convert the given object to string with each line indented by 4 spaces
176    * (except the first line).
177    */
178   private String toIndentedString(Object o) {
179     if (o == null) {
180       return "null";
181     }
182     return o.toString().replace("\n", "\n    ");
183   }
184 }