|
| 1 | +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost |
| 2 | +// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. |
| 3 | + |
| 4 | +package com.algolia.model.search; |
| 5 | + |
| 6 | +import com.fasterxml.jackson.annotation.*; |
| 7 | +import com.fasterxml.jackson.databind.annotation.*; |
| 8 | +import java.util.HashMap; |
| 9 | +import java.util.Map; |
| 10 | +import java.util.Objects; |
| 11 | + |
| 12 | +/** An event describe a step of the task execution flow.. */ |
| 13 | +public class Event { |
| 14 | + |
| 15 | + @JsonProperty("eventID") |
| 16 | + private String eventID; |
| 17 | + |
| 18 | + @JsonProperty("runID") |
| 19 | + private String runID; |
| 20 | + |
| 21 | + @JsonProperty("status") |
| 22 | + private EventStatus status; |
| 23 | + |
| 24 | + @JsonProperty("type") |
| 25 | + private EventType type; |
| 26 | + |
| 27 | + @JsonProperty("batchSize") |
| 28 | + private Integer batchSize; |
| 29 | + |
| 30 | + @JsonProperty("data") |
| 31 | + private Map<String, Object> data; |
| 32 | + |
| 33 | + @JsonProperty("publishedAt") |
| 34 | + private String publishedAt; |
| 35 | + |
| 36 | + public Event setEventID(String eventID) { |
| 37 | + this.eventID = eventID; |
| 38 | + return this; |
| 39 | + } |
| 40 | + |
| 41 | + /** Universally unique identifier (UUID) of an event. */ |
| 42 | + @javax.annotation.Nonnull |
| 43 | + public String getEventID() { |
| 44 | + return eventID; |
| 45 | + } |
| 46 | + |
| 47 | + public Event setRunID(String runID) { |
| 48 | + this.runID = runID; |
| 49 | + return this; |
| 50 | + } |
| 51 | + |
| 52 | + /** Universally unique identifier (UUID) of a task run. */ |
| 53 | + @javax.annotation.Nonnull |
| 54 | + public String getRunID() { |
| 55 | + return runID; |
| 56 | + } |
| 57 | + |
| 58 | + public Event setStatus(EventStatus status) { |
| 59 | + this.status = status; |
| 60 | + return this; |
| 61 | + } |
| 62 | + |
| 63 | + /** Get status */ |
| 64 | + @javax.annotation.Nullable |
| 65 | + public EventStatus getStatus() { |
| 66 | + return status; |
| 67 | + } |
| 68 | + |
| 69 | + public Event setType(EventType type) { |
| 70 | + this.type = type; |
| 71 | + return this; |
| 72 | + } |
| 73 | + |
| 74 | + /** Get type */ |
| 75 | + @javax.annotation.Nonnull |
| 76 | + public EventType getType() { |
| 77 | + return type; |
| 78 | + } |
| 79 | + |
| 80 | + public Event setBatchSize(Integer batchSize) { |
| 81 | + this.batchSize = batchSize; |
| 82 | + return this; |
| 83 | + } |
| 84 | + |
| 85 | + /** The extracted record batch size. minimum: 0 */ |
| 86 | + @javax.annotation.Nonnull |
| 87 | + public Integer getBatchSize() { |
| 88 | + return batchSize; |
| 89 | + } |
| 90 | + |
| 91 | + public Event setData(Map<String, Object> data) { |
| 92 | + this.data = data; |
| 93 | + return this; |
| 94 | + } |
| 95 | + |
| 96 | + public Event putData(String key, Object dataItem) { |
| 97 | + if (this.data == null) { |
| 98 | + this.data = new HashMap<>(); |
| 99 | + } |
| 100 | + this.data.put(key, dataItem); |
| 101 | + return this; |
| 102 | + } |
| 103 | + |
| 104 | + /** Get data */ |
| 105 | + @javax.annotation.Nullable |
| 106 | + public Map<String, Object> getData() { |
| 107 | + return data; |
| 108 | + } |
| 109 | + |
| 110 | + public Event setPublishedAt(String publishedAt) { |
| 111 | + this.publishedAt = publishedAt; |
| 112 | + return this; |
| 113 | + } |
| 114 | + |
| 115 | + /** Date of publish RFC 3339 format. */ |
| 116 | + @javax.annotation.Nonnull |
| 117 | + public String getPublishedAt() { |
| 118 | + return publishedAt; |
| 119 | + } |
| 120 | + |
| 121 | + @Override |
| 122 | + public boolean equals(Object o) { |
| 123 | + if (this == o) { |
| 124 | + return true; |
| 125 | + } |
| 126 | + if (o == null || getClass() != o.getClass()) { |
| 127 | + return false; |
| 128 | + } |
| 129 | + Event event = (Event) o; |
| 130 | + return ( |
| 131 | + Objects.equals(this.eventID, event.eventID) && |
| 132 | + Objects.equals(this.runID, event.runID) && |
| 133 | + Objects.equals(this.status, event.status) && |
| 134 | + Objects.equals(this.type, event.type) && |
| 135 | + Objects.equals(this.batchSize, event.batchSize) && |
| 136 | + Objects.equals(this.data, event.data) && |
| 137 | + Objects.equals(this.publishedAt, event.publishedAt) |
| 138 | + ); |
| 139 | + } |
| 140 | + |
| 141 | + @Override |
| 142 | + public int hashCode() { |
| 143 | + return Objects.hash(eventID, runID, status, type, batchSize, data, publishedAt); |
| 144 | + } |
| 145 | + |
| 146 | + @Override |
| 147 | + public String toString() { |
| 148 | + StringBuilder sb = new StringBuilder(); |
| 149 | + sb.append("class Event {\n"); |
| 150 | + sb.append(" eventID: ").append(toIndentedString(eventID)).append("\n"); |
| 151 | + sb.append(" runID: ").append(toIndentedString(runID)).append("\n"); |
| 152 | + sb.append(" status: ").append(toIndentedString(status)).append("\n"); |
| 153 | + sb.append(" type: ").append(toIndentedString(type)).append("\n"); |
| 154 | + sb.append(" batchSize: ").append(toIndentedString(batchSize)).append("\n"); |
| 155 | + sb.append(" data: ").append(toIndentedString(data)).append("\n"); |
| 156 | + sb.append(" publishedAt: ").append(toIndentedString(publishedAt)).append("\n"); |
| 157 | + sb.append("}"); |
| 158 | + return sb.toString(); |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 163 | + */ |
| 164 | + private String toIndentedString(Object o) { |
| 165 | + if (o == null) { |
| 166 | + return "null"; |
| 167 | + } |
| 168 | + return o.toString().replace("\n", "\n "); |
| 169 | + } |
| 170 | +} |
0 commit comments