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 UpdateDocumentSegmentRequest {
13    @JsonProperty("target")
14    private LayeredTextX target;
15  
16    @JsonProperty("origin")
17    private Origin origin = Origin.HT;
18  
19    @JsonProperty("user_id")
20    private UUID userId;
21  
22    /**
23     **/
24    public UpdateDocumentSegmentRequest target(LayeredTextX target) {
25      this.target = target;
26      return this;
27    }
28  
29    @ApiModelProperty(required = true, value = "")
30    @JsonProperty("target")
31    public LayeredTextX getTarget() {
32      return target;
33    }
34  
35    public void setTarget(LayeredTextX target) {
36      this.target = target;
37    }
38  
39    /**
40     **/
41    public UpdateDocumentSegmentRequest origin(Origin origin) {
42      this.origin = origin;
43      return this;
44    }
45  
46    @ApiModelProperty(required = true, value = "")
47    @JsonProperty("origin")
48    public Origin getOrigin() {
49      return origin;
50    }
51  
52    public void setOrigin(Origin origin) {
53      this.origin = origin;
54    }
55  
56    /**
57     * UUID of the user updating the document segment.
58     **/
59    public UpdateDocumentSegmentRequest userId(UUID userId) {
60      this.userId = userId;
61      return this;
62    }
63  
64    @ApiModelProperty(required = true, value = "UUID of the user updating the document segment.")
65    @JsonProperty("user_id")
66    public UUID getUserId() {
67      return userId;
68    }
69  
70    public void setUserId(UUID userId) {
71      this.userId = userId;
72    }
73  
74    @Override
75    public boolean equals(Object o) {
76      if (this == o) {
77        return true;
78      }
79      if (o == null || getClass() != o.getClass()) {
80        return false;
81      }
82      UpdateDocumentSegmentRequest updateDocumentSegmentRequest = (UpdateDocumentSegmentRequest) o;
83      return Objects.equals(target, updateDocumentSegmentRequest.target) &&
84          Objects.equals(origin, updateDocumentSegmentRequest.origin) &&
85          Objects.equals(userId, updateDocumentSegmentRequest.userId);
86    }
87  
88    @Override
89    public int hashCode() {
90      return Objects.hash(target, origin, userId);
91    }
92  
93    @Override
94    public String toString() {
95      StringBuilder sb = new StringBuilder();
96      sb.append("class UpdateDocumentSegmentRequest {\n");
97  
98      sb.append("    target: ").append(toIndentedString(target)).append("\n");
99      sb.append("    origin: ").append(toIndentedString(origin)).append("\n");
100     sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
101     sb.append("}");
102     return sb.toString();
103   }
104 
105   /**
106    * Convert the given object to string with each line indented by 4 spaces
107    * (except the first line).
108    */
109   private String toIndentedString(Object o) {
110     if (o == null) {
111       return "null";
112     }
113     return o.toString().replace("\n", "\n    ");
114   }
115 }