/*
 * 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.InvestmentTransaction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * Object containing information on contribution transactions for the 401k account. Note that the sum fields in this object represent the total of absolute contribution values.
 */
@ApiModel(description = "Object containing information on contribution transactions for the 401k account. Note that the sum fields in this object represent the total of absolute contribution values.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class InvestmentsAuth401kContributionDetails {
  public static final String SERIALIZED_NAME_LAST_CONTRIBUTION_TRANSACTIONS = "last_contribution_transactions";
  @SerializedName(SERIALIZED_NAME_LAST_CONTRIBUTION_TRANSACTIONS)
  private List<InvestmentTransaction> lastContributionTransactions = new ArrayList<>();

  public static final String SERIALIZED_NAME_CONTRIBUTION_COUNT1M = "contribution_count_1m";
  @SerializedName(SERIALIZED_NAME_CONTRIBUTION_COUNT1M)
  private Integer contributionCount1m;

  public static final String SERIALIZED_NAME_CONTRIBUTION_AMOUNT1M = "contribution_amount_1m";
  @SerializedName(SERIALIZED_NAME_CONTRIBUTION_AMOUNT1M)
  private Float contributionAmount1m;

  public static final String SERIALIZED_NAME_CONTRIBUTION_COUNT6M = "contribution_count_6m";
  @SerializedName(SERIALIZED_NAME_CONTRIBUTION_COUNT6M)
  private Integer contributionCount6m;

  public static final String SERIALIZED_NAME_CONTRIBUTION_AMOUNT6M = "contribution_amount_6m";
  @SerializedName(SERIALIZED_NAME_CONTRIBUTION_AMOUNT6M)
  private Float contributionAmount6m;

  public static final String SERIALIZED_NAME_CONTRIBUTION_COUNT12M = "contribution_count_12m";
  @SerializedName(SERIALIZED_NAME_CONTRIBUTION_COUNT12M)
  private Integer contributionCount12m;

  public static final String SERIALIZED_NAME_CONTRIBUTION_AMOUNT12M = "contribution_amount_12m";
  @SerializedName(SERIALIZED_NAME_CONTRIBUTION_AMOUNT12M)
  private Float contributionAmount12m;


  public InvestmentsAuth401kContributionDetails lastContributionTransactions(List<InvestmentTransaction> lastContributionTransactions) {
    
    this.lastContributionTransactions = lastContributionTransactions;
    return this;
  }

  public InvestmentsAuth401kContributionDetails addLastContributionTransactionsItem(InvestmentTransaction lastContributionTransactionsItem) {
    this.lastContributionTransactions.add(lastContributionTransactionsItem);
    return this;
  }

   /**
   * A list of the most recent contribution transactions for the 401k account. Includes all contributions made on the same day.
   * @return lastContributionTransactions
  **/
  @ApiModelProperty(required = true, value = "A list of the most recent contribution transactions for the 401k account. Includes all contributions made on the same day.")

  public List<InvestmentTransaction> getLastContributionTransactions() {
    return lastContributionTransactions;
  }


  public void setLastContributionTransactions(List<InvestmentTransaction> lastContributionTransactions) {
    this.lastContributionTransactions = lastContributionTransactions;
  }


  public InvestmentsAuth401kContributionDetails contributionCount1m(Integer contributionCount1m) {
    
    this.contributionCount1m = contributionCount1m;
    return this;
  }

   /**
   * Number of contribution transactions on this account, for the past month.
   * @return contributionCount1m
  **/
  @ApiModelProperty(required = true, value = "Number of contribution transactions on this account, for the past month.")

  public Integer getContributionCount1m() {
    return contributionCount1m;
  }


  public void setContributionCount1m(Integer contributionCount1m) {
    this.contributionCount1m = contributionCount1m;
  }


  public InvestmentsAuth401kContributionDetails contributionAmount1m(Float contributionAmount1m) {
    
    this.contributionAmount1m = contributionAmount1m;
    return this;
  }

   /**
   * Sum of the contribution transactions on this account, for the past month.
   * @return contributionAmount1m
  **/
  @ApiModelProperty(required = true, value = "Sum of the contribution transactions on this account, for the past month.")

  public Float getContributionAmount1m() {
    return contributionAmount1m;
  }


  public void setContributionAmount1m(Float contributionAmount1m) {
    this.contributionAmount1m = contributionAmount1m;
  }


  public InvestmentsAuth401kContributionDetails contributionCount6m(Integer contributionCount6m) {
    
    this.contributionCount6m = contributionCount6m;
    return this;
  }

   /**
   * Number of contribution transactions on this account, for the past 6 months.
   * @return contributionCount6m
  **/
  @ApiModelProperty(required = true, value = "Number of contribution transactions on this account, for the past 6 months.")

  public Integer getContributionCount6m() {
    return contributionCount6m;
  }


  public void setContributionCount6m(Integer contributionCount6m) {
    this.contributionCount6m = contributionCount6m;
  }


  public InvestmentsAuth401kContributionDetails contributionAmount6m(Float contributionAmount6m) {
    
    this.contributionAmount6m = contributionAmount6m;
    return this;
  }

   /**
   * Sum of the contribution transactions on this account, for the past 6 months.
   * @return contributionAmount6m
  **/
  @ApiModelProperty(required = true, value = "Sum of the contribution transactions on this account, for the past 6 months.")

  public Float getContributionAmount6m() {
    return contributionAmount6m;
  }


  public void setContributionAmount6m(Float contributionAmount6m) {
    this.contributionAmount6m = contributionAmount6m;
  }


  public InvestmentsAuth401kContributionDetails contributionCount12m(Integer contributionCount12m) {
    
    this.contributionCount12m = contributionCount12m;
    return this;
  }

   /**
   * Number of contribution transactions on this account, for the past 12 months.
   * @return contributionCount12m
  **/
  @ApiModelProperty(required = true, value = "Number of contribution transactions on this account, for the past 12 months.")

  public Integer getContributionCount12m() {
    return contributionCount12m;
  }


  public void setContributionCount12m(Integer contributionCount12m) {
    this.contributionCount12m = contributionCount12m;
  }


  public InvestmentsAuth401kContributionDetails contributionAmount12m(Float contributionAmount12m) {
    
    this.contributionAmount12m = contributionAmount12m;
    return this;
  }

   /**
   * Sum of the contribution transactions on this account, for the past 12 months.
   * @return contributionAmount12m
  **/
  @ApiModelProperty(required = true, value = "Sum of the contribution transactions on this account, for the past 12 months.")

  public Float getContributionAmount12m() {
    return contributionAmount12m;
  }


  public void setContributionAmount12m(Float contributionAmount12m) {
    this.contributionAmount12m = contributionAmount12m;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    InvestmentsAuth401kContributionDetails investmentsAuth401kContributionDetails = (InvestmentsAuth401kContributionDetails) o;
    return Objects.equals(this.lastContributionTransactions, investmentsAuth401kContributionDetails.lastContributionTransactions) &&
        Objects.equals(this.contributionCount1m, investmentsAuth401kContributionDetails.contributionCount1m) &&
        Objects.equals(this.contributionAmount1m, investmentsAuth401kContributionDetails.contributionAmount1m) &&
        Objects.equals(this.contributionCount6m, investmentsAuth401kContributionDetails.contributionCount6m) &&
        Objects.equals(this.contributionAmount6m, investmentsAuth401kContributionDetails.contributionAmount6m) &&
        Objects.equals(this.contributionCount12m, investmentsAuth401kContributionDetails.contributionCount12m) &&
        Objects.equals(this.contributionAmount12m, investmentsAuth401kContributionDetails.contributionAmount12m);
  }

  @Override
  public int hashCode() {
    return Objects.hash(lastContributionTransactions, contributionCount1m, contributionAmount1m, contributionCount6m, contributionAmount6m, contributionCount12m, contributionAmount12m);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class InvestmentsAuth401kContributionDetails {\n");
    sb.append("    lastContributionTransactions: ").append(toIndentedString(lastContributionTransactions)).append("\n");
    sb.append("    contributionCount1m: ").append(toIndentedString(contributionCount1m)).append("\n");
    sb.append("    contributionAmount1m: ").append(toIndentedString(contributionAmount1m)).append("\n");
    sb.append("    contributionCount6m: ").append(toIndentedString(contributionCount6m)).append("\n");
    sb.append("    contributionAmount6m: ").append(toIndentedString(contributionAmount6m)).append("\n");
    sb.append("    contributionCount12m: ").append(toIndentedString(contributionCount12m)).append("\n");
    sb.append("    contributionAmount12m: ").append(toIndentedString(contributionAmount12m)).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    ");
  }

}

