com.factset.sdk.IRNNotes.models.ProblemDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of irnnotes Show documentation
Show all versions of irnnotes Show documentation
FactSet SDK for Java - irnnotes
/*
* IRN API v1
* Allows users to extract, create, update and configure IRN data.
*
* The version of the OpenAPI document: 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 com.factset.sdk.IRNNotes.models;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.IRNNotes.JSON;
/**
* ProblemDetails
*/
@JsonPropertyOrder({
ProblemDetails.JSON_PROPERTY_TYPE,
ProblemDetails.JSON_PROPERTY_TITLE,
ProblemDetails.JSON_PROPERTY_STATUS,
ProblemDetails.JSON_PROPERTY_DETAIL,
ProblemDetails.JSON_PROPERTY_INSTANCE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ProblemDetails implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_TYPE = "type";
private JsonNullable type = JsonNullable.undefined();
public static final String JSON_PROPERTY_TITLE = "title";
private JsonNullable title = JsonNullable.undefined();
public static final String JSON_PROPERTY_STATUS = "status";
private JsonNullable status = JsonNullable.undefined();
public static final String JSON_PROPERTY_DETAIL = "detail";
private JsonNullable detail = JsonNullable.undefined();
public static final String JSON_PROPERTY_INSTANCE = "instance";
private JsonNullable instance = JsonNullable.undefined();
public ProblemDetails() {
}
public ProblemDetails type(String type) {
this.type = JsonNullable.of(type);
return this;
}
/**
* Get type
* @return type
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getType() {
return type.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getType_JsonNullable() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
public void setType_JsonNullable(JsonNullable type) {
this.type = type;
}
public void setType(String type) {
this.type = JsonNullable.of(type);
}
public ProblemDetails title(String title) {
this.title = JsonNullable.of(title);
return this;
}
/**
* Get title
* @return title
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getTitle() {
return title.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getTitle_JsonNullable() {
return title;
}
@JsonProperty(JSON_PROPERTY_TITLE)
public void setTitle_JsonNullable(JsonNullable title) {
this.title = title;
}
public void setTitle(String title) {
this.title = JsonNullable.of(title);
}
public ProblemDetails status(Integer status) {
this.status = JsonNullable.of(status);
return this;
}
/**
* Get status
* @return status
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public Integer getStatus() {
return status.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getStatus_JsonNullable() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
public void setStatus_JsonNullable(JsonNullable status) {
this.status = status;
}
public void setStatus(Integer status) {
this.status = JsonNullable.of(status);
}
public ProblemDetails detail(String detail) {
this.detail = JsonNullable.of(detail);
return this;
}
/**
* Get detail
* @return detail
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getDetail() {
return detail.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DETAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getDetail_JsonNullable() {
return detail;
}
@JsonProperty(JSON_PROPERTY_DETAIL)
public void setDetail_JsonNullable(JsonNullable detail) {
this.detail = detail;
}
public void setDetail(String detail) {
this.detail = JsonNullable.of(detail);
}
public ProblemDetails instance(String instance) {
this.instance = JsonNullable.of(instance);
return this;
}
/**
* Get instance
* @return instance
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getInstance() {
return instance.orElse(null);
}
@JsonProperty(JSON_PROPERTY_INSTANCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getInstance_JsonNullable() {
return instance;
}
@JsonProperty(JSON_PROPERTY_INSTANCE)
public void setInstance_JsonNullable(JsonNullable instance) {
this.instance = instance;
}
public void setInstance(String instance) {
this.instance = JsonNullable.of(instance);
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
*/
@JsonAnySetter
public ProblemDetails putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) property.
*/
@JsonAnyGetter
public Map getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
/**
* Return true if this ProblemDetails object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ProblemDetails problemDetails = (ProblemDetails) o;
return equalsNullable(this.type, problemDetails.type) &&
equalsNullable(this.title, problemDetails.title) &&
equalsNullable(this.status, problemDetails.status) &&
equalsNullable(this.detail, problemDetails.detail) &&
equalsNullable(this.instance, problemDetails.instance)&&
Objects.equals(this.additionalProperties, problemDetails.additionalProperties);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(hashCodeNullable(type), hashCodeNullable(title), hashCodeNullable(status), hashCodeNullable(detail), hashCodeNullable(instance), additionalProperties);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ProblemDetails {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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 ");
}
}