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;
  
  /**
   * CreateAccountInput
   */
  @JsonPropertyOrder({
    CreateAccountInput.JSON_PROPERTY_ACCOUNT_INDEX,
    CreateAccountInput.JSON_PROPERTY_ACCOUNT_DID,
    CreateAccountInput.JSON_PROPERTY_DID_PROOF,
    CreateAccountInput.JSON_PROPERTY_ALIAS,
    CreateAccountInput.JSON_PROPERTY_METADATA,
    CreateAccountInput.JSON_PROPERTY_DESCRIPTION
  })
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
  public class CreateAccountInput {
    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_DID_PROOF = "didProof";
    @javax.annotation.Nonnull
    private String didProof;
  
    public static final String JSON_PROPERTY_ALIAS = "alias";
    @javax.annotation.Nullable
    private String alias;
  
    public static final String JSON_PROPERTY_METADATA = "metadata";
    @javax.annotation.Nullable
    private Object metadata;
  
    public static final String JSON_PROPERTY_DESCRIPTION = "description";
    @javax.annotation.Nullable
    private String description;
  
    public CreateAccountInput() {
    }
  
    public CreateAccountInput accountIndex(@javax.annotation.Nonnull BigDecimal accountIndex) {
      
      this.accountIndex = accountIndex;
      return this;
    }
  
    /**
     * number that is used for profile DID derivation
     * @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 CreateAccountInput accountDid(@javax.annotation.Nonnull String accountDid) {
      
      this.accountDid = accountDid;
      return this;
    }
  
    /**
     * 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 CreateAccountInput didProof(@javax.annotation.Nonnull String didProof) {
      
      this.didProof = didProof;
      return this;
    }
  
    /**
     * JWT that proves ownership of profile DID by requester
     * @return didProof
     */
    @javax.annotation.Nonnull
    @JsonProperty(JSON_PROPERTY_DID_PROOF)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
  
    public String getDidProof() {
      return didProof;
    }
  
  
    @JsonProperty(JSON_PROPERTY_DID_PROOF)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setDidProof(@javax.annotation.Nonnull String didProof) {
      this.didProof = didProof;
    }
  
    public CreateAccountInput alias(@javax.annotation.Nullable String alias) {
      
      this.alias = alias;
      return this;
    }
  
    /**
     * Alias of account
     * @return alias
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_ALIAS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getAlias() {
      return alias;
    }
  
  
    @JsonProperty(JSON_PROPERTY_ALIAS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setAlias(@javax.annotation.Nullable String alias) {
      this.alias = alias;
    }
  
    public CreateAccountInput metadata(@javax.annotation.Nullable Object metadata) {
      
      this.metadata = metadata;
      return this;
    }
  
    /**
     * Metadata of account
     * @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;
    }
  
    public CreateAccountInput description(@javax.annotation.Nullable String description) {
      
      this.description = description;
      return this;
    }
  
    /**
     * Description of account
     * @return description
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_DESCRIPTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getDescription() {
      return description;
    }
  
  
    @JsonProperty(JSON_PROPERTY_DESCRIPTION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setDescription(@javax.annotation.Nullable String description) {
      this.description = description;
    }
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      CreateAccountInput createAccountInput = (CreateAccountInput) o;
      return Objects.equals(this.accountIndex, createAccountInput.accountIndex) &&
          Objects.equals(this.accountDid, createAccountInput.accountDid) &&
          Objects.equals(this.didProof, createAccountInput.didProof) &&
          Objects.equals(this.alias, createAccountInput.alias) &&
          Objects.equals(this.metadata, createAccountInput.metadata) &&
          Objects.equals(this.description, createAccountInput.description);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(accountIndex, accountDid, didProof, alias, metadata, description);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class CreateAccountInput {\n");
      sb.append("    accountIndex: ").append(toIndentedString(accountIndex)).append("\n");
      sb.append("    accountDid: ").append(toIndentedString(accountDid)).append("\n");
      sb.append("    didProof: ").append(toIndentedString(didProof)).append("\n");
      sb.append("    alias: ").append(toIndentedString(alias)).append("\n");
      sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
      sb.append("    description: ").append(toIndentedString(description)).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 `didProof` to the URL query string
      if (getDidProof() != null) {
        try {
          joiner.add(String.format("%sdidProof%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDidProof()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `alias` to the URL query string
      if (getAlias() != null) {
        try {
          joiner.add(String.format("%salias%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAlias()), "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);
        }
      }
  
      // add `description` to the URL query string
      if (getDescription() != null) {
        try {
          joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      return joiner.toString();
    }
  
  }
  
  