/*
 * 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.AmountWithCurrencyWithMonthlyAverage;
import com.plaid.client.model.ExpenditureSummary;
import com.plaid.client.model.OutlierTransactionsInsights;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * Comprehensive analysis of spending patterns, categorizing expenses into essential, non-essential, and other categories.
 */
@ApiModel(description = "Comprehensive analysis of spending patterns, categorizing expenses into essential, non-essential, and other categories.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class ExpenditureInsights {
  public static final String SERIALIZED_NAME_CASH_FLOW = "cash_flow";
  @SerializedName(SERIALIZED_NAME_CASH_FLOW)
  private AmountWithCurrencyWithMonthlyAverage cashFlow;

  public static final String SERIALIZED_NAME_TOTAL_EXPENDITURE = "total_expenditure";
  @SerializedName(SERIALIZED_NAME_TOTAL_EXPENDITURE)
  private ExpenditureSummary totalExpenditure;

  public static final String SERIALIZED_NAME_ESSENTIAL_EXPENDITURE = "essential_expenditure";
  @SerializedName(SERIALIZED_NAME_ESSENTIAL_EXPENDITURE)
  private ExpenditureSummary essentialExpenditure;

  public static final String SERIALIZED_NAME_NON_ESSENTIAL_EXPENDITURE = "non_essential_expenditure";
  @SerializedName(SERIALIZED_NAME_NON_ESSENTIAL_EXPENDITURE)
  private ExpenditureSummary nonEssentialExpenditure;

  public static final String SERIALIZED_NAME_OTHER = "other";
  @SerializedName(SERIALIZED_NAME_OTHER)
  private ExpenditureSummary other;

  public static final String SERIALIZED_NAME_TRANSFERS_OUT = "transfers_out";
  @SerializedName(SERIALIZED_NAME_TRANSFERS_OUT)
  private ExpenditureSummary transfersOut;

  public static final String SERIALIZED_NAME_OUTLIER_TRANSACTIONS = "outlier_transactions";
  @SerializedName(SERIALIZED_NAME_OUTLIER_TRANSACTIONS)
  private OutlierTransactionsInsights outlierTransactions;


  public ExpenditureInsights cashFlow(AmountWithCurrencyWithMonthlyAverage cashFlow) {
    
    this.cashFlow = cashFlow;
    return this;
  }

   /**
   * Net cash flow for the period (inflows minus outflows), including a monthly average.
   * @return cashFlow
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Net cash flow for the period (inflows minus outflows), including a monthly average.")

  public AmountWithCurrencyWithMonthlyAverage getCashFlow() {
    return cashFlow;
  }


  public void setCashFlow(AmountWithCurrencyWithMonthlyAverage cashFlow) {
    this.cashFlow = cashFlow;
  }


  public ExpenditureInsights totalExpenditure(ExpenditureSummary totalExpenditure) {
    
    this.totalExpenditure = totalExpenditure;
    return this;
  }

   /**
   * Get totalExpenditure
   * @return totalExpenditure
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ExpenditureSummary getTotalExpenditure() {
    return totalExpenditure;
  }


  public void setTotalExpenditure(ExpenditureSummary totalExpenditure) {
    this.totalExpenditure = totalExpenditure;
  }


  public ExpenditureInsights essentialExpenditure(ExpenditureSummary essentialExpenditure) {
    
    this.essentialExpenditure = essentialExpenditure;
    return this;
  }

   /**
   * Get essentialExpenditure
   * @return essentialExpenditure
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ExpenditureSummary getEssentialExpenditure() {
    return essentialExpenditure;
  }


  public void setEssentialExpenditure(ExpenditureSummary essentialExpenditure) {
    this.essentialExpenditure = essentialExpenditure;
  }


  public ExpenditureInsights nonEssentialExpenditure(ExpenditureSummary nonEssentialExpenditure) {
    
    this.nonEssentialExpenditure = nonEssentialExpenditure;
    return this;
  }

   /**
   * Get nonEssentialExpenditure
   * @return nonEssentialExpenditure
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ExpenditureSummary getNonEssentialExpenditure() {
    return nonEssentialExpenditure;
  }


  public void setNonEssentialExpenditure(ExpenditureSummary nonEssentialExpenditure) {
    this.nonEssentialExpenditure = nonEssentialExpenditure;
  }


  public ExpenditureInsights other(ExpenditureSummary other) {
    
    this.other = other;
    return this;
  }

   /**
   * Get other
   * @return other
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ExpenditureSummary getOther() {
    return other;
  }


  public void setOther(ExpenditureSummary other) {
    this.other = other;
  }


  public ExpenditureInsights transfersOut(ExpenditureSummary transfersOut) {
    
    this.transfersOut = transfersOut;
    return this;
  }

   /**
   * Get transfersOut
   * @return transfersOut
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ExpenditureSummary getTransfersOut() {
    return transfersOut;
  }


  public void setTransfersOut(ExpenditureSummary transfersOut) {
    this.transfersOut = transfersOut;
  }


  public ExpenditureInsights outlierTransactions(OutlierTransactionsInsights outlierTransactions) {
    
    this.outlierTransactions = outlierTransactions;
    return this;
  }

   /**
   * Get outlierTransactions
   * @return outlierTransactions
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public OutlierTransactionsInsights getOutlierTransactions() {
    return outlierTransactions;
  }


  public void setOutlierTransactions(OutlierTransactionsInsights outlierTransactions) {
    this.outlierTransactions = outlierTransactions;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExpenditureInsights expenditureInsights = (ExpenditureInsights) o;
    return Objects.equals(this.cashFlow, expenditureInsights.cashFlow) &&
        Objects.equals(this.totalExpenditure, expenditureInsights.totalExpenditure) &&
        Objects.equals(this.essentialExpenditure, expenditureInsights.essentialExpenditure) &&
        Objects.equals(this.nonEssentialExpenditure, expenditureInsights.nonEssentialExpenditure) &&
        Objects.equals(this.other, expenditureInsights.other) &&
        Objects.equals(this.transfersOut, expenditureInsights.transfersOut) &&
        Objects.equals(this.outlierTransactions, expenditureInsights.outlierTransactions);
  }

  @Override
  public int hashCode() {
    return Objects.hash(cashFlow, totalExpenditure, essentialExpenditure, nonEssentialExpenditure, other, transfersOut, outlierTransactions);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ExpenditureInsights {\n");
    sb.append("    cashFlow: ").append(toIndentedString(cashFlow)).append("\n");
    sb.append("    totalExpenditure: ").append(toIndentedString(totalExpenditure)).append("\n");
    sb.append("    essentialExpenditure: ").append(toIndentedString(essentialExpenditure)).append("\n");
    sb.append("    nonEssentialExpenditure: ").append(toIndentedString(nonEssentialExpenditure)).append("\n");
    sb.append("    other: ").append(toIndentedString(other)).append("\n");
    sb.append("    transfersOut: ").append(toIndentedString(transfersOut)).append("\n");
    sb.append("    outlierTransactions: ").append(toIndentedString(outlierTransactions)).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    ");
  }

}

