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 CreateDocumentSegmentRequest {
13 @JsonProperty("doc_seg_id")
14 private UUID docSegId;
15
16 @JsonProperty("source")
17 private LayeredTextX source;
18
19 @JsonProperty("target")
20 private LayeredTextX target;
21
22 @JsonProperty("position")
23 private Long position;
24
25 @JsonProperty("origin")
26 private Origin origin = Origin.HT;
27
28 @JsonProperty("user_id")
29 private UUID userId;
30
31
32
33
34 public CreateDocumentSegmentRequest docSegId(UUID docSegId) {
35 this.docSegId = docSegId;
36 return this;
37 }
38
39 @ApiModelProperty(required = true, value = "UUID of the document segment")
40 @JsonProperty("doc_seg_id")
41 public UUID getDocSegId() {
42 return docSegId;
43 }
44
45 public void setDocSegId(UUID docSegId) {
46 this.docSegId = docSegId;
47 }
48
49
50
51 public CreateDocumentSegmentRequest 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 CreateDocumentSegmentRequest 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
85
86 public CreateDocumentSegmentRequest position(Long position) {
87 this.position = position;
88 return this;
89 }
90
91 @ApiModelProperty(required = true, value = "Index in the document (1-based)")
92 @JsonProperty("position")
93 public Long getPosition() {
94 return position;
95 }
96
97 public void setPosition(Long position) {
98 this.position = position;
99 }
100
101
102
103 public CreateDocumentSegmentRequest origin(Origin origin) {
104 this.origin = origin;
105 return this;
106 }
107
108 @ApiModelProperty(required = true, value = "")
109 @JsonProperty("origin")
110 public Origin getOrigin() {
111 return origin;
112 }
113
114 public void setOrigin(Origin origin) {
115 this.origin = origin;
116 }
117
118
119
120
121 public CreateDocumentSegmentRequest userId(UUID userId) {
122 this.userId = userId;
123 return this;
124 }
125
126 @ApiModelProperty(required = true, value = "UUID of the user creating the document segment.")
127 @JsonProperty("user_id")
128 public UUID getUserId() {
129 return userId;
130 }
131
132 public void setUserId(UUID userId) {
133 this.userId = userId;
134 }
135
136 @Override
137 public boolean equals(Object o) {
138 if (this == o) {
139 return true;
140 }
141 if (o == null || getClass() != o.getClass()) {
142 return false;
143 }
144 CreateDocumentSegmentRequest createDocumentSegmentRequest = (CreateDocumentSegmentRequest) o;
145 return Objects.equals(docSegId, createDocumentSegmentRequest.docSegId) &&
146 Objects.equals(source, createDocumentSegmentRequest.source) &&
147 Objects.equals(target, createDocumentSegmentRequest.target) &&
148 Objects.equals(position, createDocumentSegmentRequest.position) &&
149 Objects.equals(origin, createDocumentSegmentRequest.origin) &&
150 Objects.equals(userId, createDocumentSegmentRequest.userId);
151 }
152
153 @Override
154 public int hashCode() {
155 return Objects.hash(docSegId, source, target, position, origin, userId);
156 }
157
158 @Override
159 public String toString() {
160 StringBuilder sb = new StringBuilder();
161 sb.append("class CreateDocumentSegmentRequest {\n");
162
163 sb.append(" docSegId: ").append(toIndentedString(docSegId)).append("\n");
164 sb.append(" source: ").append(toIndentedString(source)).append("\n");
165 sb.append(" target: ").append(toIndentedString(target)).append("\n");
166 sb.append(" position: ").append(toIndentedString(position)).append("\n");
167 sb.append(" origin: ").append(toIndentedString(origin)).append("\n");
168 sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
169 sb.append("}");
170 return sb.toString();
171 }
172
173
174
175
176
177 private String toIndentedString(Object o) {
178 if (o == null) {
179 return "null";
180 }
181 return o.toString().replace("\n", "\n ");
182 }
183 }