/*
 * The Plaid API
 * The Plaid REST API. Please see https://plaid.com/docs/api for more details.
 *
 * The version of the OpenAPI document: 2020-09-14_1.680.0
 * 
 *
 * 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.plaid.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 java.io.IOException;
import java.math.BigDecimal;

/**
 * Documentation not found in the MISMO model viewer and not provided by Freddie Mac.
 */
@ApiModel(description = "Documentation not found in the MISMO model viewer and not provided by Freddie Mac.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class AssetHolding {
  public static final String SERIALIZED_NAME_ASSET_HOLDING_I_D = "AssetHoldingID";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_I_D)
  private String assetHoldingID;

  public static final String SERIALIZED_NAME_CURRENCY = "Currency";
  @SerializedName(SERIALIZED_NAME_CURRENCY)
  private String currency;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_DESCRIPTION = "AssetHoldingDescription";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_DESCRIPTION)
  private String assetHoldingDescription;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_SYMBOL = "AssetHoldingSymbol";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_SYMBOL)
  private String assetHoldingSymbol;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_SECURITY_NAME = "AssetHoldingSecurityName";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_SECURITY_NAME)
  private String assetHoldingSecurityName;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_UNITS = "AssetHoldingUnits";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_UNITS)
  private Double assetHoldingUnits;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_MARKET_VALUE_AMOUNT = "AssetHoldingMarketValueAmount";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_MARKET_VALUE_AMOUNT)
  private Double assetHoldingMarketValueAmount;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_CURRENT_PRICE_AMOUNT = "AssetHoldingCurrentPriceAmount";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_CURRENT_PRICE_AMOUNT)
  private Double assetHoldingCurrentPriceAmount;

  /**
   * Type of holding (e.g. bond, stock, crypto, other)
   */
  @JsonAdapter(AssetHoldingTypeEnum.Adapter.class)
  public enum AssetHoldingTypeEnum {
    BOND("Bond"),
    
    STOCK("Stock"),
    
    CRYPTO("Crypto"),
    
    OTHER("Other");

    private String value;

    AssetHoldingTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static AssetHoldingTypeEnum fromValue(String value) {
      for (AssetHoldingTypeEnum b : AssetHoldingTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter<AssetHoldingTypeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final AssetHoldingTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AssetHoldingTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return AssetHoldingTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ASSET_HOLDING_TYPE = "AssetHoldingType";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_TYPE)
  private AssetHoldingTypeEnum assetHoldingType;

  /**
   * Whether or not the stock is restricted, i.e. \&quot;Restricted\&quot; or \&quot;Not Restricted\&quot;
   */
  @JsonAdapter(AssetHoldingRestrictedIndicatorEnum.Adapter.class)
  public enum AssetHoldingRestrictedIndicatorEnum {
    TRUE("true"),
    
    FALSE("false");

    private String value;

    AssetHoldingRestrictedIndicatorEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static AssetHoldingRestrictedIndicatorEnum fromValue(String value) {
      for (AssetHoldingRestrictedIndicatorEnum b : AssetHoldingRestrictedIndicatorEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter<AssetHoldingRestrictedIndicatorEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final AssetHoldingRestrictedIndicatorEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AssetHoldingRestrictedIndicatorEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return AssetHoldingRestrictedIndicatorEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_ASSET_HOLDING_RESTRICTED_INDICATOR = "AssetHoldingRestrictedIndicator";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_RESTRICTED_INDICATOR)
  private AssetHoldingRestrictedIndicatorEnum assetHoldingRestrictedIndicator;

  public static final String SERIALIZED_NAME_ASSET_HOLDING_VESTED_AMOUNT = "AssetHoldingVestedAmount";
  @SerializedName(SERIALIZED_NAME_ASSET_HOLDING_VESTED_AMOUNT)
  private Double assetHoldingVestedAmount;


  public AssetHolding assetHoldingID(String assetHoldingID) {
    
    this.assetHoldingID = assetHoldingID;
    return this;
  }

   /**
   * Unique id of investment position
   * @return assetHoldingID
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Unique id of investment position")

  public String getAssetHoldingID() {
    return assetHoldingID;
  }


  public void setAssetHoldingID(String assetHoldingID) {
    this.assetHoldingID = assetHoldingID;
  }


  public AssetHolding currency(String currency) {
    
    this.currency = currency;
    return this;
  }

   /**
   * US Dollar
   * @return currency
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "US Dollar")

  public String getCurrency() {
    return currency;
  }


  public void setCurrency(String currency) {
    this.currency = currency;
  }


  public AssetHolding assetHoldingDescription(String assetHoldingDescription) {
    
    this.assetHoldingDescription = assetHoldingDescription;
    return this;
  }

   /**
   * Description of holding
   * @return assetHoldingDescription
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Description of holding")

  public String getAssetHoldingDescription() {
    return assetHoldingDescription;
  }


  public void setAssetHoldingDescription(String assetHoldingDescription) {
    this.assetHoldingDescription = assetHoldingDescription;
  }


  public AssetHolding assetHoldingSymbol(String assetHoldingSymbol) {
    
    this.assetHoldingSymbol = assetHoldingSymbol;
    return this;
  }

   /**
   * Investment position&#39;s market ticker symbol
   * @return assetHoldingSymbol
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Investment position's market ticker symbol")

  public String getAssetHoldingSymbol() {
    return assetHoldingSymbol;
  }


  public void setAssetHoldingSymbol(String assetHoldingSymbol) {
    this.assetHoldingSymbol = assetHoldingSymbol;
  }


  public AssetHolding assetHoldingSecurityName(String assetHoldingSecurityName) {
    
    this.assetHoldingSecurityName = assetHoldingSecurityName;
    return this;
  }

   /**
   * Security name of investment holding
   * @return assetHoldingSecurityName
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Security name of investment holding")

  public String getAssetHoldingSecurityName() {
    return assetHoldingSecurityName;
  }


  public void setAssetHoldingSecurityName(String assetHoldingSecurityName) {
    this.assetHoldingSecurityName = assetHoldingSecurityName;
  }


  public AssetHolding assetHoldingUnits(Double assetHoldingUnits) {
    
    this.assetHoldingUnits = assetHoldingUnits;
    return this;
  }

   /**
   * Number of units of holding
   * @return assetHoldingUnits
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Number of units of holding")

  public Double getAssetHoldingUnits() {
    return assetHoldingUnits;
  }


  public void setAssetHoldingUnits(Double assetHoldingUnits) {
    this.assetHoldingUnits = assetHoldingUnits;
  }


  public AssetHolding assetHoldingMarketValueAmount(Double assetHoldingMarketValueAmount) {
    
    this.assetHoldingMarketValueAmount = assetHoldingMarketValueAmount;
    return this;
  }

   /**
   * market value of investment position
   * @return assetHoldingMarketValueAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "market value of investment position")

  public Double getAssetHoldingMarketValueAmount() {
    return assetHoldingMarketValueAmount;
  }


  public void setAssetHoldingMarketValueAmount(Double assetHoldingMarketValueAmount) {
    this.assetHoldingMarketValueAmount = assetHoldingMarketValueAmount;
  }


  public AssetHolding assetHoldingCurrentPriceAmount(Double assetHoldingCurrentPriceAmount) {
    
    this.assetHoldingCurrentPriceAmount = assetHoldingCurrentPriceAmount;
    return this;
  }

   /**
   * current price of investment holding
   * @return assetHoldingCurrentPriceAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "current price of investment holding")

  public Double getAssetHoldingCurrentPriceAmount() {
    return assetHoldingCurrentPriceAmount;
  }


  public void setAssetHoldingCurrentPriceAmount(Double assetHoldingCurrentPriceAmount) {
    this.assetHoldingCurrentPriceAmount = assetHoldingCurrentPriceAmount;
  }


  public AssetHolding assetHoldingType(AssetHoldingTypeEnum assetHoldingType) {
    
    this.assetHoldingType = assetHoldingType;
    return this;
  }

   /**
   * Type of holding (e.g. bond, stock, crypto, other)
   * @return assetHoldingType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Type of holding (e.g. bond, stock, crypto, other)")

  public AssetHoldingTypeEnum getAssetHoldingType() {
    return assetHoldingType;
  }


  public void setAssetHoldingType(AssetHoldingTypeEnum assetHoldingType) {
    this.assetHoldingType = assetHoldingType;
  }


  public AssetHolding assetHoldingRestrictedIndicator(AssetHoldingRestrictedIndicatorEnum assetHoldingRestrictedIndicator) {
    
    this.assetHoldingRestrictedIndicator = assetHoldingRestrictedIndicator;
    return this;
  }

   /**
   * Whether or not the stock is restricted, i.e. \&quot;Restricted\&quot; or \&quot;Not Restricted\&quot;
   * @return assetHoldingRestrictedIndicator
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Whether or not the stock is restricted, i.e. \"Restricted\" or \"Not Restricted\"")

  public AssetHoldingRestrictedIndicatorEnum getAssetHoldingRestrictedIndicator() {
    return assetHoldingRestrictedIndicator;
  }


  public void setAssetHoldingRestrictedIndicator(AssetHoldingRestrictedIndicatorEnum assetHoldingRestrictedIndicator) {
    this.assetHoldingRestrictedIndicator = assetHoldingRestrictedIndicator;
  }


  public AssetHolding assetHoldingVestedAmount(Double assetHoldingVestedAmount) {
    
    this.assetHoldingVestedAmount = assetHoldingVestedAmount;
    return this;
  }

   /**
   * Amount of holding vested
   * @return assetHoldingVestedAmount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Amount of holding vested")

  public Double getAssetHoldingVestedAmount() {
    return assetHoldingVestedAmount;
  }


  public void setAssetHoldingVestedAmount(Double assetHoldingVestedAmount) {
    this.assetHoldingVestedAmount = assetHoldingVestedAmount;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AssetHolding assetHolding = (AssetHolding) o;
    return Objects.equals(this.assetHoldingID, assetHolding.assetHoldingID) &&
        Objects.equals(this.currency, assetHolding.currency) &&
        Objects.equals(this.assetHoldingDescription, assetHolding.assetHoldingDescription) &&
        Objects.equals(this.assetHoldingSymbol, assetHolding.assetHoldingSymbol) &&
        Objects.equals(this.assetHoldingSecurityName, assetHolding.assetHoldingSecurityName) &&
        Objects.equals(this.assetHoldingUnits, assetHolding.assetHoldingUnits) &&
        Objects.equals(this.assetHoldingMarketValueAmount, assetHolding.assetHoldingMarketValueAmount) &&
        Objects.equals(this.assetHoldingCurrentPriceAmount, assetHolding.assetHoldingCurrentPriceAmount) &&
        Objects.equals(this.assetHoldingType, assetHolding.assetHoldingType) &&
        Objects.equals(this.assetHoldingRestrictedIndicator, assetHolding.assetHoldingRestrictedIndicator) &&
        Objects.equals(this.assetHoldingVestedAmount, assetHolding.assetHoldingVestedAmount);
  }

  @Override
  public int hashCode() {
    return Objects.hash(assetHoldingID, currency, assetHoldingDescription, assetHoldingSymbol, assetHoldingSecurityName, assetHoldingUnits, assetHoldingMarketValueAmount, assetHoldingCurrentPriceAmount, assetHoldingType, assetHoldingRestrictedIndicator, assetHoldingVestedAmount);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AssetHolding {\n");
    sb.append("    assetHoldingID: ").append(toIndentedString(assetHoldingID)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    assetHoldingDescription: ").append(toIndentedString(assetHoldingDescription)).append("\n");
    sb.append("    assetHoldingSymbol: ").append(toIndentedString(assetHoldingSymbol)).append("\n");
    sb.append("    assetHoldingSecurityName: ").append(toIndentedString(assetHoldingSecurityName)).append("\n");
    sb.append("    assetHoldingUnits: ").append(toIndentedString(assetHoldingUnits)).append("\n");
    sb.append("    assetHoldingMarketValueAmount: ").append(toIndentedString(assetHoldingMarketValueAmount)).append("\n");
    sb.append("    assetHoldingCurrentPriceAmount: ").append(toIndentedString(assetHoldingCurrentPriceAmount)).append("\n");
    sb.append("    assetHoldingType: ").append(toIndentedString(assetHoldingType)).append("\n");
    sb.append("    assetHoldingRestrictedIndicator: ").append(toIndentedString(assetHoldingRestrictedIndicator)).append("\n");
    sb.append("    assetHoldingVestedAmount: ").append(toIndentedString(assetHoldingVestedAmount)).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    ");
  }

}

