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

/**
 * Insights into unusually large transactions that exceed typical spending patterns for the account.
 */
@ApiModel(description = "Insights into unusually large transactions that exceed typical spending patterns for the account.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class OutlierTransactionsInsights {
  public static final String SERIALIZED_NAME_TRANSACTIONS_COUNT = "transactions_count";
  @SerializedName(SERIALIZED_NAME_TRANSACTIONS_COUNT)
  private Integer transactionsCount;

  public static final String SERIALIZED_NAME_TOTAL_AMOUNT = "total_amount";
  @SerializedName(SERIALIZED_NAME_TOTAL_AMOUNT)
  private AmountWithCurrency totalAmount;

  public static final String SERIALIZED_NAME_TOP_CATEGORIES = "top_categories";
  @SerializedName(SERIALIZED_NAME_TOP_CATEGORIES)
  private List<CategoryExpenses> topCategories = null;


  public OutlierTransactionsInsights transactionsCount(Integer transactionsCount) {
    
    this.transactionsCount = transactionsCount;
    return this;
  }

   /**
   * The total number of transactions whose value is above the threshold of normal amounts for a given account.
   * @return transactionsCount
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The total number of transactions whose value is above the threshold of normal amounts for a given account.")

  public Integer getTransactionsCount() {
    return transactionsCount;
  }


  public void setTransactionsCount(Integer transactionsCount) {
    this.transactionsCount = transactionsCount;
  }


  public OutlierTransactionsInsights totalAmount(AmountWithCurrency totalAmount) {
    
    this.totalAmount = totalAmount;
    return this;
  }

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

  public AmountWithCurrency getTotalAmount() {
    return totalAmount;
  }


  public void setTotalAmount(AmountWithCurrency totalAmount) {
    this.totalAmount = totalAmount;
  }


  public OutlierTransactionsInsights topCategories(List<CategoryExpenses> topCategories) {
    
    this.topCategories = topCategories;
    return this;
  }

  public OutlierTransactionsInsights addTopCategoriesItem(CategoryExpenses topCategoriesItem) {
    if (this.topCategories == null) {
      this.topCategories = new ArrayList<>();
    }
    this.topCategories.add(topCategoriesItem);
    return this;
  }

   /**
   * Up to 3 top categories of expenses in this group.
   * @return topCategories
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Up to 3 top categories of expenses in this group.")

  public List<CategoryExpenses> getTopCategories() {
    return topCategories;
  }


  public void setTopCategories(List<CategoryExpenses> topCategories) {
    this.topCategories = topCategories;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OutlierTransactionsInsights outlierTransactionsInsights = (OutlierTransactionsInsights) o;
    return Objects.equals(this.transactionsCount, outlierTransactionsInsights.transactionsCount) &&
        Objects.equals(this.totalAmount, outlierTransactionsInsights.totalAmount) &&
        Objects.equals(this.topCategories, outlierTransactionsInsights.topCategories);
  }

  @Override
  public int hashCode() {
    return Objects.hash(transactionsCount, totalAmount, topCategories);
  }

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

}

