com.vertexvis.model.Failure Maven / Gradle / Ivy
/*
* Vertex Platform API
* The Vertex distributed cloud rendering platform includes a set of APIs and SDKs, which together allow easily integrating 3D product data into your business application. See our [Developer Guides](https://developer.vertexvis.com/docs/guides/render-your-first-scene) to get started. Notes about the Postman collection and API Reference code samples, - They include all required and optional body parameters for completeness. Remove any optional parameters as desired. - They use auto-generated IDs and other values that may share the same value for ease of documentation only. In actual requests and responses, the IDs should uniquely identify their corresponding resource.
*
* The version of the OpenAPI document: 1.0
* 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.vertexvis.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.vertexvis.model.ApiError;
import com.vertexvis.model.Link;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Failure
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Failure {
public static final String SERIALIZED_NAME_ERRORS = "errors";
@SerializedName(SERIALIZED_NAME_ERRORS)
private Set errors = new LinkedHashSet<>();
public static final String SERIALIZED_NAME_META = "meta";
@SerializedName(SERIALIZED_NAME_META)
private Map meta = null;
public static final String SERIALIZED_NAME_LINKS = "links";
@SerializedName(SERIALIZED_NAME_LINKS)
private Map links = null;
public Failure errors(Set errors) {
this.errors = errors;
return this;
}
public Failure addErrorsItem(ApiError errorsItem) {
this.errors.add(errorsItem);
return this;
}
/**
* Get errors
* @return errors
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public Set getErrors() {
return errors;
}
public void setErrors(Set errors) {
this.errors = errors;
}
public Failure meta(Map meta) {
this.meta = meta;
return this;
}
public Failure putMetaItem(String key, String metaItem) {
if (this.meta == null) {
this.meta = new HashMap<>();
}
this.meta.put(key, metaItem);
return this;
}
/**
* Get meta
* @return meta
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getMeta() {
return meta;
}
public void setMeta(Map meta) {
this.meta = meta;
}
public Failure links(Map links) {
this.links = links;
return this;
}
public Failure putLinksItem(String key, Link linksItem) {
if (this.links == null) {
this.links = new HashMap<>();
}
this.links.put(key, linksItem);
return this;
}
/**
* Get links
* @return links
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map getLinks() {
return links;
}
public void setLinks(Map links) {
this.links = links;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Failure failure = (Failure) o;
return Objects.equals(this.errors, failure.errors) &&
Objects.equals(this.meta, failure.meta) &&
Objects.equals(this.links, failure.links);
}
@Override
public int hashCode() {
return Objects.hash(errors, meta, links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Failure {\n");
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).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 ");
}
}