io.camunda.zeebe.management.cluster.ExporterStatus Maven / Gradle / Ivy
package io.camunda.zeebe.management.cluster;
import java.net.URI;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*;
import jakarta.annotation.Generated;
/**
* ExporterStatus
*/
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-02T11:21:27.419777225Z[GMT]", comments = "Generator version: 7.8.0")
public class ExporterStatus {
private String exporterId;
/**
* Status of the exporter
*/
public enum StatusEnum {
ENABLING("ENABLING"),
ENABLED("ENABLED"),
DISABLING("DISABLING"),
DISABLED("DISABLED"),
UNKNOWN("UNKNOWN");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private StatusEnum status;
public ExporterStatus exporterId(String exporterId) {
this.exporterId = exporterId;
return this;
}
/**
* Id of the exporter
* @return exporterId
*/
@Schema(name = "exporterId", description = "Id of the exporter", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("exporterId")
public String getExporterId() {
return exporterId;
}
public void setExporterId(String exporterId) {
this.exporterId = exporterId;
}
public ExporterStatus status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Status of the exporter
* @return status
*/
@Schema(name = "status", example = "ENABLED", description = "Status of the exporter", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExporterStatus exporterStatus = (ExporterStatus) o;
return Objects.equals(this.exporterId, exporterStatus.exporterId) &&
Objects.equals(this.status, exporterStatus.status);
}
@Override
public int hashCode() {
return Objects.hash(exporterId, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ExporterStatus {\n");
sb.append(" exporterId: ").append(toIndentedString(exporterId)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).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 ");
}
}