com.ziqni.admin.sdk.model.Error Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ziqni-admin-sdk Show documentation
Show all versions of ziqni-admin-sdk Show documentation
ZIQNI Admin SDK Java Client
/*
* ZIQNI Admin API
* Ziqni Application Services are used to manage and configure spaces. Change log: 2024-02-27 Added rewards reduced to the LeaderboardEntry response
*
* The version of the OpenAPI document: 3.0.17
* 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.ziqni.admin.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
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 com.ziqni.admin.sdk.model.ErrorDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Error
*/
@JsonPropertyOrder({
Error.JSON_PROPERTY_MODEL_ID,
Error.JSON_PROPERTY_ERROR_CODE,
Error.JSON_PROPERTY_MESSAGE,
Error.JSON_PROPERTY_ERROR_AT,
Error.JSON_PROPERTY_DETAIL
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Error {
public static final String JSON_PROPERTY_MODEL_ID = "modelId";
private String modelId;
public static final String JSON_PROPERTY_ERROR_CODE = "errorCode";
private Integer errorCode;
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
public static final String JSON_PROPERTY_ERROR_AT = "errorAt";
private Integer errorAt;
public static final String JSON_PROPERTY_DETAIL = "detail";
private List detail = null;
public Error modelId(String modelId) {
this.modelId = modelId;
return this;
}
/**
* The identifier of the record this error relates to (This value only gets set if the error could relate to more than one object)
* @return modelId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1234abc", value = "The identifier of the record this error relates to (This value only gets set if the error could relate to more than one object)")
@JsonProperty(JSON_PROPERTY_MODEL_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getModelId() {
return modelId;
}
@JsonProperty(JSON_PROPERTY_MODEL_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setModelId(String modelId) {
this.modelId = modelId;
}
public Error errorCode(Integer errorCode) {
this.errorCode = errorCode;
return this;
}
/**
* A unique system identifier that describes this specific error
* @return errorCode
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "1007", required = true, value = "A unique system identifier that describes this specific error")
@JsonProperty(JSON_PROPERTY_ERROR_CODE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getErrorCode() {
return errorCode;
}
@JsonProperty(JSON_PROPERTY_ERROR_CODE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
public Error message(String message) {
this.message = message;
return this;
}
/**
* The error description
* @return message
**/
@javax.annotation.Nonnull
@ApiModelProperty(example = "The error was caused by an invalid ID being submitted", required = true, value = "The error description")
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getMessage() {
return message;
}
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setMessage(String message) {
this.message = message;
}
public Error errorAt(Integer errorAt) {
this.errorAt = errorAt;
return this;
}
/**
* The object number that returned the error
* @return errorAt
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "53", value = "The object number that returned the error")
@JsonProperty(JSON_PROPERTY_ERROR_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getErrorAt() {
return errorAt;
}
@JsonProperty(JSON_PROPERTY_ERROR_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setErrorAt(Integer errorAt) {
this.errorAt = errorAt;
}
public Error detail(List detail) {
this.detail = detail;
return this;
}
public Error addDetailItem(ErrorDetail detailItem) {
if (this.detail == null) {
this.detail = new ArrayList<>();
}
this.detail.add(detailItem);
return this;
}
/**
* Get detail
* @return detail
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DETAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getDetail() {
return detail;
}
@JsonProperty(JSON_PROPERTY_DETAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDetail(List detail) {
this.detail = detail;
}
/**
* Return true if this Error object is equal to o.
*/
@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.modelId, error.modelId) &&
Objects.equals(this.errorCode, error.errorCode) &&
Objects.equals(this.message, error.message) &&
Objects.equals(this.errorAt, error.errorAt) &&
Objects.equals(this.detail, error.detail);
}
@Override
public int hashCode() {
return Objects.hash(modelId, errorCode, message, errorAt, detail);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Error {\n");
sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n");
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" errorAt: ").append(toIndentedString(errorAt)).append("\n");
sb.append(" detail: ").append(toIndentedString(detail)).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 - 2025 Weber Informatics LLC | Privacy Policy