org.openapitools.client.model.ExceptionDto Maven / Gradle / Ivy
/*
* Camunda Platform REST API
* OpenApi Spec for Camunda Platform REST API.
*
* The version of the OpenAPI document: 7.19.0-alpha2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.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.math.BigDecimal;
/**
* ExceptionDto
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-12-12T10:12:39.945259+01:00[Europe/Berlin]")
public class ExceptionDto {
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;
public static final String SERIALIZED_NAME_MESSAGE = "message";
@SerializedName(SERIALIZED_NAME_MESSAGE)
private String message;
public static final String SERIALIZED_NAME_CODE = "code";
@SerializedName(SERIALIZED_NAME_CODE)
private BigDecimal code;
public ExceptionDto type(String type) {
this.type = type;
return this;
}
/**
* An exception class indicating the occurred error.
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An exception class indicating the occurred error.")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ExceptionDto message(String message) {
this.message = message;
return this;
}
/**
* A detailed message of the error.
* @return message
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "A detailed message of the error.")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public ExceptionDto code(BigDecimal code) {
this.code = code;
return this;
}
/**
* The code allows your client application to identify the error in an automated fashion. You can look up the meaning of all built-in codes and learn how to add custom codes in the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/error-handling/#exception-codes).
* @return code
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The code allows your client application to identify the error in an automated fashion. You can look up the meaning of all built-in codes and learn how to add custom codes in the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/error-handling/#exception-codes).")
public BigDecimal getCode() {
return code;
}
public void setCode(BigDecimal code) {
this.code = code;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExceptionDto exceptionDto = (ExceptionDto) o;
return Objects.equals(this.type, exceptionDto.type) &&
Objects.equals(this.message, exceptionDto.message) &&
Objects.equals(this.code, exceptionDto.code);
}
@Override
public int hashCode() {
return Objects.hash(type, message, code);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ExceptionDto {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}