/*
 * 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 com.plaid.client.model.AssetReportInvestmentHolding;
import com.plaid.client.model.AssetReportInvestmentSecurity;
import com.plaid.client.model.AssetReportInvestmentTransaction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * A set of fields describing the investments data on an account.
 */
@ApiModel(description = "A set of fields describing the investments data on an account.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class AssetReportInvestments {
  public static final String SERIALIZED_NAME_HOLDINGS = "holdings";
  @SerializedName(SERIALIZED_NAME_HOLDINGS)
  private List<AssetReportInvestmentHolding> holdings = null;

  public static final String SERIALIZED_NAME_SECURITIES = "securities";
  @SerializedName(SERIALIZED_NAME_SECURITIES)
  private List<AssetReportInvestmentSecurity> securities = null;

  public static final String SERIALIZED_NAME_TRANSACTIONS = "transactions";
  @SerializedName(SERIALIZED_NAME_TRANSACTIONS)
  private List<AssetReportInvestmentTransaction> transactions = null;


  public AssetReportInvestments holdings(List<AssetReportInvestmentHolding> holdings) {
    
    this.holdings = holdings;
    return this;
  }

  public AssetReportInvestments addHoldingsItem(AssetReportInvestmentHolding holdingsItem) {
    if (this.holdings == null) {
      this.holdings = new ArrayList<>();
    }
    this.holdings.add(holdingsItem);
    return this;
  }

   /**
   * Quantities and values of securities held in the investment account. Map to the &#x60;securities&#x60; array for security details.
   * @return holdings
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Quantities and values of securities held in the investment account. Map to the `securities` array for security details.")

  public List<AssetReportInvestmentHolding> getHoldings() {
    return holdings;
  }


  public void setHoldings(List<AssetReportInvestmentHolding> holdings) {
    this.holdings = holdings;
  }


  public AssetReportInvestments securities(List<AssetReportInvestmentSecurity> securities) {
    
    this.securities = securities;
    return this;
  }

  public AssetReportInvestments addSecuritiesItem(AssetReportInvestmentSecurity securitiesItem) {
    if (this.securities == null) {
      this.securities = new ArrayList<>();
    }
    this.securities.add(securitiesItem);
    return this;
  }

   /**
   * Details of specific securities held in on the investment account.
   * @return securities
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Details of specific securities held in on the investment account.")

  public List<AssetReportInvestmentSecurity> getSecurities() {
    return securities;
  }


  public void setSecurities(List<AssetReportInvestmentSecurity> securities) {
    this.securities = securities;
  }


  public AssetReportInvestments transactions(List<AssetReportInvestmentTransaction> transactions) {
    
    this.transactions = transactions;
    return this;
  }

  public AssetReportInvestments addTransactionsItem(AssetReportInvestmentTransaction transactionsItem) {
    if (this.transactions == null) {
      this.transactions = new ArrayList<>();
    }
    this.transactions.add(transactionsItem);
    return this;
  }

   /**
   * Transaction history on the investment account.
   * @return transactions
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Transaction history on the investment account.")

  public List<AssetReportInvestmentTransaction> getTransactions() {
    return transactions;
  }


  public void setTransactions(List<AssetReportInvestmentTransaction> transactions) {
    this.transactions = transactions;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AssetReportInvestments assetReportInvestments = (AssetReportInvestments) o;
    return Objects.equals(this.holdings, assetReportInvestments.holdings) &&
        Objects.equals(this.securities, assetReportInvestments.securities) &&
        Objects.equals(this.transactions, assetReportInvestments.transactions);
  }

  @Override
  public int hashCode() {
    return Objects.hash(holdings, securities, transactions);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AssetReportInvestments {\n");
    sb.append("    holdings: ").append(toIndentedString(holdings)).append("\n");
    sb.append("    securities: ").append(toIndentedString(securities)).append("\n");
    sb.append("    transactions: ").append(toIndentedString(transactions)).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    ");
  }

}

