openapitools.model.Problem Maven / Gradle / Ivy
/*
* Product Base Definitions
* This component represents the Open API interface of the accounting service.
*
* The version of the OpenAPI document: 0.0.1
* 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 openapitools.model;
import java.util.Objects;
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 java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import openapitools.JSON;
/**
* Problem
*/
@JsonPropertyOrder({
Problem.JSON_PROPERTY_TITLE,
Problem.JSON_PROPERTY_STATUS,
Problem.JSON_PROPERTY_TYPE,
Problem.JSON_PROPERTY_DETAIL,
Problem.JSON_PROPERTY_INSTANCE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
public class Problem {
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_STATUS = "status";
private Integer status;
public static final String JSON_PROPERTY_TYPE = "type";
private String type;
public static final String JSON_PROPERTY_DETAIL = "detail";
private String detail;
public static final String JSON_PROPERTY_INSTANCE = "instance";
private String instance;
public Problem() {
}
public Problem title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTitle() {
return title;
}
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTitle(String title) {
this.title = title;
}
public Problem status(Integer status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStatus(Integer status) {
this.status = status;
}
public Problem type(String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setType(String type) {
this.type = type;
}
public Problem detail(String detail) {
this.detail = detail;
return this;
}
/**
* Get detail
* @return detail
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DETAIL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDetail() {
return detail;
}
@JsonProperty(JSON_PROPERTY_DETAIL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDetail(String detail) {
this.detail = detail;
}
public Problem instance(String instance) {
this.instance = instance;
return this;
}
/**
* Get instance
* @return instance
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_INSTANCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getInstance() {
return instance;
}
@JsonProperty(JSON_PROPERTY_INSTANCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setInstance(String instance) {
this.instance = instance;
}
/**
* Return true if this Problem object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Problem problem = (Problem) o;
return Objects.equals(this.title, problem.title) &&
Objects.equals(this.status, problem.status) &&
Objects.equals(this.type, problem.type) &&
Objects.equals(this.detail, problem.detail) &&
Objects.equals(this.instance, problem.instance);
}
@Override
public int hashCode() {
return Objects.hash(title, status, type, detail, instance);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Problem {\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
sb.append(" instance: ").append(toIndentedString(instance)).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 ");
}
}