com.shell.apitest.models.ErrorDetails Maven / Gradle / Ivy
/*
* ShellCardManagementAPIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.shell.apitest.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for ErrorDetails type.
*/
public class ErrorDetails {
private String code;
private String title;
private String detail;
private Object additionalInfo;
/**
* Default constructor.
*/
public ErrorDetails() {
}
/**
* Initialization constructor.
* @param code String value for code.
* @param title String value for title.
* @param detail String value for detail.
* @param additionalInfo Object value for additionalInfo.
*/
public ErrorDetails(
String code,
String title,
String detail,
Object additionalInfo) {
this.code = code;
this.title = title;
this.detail = detail;
this.additionalInfo = additionalInfo;
}
/**
* Getter for Code.
* Error code representing the error encountered
* @return Returns the String
*/
@JsonGetter("Code")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getCode() {
return code;
}
/**
* Setter for Code.
* Error code representing the error encountered
* @param code Value for String
*/
@JsonSetter("Code")
public void setCode(String code) {
this.code = code;
}
/**
* Getter for Title.
* Error type description
* @return Returns the String
*/
@JsonGetter("Title")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getTitle() {
return title;
}
/**
* Setter for Title.
* Error type description
* @param title Value for String
*/
@JsonSetter("Title")
public void setTitle(String title) {
this.title = title;
}
/**
* Getter for Detail.
* Detailed inforamtion about the error
* @return Returns the String
*/
@JsonGetter("Detail")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getDetail() {
return detail;
}
/**
* Setter for Detail.
* Detailed inforamtion about the error
* @param detail Value for String
*/
@JsonSetter("Detail")
public void setDetail(String detail) {
this.detail = detail;
}
/**
* Getter for AdditionalInfo.
* Applicable when more details related to error to be returned
* @return Returns the Object
*/
@JsonGetter("AdditionalInfo")
@JsonInclude(JsonInclude.Include.NON_NULL)
public Object getAdditionalInfo() {
return additionalInfo;
}
/**
* Setter for AdditionalInfo.
* Applicable when more details related to error to be returned
* @param additionalInfo Value for Object
*/
@JsonSetter("AdditionalInfo")
public void setAdditionalInfo(Object additionalInfo) {
this.additionalInfo = additionalInfo;
}
/**
* Converts this ErrorDetails into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "ErrorDetails [" + "code=" + code + ", title=" + title + ", detail=" + detail
+ ", additionalInfo=" + additionalInfo + "]";
}
/**
* Builds a new {@link ErrorDetails.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link ErrorDetails.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.code(getCode())
.title(getTitle())
.detail(getDetail())
.additionalInfo(getAdditionalInfo());
return builder;
}
/**
* Class to build instances of {@link ErrorDetails}.
*/
public static class Builder {
private String code;
private String title;
private String detail;
private Object additionalInfo;
/**
* Setter for code.
* @param code String value for code.
* @return Builder
*/
public Builder code(String code) {
this.code = code;
return this;
}
/**
* Setter for title.
* @param title String value for title.
* @return Builder
*/
public Builder title(String title) {
this.title = title;
return this;
}
/**
* Setter for detail.
* @param detail String value for detail.
* @return Builder
*/
public Builder detail(String detail) {
this.detail = detail;
return this;
}
/**
* Setter for additionalInfo.
* @param additionalInfo Object value for additionalInfo.
* @return Builder
*/
public Builder additionalInfo(Object additionalInfo) {
this.additionalInfo = additionalInfo;
return this;
}
/**
* Builds a new {@link ErrorDetails} object using the set fields.
* @return {@link ErrorDetails}
*/
public ErrorDetails build() {
return new ErrorDetails(code, title, detail, additionalInfo);
}
}
}