/*
 * 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.CashflowReportMonthlySummaryAverageDailyEndingBalance;
import com.plaid.client.model.CashflowReportMonthlySummaryAverageDailyInflowAmount;
import com.plaid.client.model.CashflowReportMonthlySummaryAverageDailyNetCashflowAmount;
import com.plaid.client.model.CashflowReportMonthlySummaryAverageDailyOutflowAmount;
import com.plaid.client.model.CashflowReportMonthlySummaryEndingBalance;
import com.plaid.client.model.CashflowReportMonthlySummaryStartingBalance;
import com.plaid.client.model.CashflowReportMonthlySummaryTotalLoanPayment;
import com.plaid.client.model.CashflowReportMonthlySummaryTotalPayroll;
import com.plaid.client.model.CashflowReportMonthlySummaryTotalRevenue;
import com.plaid.client.model.CashflowReportMonthlySummaryTotalVariableExpense;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * Monthly summary statistics derived from transaction-level data.
 */
@ApiModel(description = "Monthly summary statistics derived from transaction-level data.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class CashflowReportMonthlySummary {
  public static final String SERIALIZED_NAME_START_DATE = "start_date";
  @SerializedName(SERIALIZED_NAME_START_DATE)
  private LocalDate startDate;

  public static final String SERIALIZED_NAME_END_DATE = "end_date";
  @SerializedName(SERIALIZED_NAME_END_DATE)
  private LocalDate endDate;

  public static final String SERIALIZED_NAME_STARTING_BALANCE = "starting_balance";
  @SerializedName(SERIALIZED_NAME_STARTING_BALANCE)
  private CashflowReportMonthlySummaryStartingBalance startingBalance;

  public static final String SERIALIZED_NAME_ENDING_BALANCE = "ending_balance";
  @SerializedName(SERIALIZED_NAME_ENDING_BALANCE)
  private CashflowReportMonthlySummaryEndingBalance endingBalance;

  public static final String SERIALIZED_NAME_AVERAGE_DAILY_ENDING_BALANCE = "average_daily_ending_balance";
  @SerializedName(SERIALIZED_NAME_AVERAGE_DAILY_ENDING_BALANCE)
  private CashflowReportMonthlySummaryAverageDailyEndingBalance averageDailyEndingBalance;

  public static final String SERIALIZED_NAME_AVERAGE_DAILY_INFLOW_AMOUNT = "average_daily_inflow_amount";
  @SerializedName(SERIALIZED_NAME_AVERAGE_DAILY_INFLOW_AMOUNT)
  private CashflowReportMonthlySummaryAverageDailyInflowAmount averageDailyInflowAmount;

  public static final String SERIALIZED_NAME_AVERAGE_DAILY_OUTFLOW_AMOUNT = "average_daily_outflow_amount";
  @SerializedName(SERIALIZED_NAME_AVERAGE_DAILY_OUTFLOW_AMOUNT)
  private CashflowReportMonthlySummaryAverageDailyOutflowAmount averageDailyOutflowAmount;

  public static final String SERIALIZED_NAME_AVERAGE_DAILY_NET_CASHFLOW_AMOUNT = "average_daily_net_cashflow_amount";
  @SerializedName(SERIALIZED_NAME_AVERAGE_DAILY_NET_CASHFLOW_AMOUNT)
  private CashflowReportMonthlySummaryAverageDailyNetCashflowAmount averageDailyNetCashflowAmount;

  public static final String SERIALIZED_NAME_AVERAGE_DAILY_INFLOW_TRANSACTION_COUNT = "average_daily_inflow_transaction_count";
  @SerializedName(SERIALIZED_NAME_AVERAGE_DAILY_INFLOW_TRANSACTION_COUNT)
  private Double averageDailyInflowTransactionCount;

  public static final String SERIALIZED_NAME_AVERAGE_DAILY_OUTFLOW_TRANSACTION_COUNT = "average_daily_outflow_transaction_count";
  @SerializedName(SERIALIZED_NAME_AVERAGE_DAILY_OUTFLOW_TRANSACTION_COUNT)
  private Double averageDailyOutflowTransactionCount;

  public static final String SERIALIZED_NAME_TOTAL_REVENUE = "total_revenue";
  @SerializedName(SERIALIZED_NAME_TOTAL_REVENUE)
  private CashflowReportMonthlySummaryTotalRevenue totalRevenue;

  public static final String SERIALIZED_NAME_TOTAL_LOAN_PAYMENT = "total_loan_payment";
  @SerializedName(SERIALIZED_NAME_TOTAL_LOAN_PAYMENT)
  private CashflowReportMonthlySummaryTotalLoanPayment totalLoanPayment;

  public static final String SERIALIZED_NAME_TOTAL_VARIABLE_EXPENSE = "total_variable_expense";
  @SerializedName(SERIALIZED_NAME_TOTAL_VARIABLE_EXPENSE)
  private CashflowReportMonthlySummaryTotalVariableExpense totalVariableExpense;

  public static final String SERIALIZED_NAME_TOTAL_PAYROLL = "total_payroll";
  @SerializedName(SERIALIZED_NAME_TOTAL_PAYROLL)
  private CashflowReportMonthlySummaryTotalPayroll totalPayroll;

  public static final String SERIALIZED_NAME_NSF_TRANSACTION_COUNT = "nsf_transaction_count";
  @SerializedName(SERIALIZED_NAME_NSF_TRANSACTION_COUNT)
  private Integer nsfTransactionCount;

  public static final String SERIALIZED_NAME_OVERDRAFT_TRANSACTION_COUNT = "overdraft_transaction_count";
  @SerializedName(SERIALIZED_NAME_OVERDRAFT_TRANSACTION_COUNT)
  private Integer overdraftTransactionCount;

  public static final String SERIALIZED_NAME_NEGATIVE_ENDING_BALANCE_DAY_COUNT = "negative_ending_balance_day_count";
  @SerializedName(SERIALIZED_NAME_NEGATIVE_ENDING_BALANCE_DAY_COUNT)
  private Integer negativeEndingBalanceDayCount;


  public CashflowReportMonthlySummary startDate(LocalDate startDate) {
    
    this.startDate = startDate;
    return this;
  }

   /**
   * The start date of the period covered in this monthly summary.  This date will be the first day of the month, unless the month being covered is a partial month because it is the first month included in the summary and the date range being requested does not begin with the first day of the month.  The date will be returned in an ISO 8601 format (YYYY-MM-DD).
   * @return startDate
  **/
  @ApiModelProperty(required = true, value = "The start date of the period covered in this monthly summary.  This date will be the first day of the month, unless the month being covered is a partial month because it is the first month included in the summary and the date range being requested does not begin with the first day of the month.  The date will be returned in an ISO 8601 format (YYYY-MM-DD).")

  public LocalDate getStartDate() {
    return startDate;
  }


  public void setStartDate(LocalDate startDate) {
    this.startDate = startDate;
  }


  public CashflowReportMonthlySummary endDate(LocalDate endDate) {
    
    this.endDate = endDate;
    return this;
  }

   /**
   * The end date of the period included in this monthly summary.  This date will be the last day of the month, unless the month being covered is a partial month because it is the last month included in the summary and the date range being requested does not end with the last day of the month.  The date will be returned in an ISO 8601 format (YYYY-MM-DD).
   * @return endDate
  **/
  @ApiModelProperty(required = true, value = "The end date of the period included in this monthly summary.  This date will be the last day of the month, unless the month being covered is a partial month because it is the last month included in the summary and the date range being requested does not end with the last day of the month.  The date will be returned in an ISO 8601 format (YYYY-MM-DD).")

  public LocalDate getEndDate() {
    return endDate;
  }


  public void setEndDate(LocalDate endDate) {
    this.endDate = endDate;
  }


  public CashflowReportMonthlySummary startingBalance(CashflowReportMonthlySummaryStartingBalance startingBalance) {
    
    this.startingBalance = startingBalance;
    return this;
  }

   /**
   * Get startingBalance
   * @return startingBalance
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryStartingBalance getStartingBalance() {
    return startingBalance;
  }


  public void setStartingBalance(CashflowReportMonthlySummaryStartingBalance startingBalance) {
    this.startingBalance = startingBalance;
  }


  public CashflowReportMonthlySummary endingBalance(CashflowReportMonthlySummaryEndingBalance endingBalance) {
    
    this.endingBalance = endingBalance;
    return this;
  }

   /**
   * Get endingBalance
   * @return endingBalance
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryEndingBalance getEndingBalance() {
    return endingBalance;
  }


  public void setEndingBalance(CashflowReportMonthlySummaryEndingBalance endingBalance) {
    this.endingBalance = endingBalance;
  }


  public CashflowReportMonthlySummary averageDailyEndingBalance(CashflowReportMonthlySummaryAverageDailyEndingBalance averageDailyEndingBalance) {
    
    this.averageDailyEndingBalance = averageDailyEndingBalance;
    return this;
  }

   /**
   * Get averageDailyEndingBalance
   * @return averageDailyEndingBalance
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryAverageDailyEndingBalance getAverageDailyEndingBalance() {
    return averageDailyEndingBalance;
  }


  public void setAverageDailyEndingBalance(CashflowReportMonthlySummaryAverageDailyEndingBalance averageDailyEndingBalance) {
    this.averageDailyEndingBalance = averageDailyEndingBalance;
  }


  public CashflowReportMonthlySummary averageDailyInflowAmount(CashflowReportMonthlySummaryAverageDailyInflowAmount averageDailyInflowAmount) {
    
    this.averageDailyInflowAmount = averageDailyInflowAmount;
    return this;
  }

   /**
   * Get averageDailyInflowAmount
   * @return averageDailyInflowAmount
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryAverageDailyInflowAmount getAverageDailyInflowAmount() {
    return averageDailyInflowAmount;
  }


  public void setAverageDailyInflowAmount(CashflowReportMonthlySummaryAverageDailyInflowAmount averageDailyInflowAmount) {
    this.averageDailyInflowAmount = averageDailyInflowAmount;
  }


  public CashflowReportMonthlySummary averageDailyOutflowAmount(CashflowReportMonthlySummaryAverageDailyOutflowAmount averageDailyOutflowAmount) {
    
    this.averageDailyOutflowAmount = averageDailyOutflowAmount;
    return this;
  }

   /**
   * Get averageDailyOutflowAmount
   * @return averageDailyOutflowAmount
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryAverageDailyOutflowAmount getAverageDailyOutflowAmount() {
    return averageDailyOutflowAmount;
  }


  public void setAverageDailyOutflowAmount(CashflowReportMonthlySummaryAverageDailyOutflowAmount averageDailyOutflowAmount) {
    this.averageDailyOutflowAmount = averageDailyOutflowAmount;
  }


  public CashflowReportMonthlySummary averageDailyNetCashflowAmount(CashflowReportMonthlySummaryAverageDailyNetCashflowAmount averageDailyNetCashflowAmount) {
    
    this.averageDailyNetCashflowAmount = averageDailyNetCashflowAmount;
    return this;
  }

   /**
   * Get averageDailyNetCashflowAmount
   * @return averageDailyNetCashflowAmount
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryAverageDailyNetCashflowAmount getAverageDailyNetCashflowAmount() {
    return averageDailyNetCashflowAmount;
  }


  public void setAverageDailyNetCashflowAmount(CashflowReportMonthlySummaryAverageDailyNetCashflowAmount averageDailyNetCashflowAmount) {
    this.averageDailyNetCashflowAmount = averageDailyNetCashflowAmount;
  }


  public CashflowReportMonthlySummary averageDailyInflowTransactionCount(Double averageDailyInflowTransactionCount) {
    
    this.averageDailyInflowTransactionCount = averageDailyInflowTransactionCount;
    return this;
  }

   /**
   * The average count of the number of daily inflow transactions. Rounded to 2 decimal places.
   * @return averageDailyInflowTransactionCount
  **/
  @ApiModelProperty(required = true, value = "The average count of the number of daily inflow transactions. Rounded to 2 decimal places.")

  public Double getAverageDailyInflowTransactionCount() {
    return averageDailyInflowTransactionCount;
  }


  public void setAverageDailyInflowTransactionCount(Double averageDailyInflowTransactionCount) {
    this.averageDailyInflowTransactionCount = averageDailyInflowTransactionCount;
  }


  public CashflowReportMonthlySummary averageDailyOutflowTransactionCount(Double averageDailyOutflowTransactionCount) {
    
    this.averageDailyOutflowTransactionCount = averageDailyOutflowTransactionCount;
    return this;
  }

   /**
   * The average count of the number of daily outflow transactions. Rounded to 2 decimal places.
   * @return averageDailyOutflowTransactionCount
  **/
  @ApiModelProperty(required = true, value = "The average count of the number of daily outflow transactions. Rounded to 2 decimal places.")

  public Double getAverageDailyOutflowTransactionCount() {
    return averageDailyOutflowTransactionCount;
  }


  public void setAverageDailyOutflowTransactionCount(Double averageDailyOutflowTransactionCount) {
    this.averageDailyOutflowTransactionCount = averageDailyOutflowTransactionCount;
  }


  public CashflowReportMonthlySummary totalRevenue(CashflowReportMonthlySummaryTotalRevenue totalRevenue) {
    
    this.totalRevenue = totalRevenue;
    return this;
  }

   /**
   * Get totalRevenue
   * @return totalRevenue
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryTotalRevenue getTotalRevenue() {
    return totalRevenue;
  }


  public void setTotalRevenue(CashflowReportMonthlySummaryTotalRevenue totalRevenue) {
    this.totalRevenue = totalRevenue;
  }


  public CashflowReportMonthlySummary totalLoanPayment(CashflowReportMonthlySummaryTotalLoanPayment totalLoanPayment) {
    
    this.totalLoanPayment = totalLoanPayment;
    return this;
  }

   /**
   * Get totalLoanPayment
   * @return totalLoanPayment
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryTotalLoanPayment getTotalLoanPayment() {
    return totalLoanPayment;
  }


  public void setTotalLoanPayment(CashflowReportMonthlySummaryTotalLoanPayment totalLoanPayment) {
    this.totalLoanPayment = totalLoanPayment;
  }


  public CashflowReportMonthlySummary totalVariableExpense(CashflowReportMonthlySummaryTotalVariableExpense totalVariableExpense) {
    
    this.totalVariableExpense = totalVariableExpense;
    return this;
  }

   /**
   * Get totalVariableExpense
   * @return totalVariableExpense
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryTotalVariableExpense getTotalVariableExpense() {
    return totalVariableExpense;
  }


  public void setTotalVariableExpense(CashflowReportMonthlySummaryTotalVariableExpense totalVariableExpense) {
    this.totalVariableExpense = totalVariableExpense;
  }


  public CashflowReportMonthlySummary totalPayroll(CashflowReportMonthlySummaryTotalPayroll totalPayroll) {
    
    this.totalPayroll = totalPayroll;
    return this;
  }

   /**
   * Get totalPayroll
   * @return totalPayroll
  **/
  @ApiModelProperty(required = true, value = "")

  public CashflowReportMonthlySummaryTotalPayroll getTotalPayroll() {
    return totalPayroll;
  }


  public void setTotalPayroll(CashflowReportMonthlySummaryTotalPayroll totalPayroll) {
    this.totalPayroll = totalPayroll;
  }


  public CashflowReportMonthlySummary nsfTransactionCount(Integer nsfTransactionCount) {
    
    this.nsfTransactionCount = nsfTransactionCount;
    return this;
  }

   /**
   * The total number of all NSF transactions during this month.
   * @return nsfTransactionCount
  **/
  @ApiModelProperty(required = true, value = "The total number of all NSF transactions during this month.")

  public Integer getNsfTransactionCount() {
    return nsfTransactionCount;
  }


  public void setNsfTransactionCount(Integer nsfTransactionCount) {
    this.nsfTransactionCount = nsfTransactionCount;
  }


  public CashflowReportMonthlySummary overdraftTransactionCount(Integer overdraftTransactionCount) {
    
    this.overdraftTransactionCount = overdraftTransactionCount;
    return this;
  }

   /**
   * The total number of all overdraft transactions during this month.
   * @return overdraftTransactionCount
  **/
  @ApiModelProperty(required = true, value = "The total number of all overdraft transactions during this month.")

  public Integer getOverdraftTransactionCount() {
    return overdraftTransactionCount;
  }


  public void setOverdraftTransactionCount(Integer overdraftTransactionCount) {
    this.overdraftTransactionCount = overdraftTransactionCount;
  }


  public CashflowReportMonthlySummary negativeEndingBalanceDayCount(Integer negativeEndingBalanceDayCount) {
    
    this.negativeEndingBalanceDayCount = negativeEndingBalanceDayCount;
    return this;
  }

   /**
   * The number of days with a negative daily average ending balance. The daily average is calculated across all valid accounts. Values will be in the range [0, 31].
   * @return negativeEndingBalanceDayCount
  **/
  @ApiModelProperty(required = true, value = "The number of days with a negative daily average ending balance. The daily average is calculated across all valid accounts. Values will be in the range [0, 31].")

  public Integer getNegativeEndingBalanceDayCount() {
    return negativeEndingBalanceDayCount;
  }


  public void setNegativeEndingBalanceDayCount(Integer negativeEndingBalanceDayCount) {
    this.negativeEndingBalanceDayCount = negativeEndingBalanceDayCount;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CashflowReportMonthlySummary cashflowReportMonthlySummary = (CashflowReportMonthlySummary) o;
    return Objects.equals(this.startDate, cashflowReportMonthlySummary.startDate) &&
        Objects.equals(this.endDate, cashflowReportMonthlySummary.endDate) &&
        Objects.equals(this.startingBalance, cashflowReportMonthlySummary.startingBalance) &&
        Objects.equals(this.endingBalance, cashflowReportMonthlySummary.endingBalance) &&
        Objects.equals(this.averageDailyEndingBalance, cashflowReportMonthlySummary.averageDailyEndingBalance) &&
        Objects.equals(this.averageDailyInflowAmount, cashflowReportMonthlySummary.averageDailyInflowAmount) &&
        Objects.equals(this.averageDailyOutflowAmount, cashflowReportMonthlySummary.averageDailyOutflowAmount) &&
        Objects.equals(this.averageDailyNetCashflowAmount, cashflowReportMonthlySummary.averageDailyNetCashflowAmount) &&
        Objects.equals(this.averageDailyInflowTransactionCount, cashflowReportMonthlySummary.averageDailyInflowTransactionCount) &&
        Objects.equals(this.averageDailyOutflowTransactionCount, cashflowReportMonthlySummary.averageDailyOutflowTransactionCount) &&
        Objects.equals(this.totalRevenue, cashflowReportMonthlySummary.totalRevenue) &&
        Objects.equals(this.totalLoanPayment, cashflowReportMonthlySummary.totalLoanPayment) &&
        Objects.equals(this.totalVariableExpense, cashflowReportMonthlySummary.totalVariableExpense) &&
        Objects.equals(this.totalPayroll, cashflowReportMonthlySummary.totalPayroll) &&
        Objects.equals(this.nsfTransactionCount, cashflowReportMonthlySummary.nsfTransactionCount) &&
        Objects.equals(this.overdraftTransactionCount, cashflowReportMonthlySummary.overdraftTransactionCount) &&
        Objects.equals(this.negativeEndingBalanceDayCount, cashflowReportMonthlySummary.negativeEndingBalanceDayCount);
  }

  @Override
  public int hashCode() {
    return Objects.hash(startDate, endDate, startingBalance, endingBalance, averageDailyEndingBalance, averageDailyInflowAmount, averageDailyOutflowAmount, averageDailyNetCashflowAmount, averageDailyInflowTransactionCount, averageDailyOutflowTransactionCount, totalRevenue, totalLoanPayment, totalVariableExpense, totalPayroll, nsfTransactionCount, overdraftTransactionCount, negativeEndingBalanceDayCount);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CashflowReportMonthlySummary {\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    startingBalance: ").append(toIndentedString(startingBalance)).append("\n");
    sb.append("    endingBalance: ").append(toIndentedString(endingBalance)).append("\n");
    sb.append("    averageDailyEndingBalance: ").append(toIndentedString(averageDailyEndingBalance)).append("\n");
    sb.append("    averageDailyInflowAmount: ").append(toIndentedString(averageDailyInflowAmount)).append("\n");
    sb.append("    averageDailyOutflowAmount: ").append(toIndentedString(averageDailyOutflowAmount)).append("\n");
    sb.append("    averageDailyNetCashflowAmount: ").append(toIndentedString(averageDailyNetCashflowAmount)).append("\n");
    sb.append("    averageDailyInflowTransactionCount: ").append(toIndentedString(averageDailyInflowTransactionCount)).append("\n");
    sb.append("    averageDailyOutflowTransactionCount: ").append(toIndentedString(averageDailyOutflowTransactionCount)).append("\n");
    sb.append("    totalRevenue: ").append(toIndentedString(totalRevenue)).append("\n");
    sb.append("    totalLoanPayment: ").append(toIndentedString(totalLoanPayment)).append("\n");
    sb.append("    totalVariableExpense: ").append(toIndentedString(totalVariableExpense)).append("\n");
    sb.append("    totalPayroll: ").append(toIndentedString(totalPayroll)).append("\n");
    sb.append("    nsfTransactionCount: ").append(toIndentedString(nsfTransactionCount)).append("\n");
    sb.append("    overdraftTransactionCount: ").append(toIndentedString(overdraftTransactionCount)).append("\n");
    sb.append("    negativeEndingBalanceDayCount: ").append(toIndentedString(negativeEndingBalanceDayCount)).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    ");
  }

}

