|
| 1 | +package com.algolia.model; |
| 2 | + |
| 3 | +import com.google.gson.annotations.SerializedName; |
| 4 | +import io.swagger.annotations.ApiModelProperty; |
| 5 | +import java.time.OffsetDateTime; |
| 6 | +import java.util.Objects; |
| 7 | + |
| 8 | +/** AddApiKeyResponse */ |
| 9 | +public class AddApiKeyResponse { |
| 10 | + |
| 11 | + public static final String SERIALIZED_NAME_KEY = "key"; |
| 12 | + |
| 13 | + @SerializedName(SERIALIZED_NAME_KEY) |
| 14 | + private String key; |
| 15 | + |
| 16 | + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; |
| 17 | + |
| 18 | + @SerializedName(SERIALIZED_NAME_CREATED_AT) |
| 19 | + private OffsetDateTime createdAt; |
| 20 | + |
| 21 | + public AddApiKeyResponse key(String key) { |
| 22 | + this.key = key; |
| 23 | + return this; |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * Key string. |
| 28 | + * |
| 29 | + * @return key |
| 30 | + */ |
| 31 | + @javax.annotation.Nonnull |
| 32 | + @ApiModelProperty(required = true, value = "Key string.") |
| 33 | + public String getKey() { |
| 34 | + return key; |
| 35 | + } |
| 36 | + |
| 37 | + public void setKey(String key) { |
| 38 | + this.key = key; |
| 39 | + } |
| 40 | + |
| 41 | + public AddApiKeyResponse createdAt(OffsetDateTime createdAt) { |
| 42 | + this.createdAt = createdAt; |
| 43 | + return this; |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * Date of creation (ISO-8601 format). |
| 48 | + * |
| 49 | + * @return createdAt |
| 50 | + */ |
| 51 | + @javax.annotation.Nonnull |
| 52 | + @ApiModelProperty( |
| 53 | + required = true, |
| 54 | + value = "Date of creation (ISO-8601 format)." |
| 55 | + ) |
| 56 | + public OffsetDateTime getCreatedAt() { |
| 57 | + return createdAt; |
| 58 | + } |
| 59 | + |
| 60 | + public void setCreatedAt(OffsetDateTime createdAt) { |
| 61 | + this.createdAt = createdAt; |
| 62 | + } |
| 63 | + |
| 64 | + @Override |
| 65 | + public boolean equals(Object o) { |
| 66 | + if (this == o) { |
| 67 | + return true; |
| 68 | + } |
| 69 | + if (o == null || getClass() != o.getClass()) { |
| 70 | + return false; |
| 71 | + } |
| 72 | + AddApiKeyResponse addApiKeyResponse = (AddApiKeyResponse) o; |
| 73 | + return ( |
| 74 | + Objects.equals(this.key, addApiKeyResponse.key) && |
| 75 | + Objects.equals(this.createdAt, addApiKeyResponse.createdAt) |
| 76 | + ); |
| 77 | + } |
| 78 | + |
| 79 | + @Override |
| 80 | + public int hashCode() { |
| 81 | + return Objects.hash(key, createdAt); |
| 82 | + } |
| 83 | + |
| 84 | + @Override |
| 85 | + public String toString() { |
| 86 | + StringBuilder sb = new StringBuilder(); |
| 87 | + sb.append("class AddApiKeyResponse {\n"); |
| 88 | + sb.append(" key: ").append(toIndentedString(key)).append("\n"); |
| 89 | + sb |
| 90 | + .append(" createdAt: ") |
| 91 | + .append(toIndentedString(createdAt)) |
| 92 | + .append("\n"); |
| 93 | + sb.append("}"); |
| 94 | + return sb.toString(); |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 99 | + */ |
| 100 | + private String toIndentedString(Object o) { |
| 101 | + if (o == null) { |
| 102 | + return "null"; |
| 103 | + } |
| 104 | + return o.toString().replace("\n", "\n "); |
| 105 | + } |
| 106 | +} |
0 commit comments