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

/**
 * Insights on the account level. These are only returned for Credit and Depository type accounts.
 */
@ApiModel(description = "Insights on the account level. These are only returned for Credit and Depository type accounts.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class CashflowReportAccountInsights {
  public static final String SERIALIZED_NAME_HISTORICAL_BALANCES = "historical_balances";
  @SerializedName(SERIALIZED_NAME_HISTORICAL_BALANCES)
  private List<CashflowReportHistoricalBalance> historicalBalances = new ArrayList<>();

  public static final String SERIALIZED_NAME_MONTHLY_SUMMARIES = "monthly_summaries";
  @SerializedName(SERIALIZED_NAME_MONTHLY_SUMMARIES)
  private List<CashflowReportMonthlySummary> monthlySummaries = new ArrayList<>();


  public CashflowReportAccountInsights historicalBalances(List<CashflowReportHistoricalBalance> historicalBalances) {
    
    this.historicalBalances = historicalBalances;
    return this;
  }

  public CashflowReportAccountInsights addHistoricalBalancesItem(CashflowReportHistoricalBalance historicalBalancesItem) {
    this.historicalBalances.add(historicalBalancesItem);
    return this;
  }

   /**
   * Calculated data about the historical balances on the account.  Available for &#x60;credit&#x60; and &#x60;depository&#x60; type accounts.
   * @return historicalBalances
  **/
  @ApiModelProperty(required = true, value = "Calculated data about the historical balances on the account.  Available for `credit` and `depository` type accounts.")

  public List<CashflowReportHistoricalBalance> getHistoricalBalances() {
    return historicalBalances;
  }


  public void setHistoricalBalances(List<CashflowReportHistoricalBalance> historicalBalances) {
    this.historicalBalances = historicalBalances;
  }


  public CashflowReportAccountInsights monthlySummaries(List<CashflowReportMonthlySummary> monthlySummaries) {
    
    this.monthlySummaries = monthlySummaries;
    return this;
  }

  public CashflowReportAccountInsights addMonthlySummariesItem(CashflowReportMonthlySummary monthlySummariesItem) {
    this.monthlySummaries.add(monthlySummariesItem);
    return this;
  }

   /**
   * Monthly summary statistics derived from transaction-level data.
   * @return monthlySummaries
  **/
  @ApiModelProperty(required = true, value = "Monthly summary statistics derived from transaction-level data.")

  public List<CashflowReportMonthlySummary> getMonthlySummaries() {
    return monthlySummaries;
  }


  public void setMonthlySummaries(List<CashflowReportMonthlySummary> monthlySummaries) {
    this.monthlySummaries = monthlySummaries;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CashflowReportAccountInsights cashflowReportAccountInsights = (CashflowReportAccountInsights) o;
    return Objects.equals(this.historicalBalances, cashflowReportAccountInsights.historicalBalances) &&
        Objects.equals(this.monthlySummaries, cashflowReportAccountInsights.monthlySummaries);
  }

  @Override
  public int hashCode() {
    return Objects.hash(historicalBalances, monthlySummaries);
  }

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

}

