
com.xero.models.accounting.Error Maven / Gradle / Ivy
/*
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* 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.xero.models.accounting;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** Error */
public class Error {
StringUtil util = new StringUtil();
@JsonProperty("ErrorNumber")
private Integer errorNumber;
@JsonProperty("Type")
private String type;
@JsonProperty("Message")
private String message;
@JsonProperty("Elements")
private List elements = new ArrayList();
/**
* Exception number
*
* @param errorNumber Integer
* @return Error
*/
public Error errorNumber(Integer errorNumber) {
this.errorNumber = errorNumber;
return this;
}
/**
* Exception number
*
* @return errorNumber
*/
@ApiModelProperty(value = "Exception number")
/**
* Exception number
*
* @return errorNumber Integer
*/
public Integer getErrorNumber() {
return errorNumber;
}
/**
* Exception number
*
* @param errorNumber Integer
*/
public void setErrorNumber(Integer errorNumber) {
this.errorNumber = errorNumber;
}
/**
* Exception type
*
* @param type String
* @return Error
*/
public Error type(String type) {
this.type = type;
return this;
}
/**
* Exception type
*
* @return type
*/
@ApiModelProperty(value = "Exception type")
/**
* Exception type
*
* @return type String
*/
public String getType() {
return type;
}
/**
* Exception type
*
* @param type String
*/
public void setType(String type) {
this.type = type;
}
/**
* Exception message
*
* @param message String
* @return Error
*/
public Error message(String message) {
this.message = message;
return this;
}
/**
* Exception message
*
* @return message
*/
@ApiModelProperty(value = "Exception message")
/**
* Exception message
*
* @return message String
*/
public String getMessage() {
return message;
}
/**
* Exception message
*
* @param message String
*/
public void setMessage(String message) {
this.message = message;
}
/**
* Array of Elements of validation Errors
*
* @param elements List<Element>
* @return Error
*/
public Error elements(List elements) {
this.elements = elements;
return this;
}
/**
* Array of Elements of validation Errors
*
* @param elementsItem Element
* @return Error
*/
public Error addElementsItem(Element elementsItem) {
if (this.elements == null) {
this.elements = new ArrayList();
}
this.elements.add(elementsItem);
return this;
}
/**
* Array of Elements of validation Errors
*
* @return elements
*/
@ApiModelProperty(value = "Array of Elements of validation Errors")
/**
* Array of Elements of validation Errors
*
* @return elements List
*/
public List getElements() {
return elements;
}
/**
* Array of Elements of validation Errors
*
* @param elements List<Element>
*/
public void setElements(List elements) {
this.elements = elements;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Error error = (Error) o;
return Objects.equals(this.errorNumber, error.errorNumber)
&& Objects.equals(this.type, error.type)
&& Objects.equals(this.message, error.message)
&& Objects.equals(this.elements, error.elements);
}
@Override
public int hashCode() {
return Objects.hash(errorNumber, type, message, elements);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Error {\n");
sb.append(" errorNumber: ").append(toIndentedString(errorNumber)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" elements: ").append(toIndentedString(elements)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy