content: /*
   * VaultFileSystem
   * 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.vault.data.manager.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 java.math.BigDecimal;
  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
  import com.fasterxml.jackson.annotation.JsonTypeName;
  import java.io.UnsupportedEncodingException;
  import java.net.URLEncoder;
  import java.util.StringJoiner;
  
  /**
   * UpdateAccountDto
   */
  @JsonPropertyOrder({
    UpdateAccountDto.JSON_PROPERTY_ACCOUNT_INDEX,
    UpdateAccountDto.JSON_PROPERTY_ACCOUNT_DID,
    UpdateAccountDto.JSON_PROPERTY_METADATA
  })
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
  public class UpdateAccountDto {
    public static final String JSON_PROPERTY_ACCOUNT_INDEX = "accountIndex";
    @javax.annotation.Nonnull
    private BigDecimal accountIndex;
  
    public static final String JSON_PROPERTY_ACCOUNT_DID = "accountDid";
    @javax.annotation.Nonnull
    private String accountDid;
  
    public static final String JSON_PROPERTY_METADATA = "metadata";
    @javax.annotation.Nullable
    private Object metadata;
  
    public UpdateAccountDto() {
    }
  
    public UpdateAccountDto accountIndex(@javax.annotation.Nonnull BigDecimal accountIndex) {
      
      this.accountIndex = accountIndex;
      return this;
    }
  
    /**
     * Get accountIndex
     * @return accountIndex
     */
    @javax.annotation.Nonnull
    @JsonProperty(JSON_PROPERTY_ACCOUNT_INDEX)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
  
    public BigDecimal getAccountIndex() {
      return accountIndex;
    }
  
  
    @JsonProperty(JSON_PROPERTY_ACCOUNT_INDEX)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setAccountIndex(@javax.annotation.Nonnull BigDecimal accountIndex) {
      this.accountIndex = accountIndex;
    }
  
    public UpdateAccountDto accountDid(@javax.annotation.Nonnull String accountDid) {
      
      this.accountDid = accountDid;
      return this;
    }
  
    /**
     * Profile DID that is associated with the account number
     * @return accountDid
     */
    @javax.annotation.Nonnull
    @JsonProperty(JSON_PROPERTY_ACCOUNT_DID)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
  
    public String getAccountDid() {
      return accountDid;
    }
  
  
    @JsonProperty(JSON_PROPERTY_ACCOUNT_DID)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setAccountDid(@javax.annotation.Nonnull String accountDid) {
      this.accountDid = accountDid;
    }
  
    public UpdateAccountDto metadata(@javax.annotation.Nullable Object metadata) {
      
      this.metadata = metadata;
      return this;
    }
  
    /**
     * Get metadata
     * @return metadata
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_METADATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public Object getMetadata() {
      return metadata;
    }
  
  
    @JsonProperty(JSON_PROPERTY_METADATA)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setMetadata(@javax.annotation.Nullable Object metadata) {
      this.metadata = metadata;
    }
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      UpdateAccountDto updateAccountDto = (UpdateAccountDto) o;
      return Objects.equals(this.accountIndex, updateAccountDto.accountIndex) &&
          Objects.equals(this.accountDid, updateAccountDto.accountDid) &&
          Objects.equals(this.metadata, updateAccountDto.metadata);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(accountIndex, accountDid, metadata);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class UpdateAccountDto {\n");
      sb.append("    accountIndex: ").append(toIndentedString(accountIndex)).append("\n");
      sb.append("    accountDid: ").append(toIndentedString(accountDid)).append("\n");
      sb.append("    metadata: ").append(toIndentedString(metadata)).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 `accountIndex` to the URL query string
      if (getAccountIndex() != null) {
        try {
          joiner.add(String.format("%saccountIndex%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountIndex()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `accountDid` to the URL query string
      if (getAccountDid() != null) {
        try {
          joiner.add(String.format("%saccountDid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAccountDid()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `metadata` to the URL query string
      if (getMetadata() != null) {
        try {
          joiner.add(String.format("%smetadata%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getMetadata()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      return joiner.toString();
    }
  
  }
  
  