View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.Objects;
4   
5   import com.fasterxml.jackson.annotation.JsonProperty;
6   
7   import io.swagger.annotations.ApiModel;
8   import io.swagger.annotations.ApiModelProperty;
9   
10  /**
11   * Response code and message.
12   **/
13  
14  @ApiModel(description = "Response code and message.")
15  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
16  public class ResponseCodeMessage {
17    @JsonProperty("code")
18    private Integer code = 200;
19  
20    @JsonProperty("message")
21    private String message;
22  
23    /**
24     * minimum: 100
25     * maximum: 600
26     **/
27    public ResponseCodeMessage code(Integer code) {
28      this.code = code;
29      return this;
30    }
31  
32    @ApiModelProperty(required = true, value = "")
33    @JsonProperty("code")
34    public Integer getCode() {
35      return code;
36    }
37  
38    public void setCode(Integer code) {
39      this.code = code;
40    }
41  
42    /**
43     **/
44    public ResponseCodeMessage message(String message) {
45      this.message = message;
46      return this;
47    }
48  
49    @ApiModelProperty(required = true, value = "")
50    @JsonProperty("message")
51    public String getMessage() {
52      return message;
53    }
54  
55    public void setMessage(String message) {
56      this.message = message;
57    }
58  
59    @Override
60    public boolean equals(Object o) {
61      if (this == o) {
62        return true;
63      }
64      if (o == null || getClass() != o.getClass()) {
65        return false;
66      }
67      ResponseCodeMessage responseCodeMessage = (ResponseCodeMessage) o;
68      return Objects.equals(code, responseCodeMessage.code) &&
69          Objects.equals(message, responseCodeMessage.message);
70    }
71  
72    @Override
73    public int hashCode() {
74      return Objects.hash(code, message);
75    }
76  
77    @Override
78    public String toString() {
79      StringBuilder sb = new StringBuilder();
80      sb.append("class ResponseCodeMessage {\n");
81  
82      sb.append("    code: ").append(toIndentedString(code)).append("\n");
83      sb.append("    message: ").append(toIndentedString(message)).append("\n");
84      sb.append("}");
85      return sb.toString();
86    }
87  
88    /**
89     * Convert the given object to string with each line indented by 4 spaces
90     * (except the first line).
91     */
92    private String toIndentedString(Object o) {
93      if (o == null) {
94        return "null";
95      }
96      return o.toString().replace("\n", "\n    ");
97    }
98  }