com.openshift.cloud.api.kas.models.Error Maven / Gradle / Ivy
/*
* Kafka Management API
* Kafka Management API is a REST API to manage Kafka instances
*
* The version of the OpenAPI document: 1.14.0
* Contact: [email protected]
*
* 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.openshift.cloud.api.kas.models;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Error
*/
@JsonPropertyOrder({
Error.JSON_PROPERTY_REASON,
Error.JSON_PROPERTY_OPERATION_ID,
Error.JSON_PROPERTY_ID,
Error.JSON_PROPERTY_KIND,
Error.JSON_PROPERTY_HREF,
Error.JSON_PROPERTY_CODE
})
@JsonTypeName("Error")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Error {
public static final String JSON_PROPERTY_REASON = "reason";
private String reason;
public static final String JSON_PROPERTY_OPERATION_ID = "operation_id";
private String operationId;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_KIND = "kind";
private String kind;
public static final String JSON_PROPERTY_HREF = "href";
private String href;
public static final String JSON_PROPERTY_CODE = "code";
private String code;
public Error() {
}
public Error reason(String reason) {
this.reason = reason;
return this;
}
/**
* Human-readable description of the error. Intended for human consumption
* @return reason
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Human-readable description of the error. Intended for human consumption")
@JsonProperty(JSON_PROPERTY_REASON)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getReason() {
return reason;
}
@JsonProperty(JSON_PROPERTY_REASON)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setReason(String reason) {
this.reason = reason;
}
public Error operationId(String operationId) {
this.operationId = operationId;
return this;
}
/**
* Relatively unique operation ID of the request associated to the error
* @return operationId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Relatively unique operation ID of the request associated to the error")
@JsonProperty(JSON_PROPERTY_OPERATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getOperationId() {
return operationId;
}
@JsonProperty(JSON_PROPERTY_OPERATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOperationId(String operationId) {
this.operationId = operationId;
}
public Error id(String id) {
this.id = id;
return this;
}
/**
* The unique and immutable identifier of the resource
* @return id
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The unique and immutable identifier of the resource")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setId(String id) {
this.id = id;
}
public Error kind(String kind) {
this.kind = kind;
return this;
}
/**
* The kind of the resource
* @return kind
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The kind of the resource")
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getKind() {
return kind;
}
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setKind(String kind) {
this.kind = kind;
}
public Error href(String href) {
this.href = href;
return this;
}
/**
* The absolute path of the resource
* @return href
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The absolute path of the resource")
@JsonProperty(JSON_PROPERTY_HREF)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getHref() {
return href;
}
@JsonProperty(JSON_PROPERTY_HREF)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setHref(String href) {
this.href = href;
}
public Error code(String code) {
this.code = code;
return this;
}
/**
* Code of the error
* @return code
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Code of the error")
@JsonProperty(JSON_PROPERTY_CODE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getCode() {
return code;
}
@JsonProperty(JSON_PROPERTY_CODE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCode(String code) {
this.code = code;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Error error = (Error) o;
return Objects.equals(this.reason, error.reason) &&
Objects.equals(this.operationId, error.operationId) &&
Objects.equals(this.id, error.id) &&
Objects.equals(this.kind, error.kind) &&
Objects.equals(this.href, error.href) &&
Objects.equals(this.code, error.code);
}
@Override
public int hashCode() {
return Objects.hash(reason, operationId, id, kind, href, code);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Error {\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" operationId: ").append(toIndentedString(operationId)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append(" href: ").append(toIndentedString(href)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}