All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.swagger.client.model.ErrorMessage Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
/*
 * finAPI RESTful Services
 * finAPI RESTful Services
 *
 * OpenAPI spec version: v1.64.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.swagger.client.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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.ErrorDetails;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * Response type when a service call was not successful. Contains details about the error(s) that occurred.
 */
@ApiModel(description = "Response type when a service call was not successful. Contains details about the error(s) that occurred.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-05T12:19:21.458Z")
public class ErrorMessage {
  @SerializedName("errors")
  private List errors = new ArrayList();

  @SerializedName("date")
  private String date = null;

  @SerializedName("requestId")
  private String requestId = null;

  @SerializedName("endpoint")
  private String endpoint = null;

  @SerializedName("authContext")
  private String authContext = null;

  @SerializedName("bank")
  private String bank = null;

  public ErrorMessage errors(List errors) {
    this.errors = errors;
    return this;
  }

  public ErrorMessage addErrorsItem(ErrorDetails errorsItem) {
    this.errors.add(errorsItem);
    return this;
  }

   /**
   * List of errors
   * @return errors
  **/
  @ApiModelProperty(required = true, value = "List of errors")
  public List getErrors() {
    return errors;
  }

  public void setErrors(List errors) {
    this.errors = errors;
  }

  public ErrorMessage date(String date) {
    this.date = date;
    return this;
  }

   /**
   * Server date of when the error(s) occurred, in the format YYYY-MM-DD HH:MM:SS.SSS
   * @return date
  **/
  @ApiModelProperty(example = "2018-01-01 00:00:00.000", required = true, value = "Server date of when the error(s) occurred, in the format YYYY-MM-DD HH:MM:SS.SSS")
  public String getDate() {
    return date;
  }

  public void setDate(String date) {
    this.date = date;
  }

  public ErrorMessage requestId(String requestId) {
    this.requestId = requestId;
    return this;
  }

   /**
   * ID of the request that caused this error. This is either what you have passed for the header 'X-REQUEST-ID', or an auto-generated ID in case you didn't pass any value for that header.
   * @return requestId
  **/
  @ApiModelProperty(example = "request-id-01234567890123456789", value = "ID of the request that caused this error. This is either what you have passed for the header 'X-REQUEST-ID', or an auto-generated ID in case you didn't pass any value for that header.")
  public String getRequestId() {
    return requestId;
  }

  public void setRequestId(String requestId) {
    this.requestId = requestId;
  }

  public ErrorMessage endpoint(String endpoint) {
    this.endpoint = endpoint;
    return this;
  }

   /**
   * The service endpoint that was called
   * @return endpoint
  **/
  @ApiModelProperty(example = "https://finapi.localhost", required = true, value = "The service endpoint that was called")
  public String getEndpoint() {
    return endpoint;
  }

  public void setEndpoint(String endpoint) {
    this.endpoint = endpoint;
  }

  public ErrorMessage authContext(String authContext) {
    this.authContext = authContext;
    return this;
  }

   /**
   * Information about the authorization context of the service call
   * @return authContext
  **/
  @ApiModelProperty(example = "1/2", required = true, value = "Information about the authorization context of the service call")
  public String getAuthContext() {
    return authContext;
  }

  public void setAuthContext(String authContext) {
    this.authContext = authContext;
  }

  public ErrorMessage bank(String bank) {
    this.bank = bank;
    return this;
  }

   /**
   * BLZ and name (in format \"<BLZ> - <name>\") of a bank that was used for the original request
   * @return bank
  **/
  @ApiModelProperty(example = "00000000", value = "BLZ and name (in format \" - \") of a bank that was used for the original request")
  public String getBank() {
    return bank;
  }

  public void setBank(String bank) {
    this.bank = bank;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ErrorMessage errorMessage = (ErrorMessage) o;
    return Objects.equals(this.errors, errorMessage.errors) &&
        Objects.equals(this.date, errorMessage.date) &&
        Objects.equals(this.requestId, errorMessage.requestId) &&
        Objects.equals(this.endpoint, errorMessage.endpoint) &&
        Objects.equals(this.authContext, errorMessage.authContext) &&
        Objects.equals(this.bank, errorMessage.bank);
  }

  @Override
  public int hashCode() {
    return Objects.hash(errors, date, requestId, endpoint, authContext, bank);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ErrorMessage {\n");
    
    sb.append("    errors: ").append(toIndentedString(errors)).append("\n");
    sb.append("    date: ").append(toIndentedString(date)).append("\n");
    sb.append("    requestId: ").append(toIndentedString(requestId)).append("\n");
    sb.append("    endpoint: ").append(toIndentedString(endpoint)).append("\n");
    sb.append("    authContext: ").append(toIndentedString(authContext)).append("\n");
    sb.append("    bank: ").append(toIndentedString(bank)).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 - 2024 Weber Informatics LLC | Privacy Policy