WeatherCondition.java 2.94 KB
Newer Older
EnesKarakas's avatar
EnesKarakas committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package io.swagger.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.*;

/**
 * WeatherCondition
 */
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-06-04T09:41:03.559554872Z[GMT]")

@JsonInclude(Include.NON_NULL)
public class WeatherCondition {
  @JsonProperty("text")
  private String text = null;

  @JsonProperty("icon")
  private String icon = null;

  @JsonProperty("code")
  private Integer code = null;

  public WeatherCondition text(String text) {
    this.text = text;
    return this;
  }

  /**
   * weather text
   * 
   * @return text
   **/
  @Schema(example = "overcast", description = "weather text")
  @NotNull

  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }

  public WeatherCondition icon(String icon) {
    this.icon = icon;
    return this;
  }

  /**
   * current time
   * 
   * @return icon
   **/
  @Schema(example = "//cdn.weatherapi.com/weather/64x64/day/116.png", description = "current time")
  @NotNull

  public String getIcon() {
    return icon;
  }

  public void setIcon(String icon) {
    this.icon = icon;
  }

  public WeatherCondition code(Integer code) {
    this.code = code;
    return this;
  }

  /**
   * updated epoch
   * 
   * @return code
   **/
  @Schema(example = "1003", description = "updated epoch")
  @NotNull

  public Integer getCode() {
    return code;
  }

  public void setCode(Integer code) {
    this.code = code;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WeatherCondition weatherCondition = (WeatherCondition) o;
    return Objects.equals(this.text, weatherCondition.text) &&
        Objects.equals(this.icon, weatherCondition.icon) &&
        Objects.equals(this.code, weatherCondition.code);
  }

  @Override
  public int hashCode() {
    return Objects.hash(text, icon, code);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WeatherCondition {\n");

    sb.append("    text: ").append(toIndentedString(text)).append("\n");
    sb.append("    icon: ").append(toIndentedString(icon)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}