content: /*
   * CredentialIssuanceService
   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
   *
   * The version of the OpenAPI document: 1.0.0
   * Contact: info@affinidi.com
   *
   * 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.affinidi.tdk.credential.issuance.client.models;
  
  import java.util.Objects;
  import java.util.Arrays;
  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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonTypeName;
  import java.io.UnsupportedEncodingException;
  import java.net.URLEncoder;
  import java.util.StringJoiner;
  
  /**
   * ActionForbiddenErrorDetailsInner
   */
  @JsonPropertyOrder({
    ActionForbiddenErrorDetailsInner.JSON_PROPERTY_ISSUE,
    ActionForbiddenErrorDetailsInner.JSON_PROPERTY_FIELD,
    ActionForbiddenErrorDetailsInner.JSON_PROPERTY_VALUE,
    ActionForbiddenErrorDetailsInner.JSON_PROPERTY_LOCATION
  })
  @JsonTypeName("ActionForbiddenError_details_inner")
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
  public class ActionForbiddenErrorDetailsInner {
    public static final String JSON_PROPERTY_ISSUE = "issue";
    @javax.annotation.Nonnull
    private String issue;
  
    public static final String JSON_PROPERTY_FIELD = "field";
    @javax.annotation.Nullable
    private String field;
  
    public static final String JSON_PROPERTY_VALUE = "value";
    @javax.annotation.Nullable
    private String value;
  
    public static final String JSON_PROPERTY_LOCATION = "location";
    @javax.annotation.Nullable
    private String location;
  
    public ActionForbiddenErrorDetailsInner() {
    }
  
    public ActionForbiddenErrorDetailsInner issue(@javax.annotation.Nonnull String issue) {
      
      this.issue = issue;
      return this;
    }
  
    /**
     * Get issue
     * @return issue
     */
    @javax.annotation.Nonnull
    @JsonProperty(JSON_PROPERTY_ISSUE)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
  
    public String getIssue() {
      return issue;
    }
  
  
    @JsonProperty(JSON_PROPERTY_ISSUE)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setIssue(@javax.annotation.Nonnull String issue) {
      this.issue = issue;
    }
  
    public ActionForbiddenErrorDetailsInner field(@javax.annotation.Nullable String field) {
      
      this.field = field;
      return this;
    }
  
    /**
     * Get field
     * @return field
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_FIELD)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getField() {
      return field;
    }
  
  
    @JsonProperty(JSON_PROPERTY_FIELD)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setField(@javax.annotation.Nullable String field) {
      this.field = field;
    }
  
    public ActionForbiddenErrorDetailsInner value(@javax.annotation.Nullable String value) {
      
      this.value = value;
      return this;
    }
  
    /**
     * Get value
     * @return value
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_VALUE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getValue() {
      return value;
    }
  
  
    @JsonProperty(JSON_PROPERTY_VALUE)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setValue(@javax.annotation.Nullable String value) {
      this.value = value;
    }
  
    public ActionForbiddenErrorDetailsInner location(@javax.annotation.Nullable String location) {
      
      this.location = location;
      return this;
    }
  
    /**
     * Get location
     * @return location
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_LOCATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getLocation() {
      return location;
    }
  
  
    @JsonProperty(JSON_PROPERTY_LOCATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLocation(@javax.annotation.Nullable String location) {
      this.location = location;
    }
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      ActionForbiddenErrorDetailsInner actionForbiddenErrorDetailsInner = (ActionForbiddenErrorDetailsInner) o;
      return Objects.equals(this.issue, actionForbiddenErrorDetailsInner.issue) &&
          Objects.equals(this.field, actionForbiddenErrorDetailsInner.field) &&
          Objects.equals(this.value, actionForbiddenErrorDetailsInner.value) &&
          Objects.equals(this.location, actionForbiddenErrorDetailsInner.location);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(issue, field, value, location);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class ActionForbiddenErrorDetailsInner {\n");
      sb.append("    issue: ").append(toIndentedString(issue)).append("\n");
      sb.append("    field: ").append(toIndentedString(field)).append("\n");
      sb.append("    value: ").append(toIndentedString(value)).append("\n");
      sb.append("    location: ").append(toIndentedString(location)).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    ");
    }
  
    /**
     * Convert the instance into URL query string.
     *
     * @return URL query string
     */
    public String toUrlQueryString() {
      return toUrlQueryString(null);
    }
  
    /**
     * Convert the instance into URL query string.
     *
     * @param prefix prefix of the query string
     * @return URL query string
     */
    public String toUrlQueryString(String prefix) {
      String suffix = "";
      String containerSuffix = "";
      String containerPrefix = "";
      if (prefix == null) {
        // style=form, explode=true, e.g. /pet?name=cat&type=manx
        prefix = "";
      } else {
        // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
        prefix = prefix + "[";
        suffix = "]";
        containerSuffix = "]";
        containerPrefix = "[";
      }
  
      StringJoiner joiner = new StringJoiner("&");
  
      // add `issue` to the URL query string
      if (getIssue() != null) {
        try {
          joiner.add(String.format("%sissue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIssue()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `field` to the URL query string
      if (getField() != null) {
        try {
          joiner.add(String.format("%sfield%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getField()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `value` to the URL query string
      if (getValue() != null) {
        try {
          joiner.add(String.format("%svalue%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getValue()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `location` to the URL query string
      if (getLocation() != null) {
        try {
          joiner.add(String.format("%slocation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLocation()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      return joiner.toString();
    }
  
  }
  
  