content: /*
   * CloudWalletEssentials
   * 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.wallets.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;
  
  /**
   * CreateWalletInput
   */
  @JsonPropertyOrder({
    CreateWalletInput.JSON_PROPERTY_NAME,
    CreateWalletInput.JSON_PROPERTY_DESCRIPTION,
    CreateWalletInput.JSON_PROPERTY_DID_METHOD,
    CreateWalletInput.JSON_PROPERTY_DID_WEB_URL
  })
  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
  public class CreateWalletInput {
    public static final String JSON_PROPERTY_NAME = "name";
    @javax.annotation.Nullable
    private String name;
  
    public static final String JSON_PROPERTY_DESCRIPTION = "description";
    @javax.annotation.Nullable
    private String description;
  
    /**
     * Define how DID of your wallet is created and resolved
     */
    public enum DidMethodEnum {
      KEY(String.valueOf("key")),
      
      WEB(String.valueOf("web")),
      
      PEER0(String.valueOf("peer0"));
  
      private String value;
  
      DidMethodEnum(String value) {
        this.value = value;
      }
  
      @JsonValue
      public String getValue() {
        return value;
      }
  
      @Override
      public String toString() {
        return String.valueOf(value);
      }
  
      @JsonCreator
      public static DidMethodEnum fromValue(String value) {
        for (DidMethodEnum b : DidMethodEnum.values()) {
          if (b.value.equals(value)) {
            return b;
          }
        }
        throw new IllegalArgumentException("Unexpected value '" + value + "'");
      }
    }
  
    public static final String JSON_PROPERTY_DID_METHOD = "didMethod";
    @javax.annotation.Nullable
    private DidMethodEnum didMethod;
  
    public static final String JSON_PROPERTY_DID_WEB_URL = "didWebUrl";
    @javax.annotation.Nullable
    private String didWebUrl;
  
    public CreateWalletInput() {
    }
  
    public CreateWalletInput name(@javax.annotation.Nullable String name) {
      
      this.name = name;
      return this;
    }
  
    /**
     * The name of the wallet
     * @return name
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getName() {
      return name;
    }
  
  
    @JsonProperty(JSON_PROPERTY_NAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setName(@javax.annotation.Nullable String name) {
      this.name = name;
    }
  
    public CreateWalletInput description(@javax.annotation.Nullable String description) {
      
      this.description = description;
      return this;
    }
  
    /**
     * The description of the wallet
     * @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;
    }
  
    public CreateWalletInput didMethod(@javax.annotation.Nullable DidMethodEnum didMethod) {
      
      this.didMethod = didMethod;
      return this;
    }
  
    /**
     * Define how DID of your wallet is created and resolved
     * @return didMethod
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_DID_METHOD)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public DidMethodEnum getDidMethod() {
      return didMethod;
    }
  
  
    @JsonProperty(JSON_PROPERTY_DID_METHOD)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setDidMethod(@javax.annotation.Nullable DidMethodEnum didMethod) {
      this.didMethod = didMethod;
    }
  
    public CreateWalletInput didWebUrl(@javax.annotation.Nullable String didWebUrl) {
      
      this.didWebUrl = didWebUrl;
      return this;
    }
  
    /**
     * URL of the DID. Required if the did method is web
     * @return didWebUrl
     */
    @javax.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_DID_WEB_URL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  
    public String getDidWebUrl() {
      return didWebUrl;
    }
  
  
    @JsonProperty(JSON_PROPERTY_DID_WEB_URL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setDidWebUrl(@javax.annotation.Nullable String didWebUrl) {
      this.didWebUrl = didWebUrl;
    }
  
    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      CreateWalletInput createWalletInput = (CreateWalletInput) o;
      return Objects.equals(this.name, createWalletInput.name) &&
          Objects.equals(this.description, createWalletInput.description) &&
          Objects.equals(this.didMethod, createWalletInput.didMethod) &&
          Objects.equals(this.didWebUrl, createWalletInput.didWebUrl);
    }
  
    @Override
    public int hashCode() {
      return Objects.hash(name, description, didMethod, didWebUrl);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class CreateWalletInput {\n");
      sb.append("    name: ").append(toIndentedString(name)).append("\n");
      sb.append("    description: ").append(toIndentedString(description)).append("\n");
      sb.append("    didMethod: ").append(toIndentedString(didMethod)).append("\n");
      sb.append("    didWebUrl: ").append(toIndentedString(didWebUrl)).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 `name` to the URL query string
      if (getName() != null) {
        try {
          joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), "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);
        }
      }
  
      // add `didMethod` to the URL query string
      if (getDidMethod() != null) {
        try {
          joiner.add(String.format("%sdidMethod%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDidMethod()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      // add `didWebUrl` to the URL query string
      if (getDidWebUrl() != null) {
        try {
          joiner.add(String.format("%sdidWebUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDidWebUrl()), "UTF-8").replaceAll("\\+", "%20")));
        } catch (UnsupportedEncodingException e) {
          // Should never happen, UTF-8 is always supported
          throw new RuntimeException(e);
        }
      }
  
      return joiner.toString();
    }
  
  }
  
  