com.plaid.client.model.IncidentUpdate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plaid-java Show documentation
Show all versions of plaid-java Show documentation
Bindings for the Plaid (plaid.com) API.
/*
* The Plaid API
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* The version of the OpenAPI document: 2020-09-14_1.503.5
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.plaid.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;
/**
* An update on the health incident
*/
@ApiModel(description = "An update on the health incident")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-03-28T21:00:55.745394Z[Etc/UTC]")
public class IncidentUpdate {
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
/**
* The status of the incident.
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
INVESTIGATING("INVESTIGATING"),
IDENTIFIED("IDENTIFIED"),
SCHEDULED("SCHEDULED"),
RESOLVED("RESOLVED"),
UNKNOWN("UNKNOWN");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public static final String SERIALIZED_NAME_UPDATED_DATE = "updated_date";
@SerializedName(SERIALIZED_NAME_UPDATED_DATE)
private OffsetDateTime updatedDate;
public IncidentUpdate description(String description) {
this.description = description;
return this;
}
/**
* The content of the update.
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The content of the update.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public IncidentUpdate status(StatusEnum status) {
this.status = status;
return this;
}
/**
* The status of the incident.
* @return status
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The status of the incident.")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public IncidentUpdate updatedDate(OffsetDateTime updatedDate) {
this.updatedDate = updatedDate;
return this;
}
/**
* The date when the update was published, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format, e.g. `\"2020-10-30T15:26:48Z\"`.
* @return updatedDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The date when the update was published, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format, e.g. `\"2020-10-30T15:26:48Z\"`.")
public OffsetDateTime getUpdatedDate() {
return updatedDate;
}
public void setUpdatedDate(OffsetDateTime updatedDate) {
this.updatedDate = updatedDate;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IncidentUpdate incidentUpdate = (IncidentUpdate) o;
return Objects.equals(this.description, incidentUpdate.description) &&
Objects.equals(this.status, incidentUpdate.status) &&
Objects.equals(this.updatedDate, incidentUpdate.updatedDate);
}
@Override
public int hashCode() {
return Objects.hash(description, status, updatedDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IncidentUpdate {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" updatedDate: ").append(toIndentedString(updatedDate)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy