/*
 * 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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;

/**
 * Represents a ledger event in the Transfers API.
 */
@ApiModel(description = "Represents a ledger event in the Transfers API.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class TransferLedgerEvent {
  public static final String SERIALIZED_NAME_LEDGER_EVENT_ID = "ledger_event_id";
  @SerializedName(SERIALIZED_NAME_LEDGER_EVENT_ID)
  private String ledgerEventId;

  public static final String SERIALIZED_NAME_LEDGER_ID = "ledger_id";
  @SerializedName(SERIALIZED_NAME_LEDGER_ID)
  private String ledgerId;

  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private String amount;

  public static final String SERIALIZED_NAME_TRANSFER_ID = "transfer_id";
  @SerializedName(SERIALIZED_NAME_TRANSFER_ID)
  private String transferId;

  public static final String SERIALIZED_NAME_REFUND_ID = "refund_id";
  @SerializedName(SERIALIZED_NAME_REFUND_ID)
  private String refundId;

  public static final String SERIALIZED_NAME_SWEEP_ID = "sweep_id";
  @SerializedName(SERIALIZED_NAME_SWEEP_ID)
  private String sweepId;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_PENDING_BALANCE = "pending_balance";
  @SerializedName(SERIALIZED_NAME_PENDING_BALANCE)
  private String pendingBalance;

  public static final String SERIALIZED_NAME_AVAILABLE_BALANCE = "available_balance";
  @SerializedName(SERIALIZED_NAME_AVAILABLE_BALANCE)
  private String availableBalance;

  public static final String SERIALIZED_NAME_TYPE = "type";
  @SerializedName(SERIALIZED_NAME_TYPE)
  private String type;

  public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp";
  @SerializedName(SERIALIZED_NAME_TIMESTAMP)
  private OffsetDateTime timestamp;


  public TransferLedgerEvent ledgerEventId(String ledgerEventId) {
    
    this.ledgerEventId = ledgerEventId;
    return this;
  }

   /**
   * Plaid&#39;s unique identifier for this ledger event.
   * @return ledgerEventId
  **/
  @ApiModelProperty(required = true, value = "Plaid's unique identifier for this ledger event.")

  public String getLedgerEventId() {
    return ledgerEventId;
  }


  public void setLedgerEventId(String ledgerEventId) {
    this.ledgerEventId = ledgerEventId;
  }


  public TransferLedgerEvent ledgerId(String ledgerId) {
    
    this.ledgerId = ledgerId;
    return this;
  }

   /**
   * The ID of the ledger this event belongs to.
   * @return ledgerId
  **/
  @ApiModelProperty(required = true, value = "The ID of the ledger this event belongs to.")

  public String getLedgerId() {
    return ledgerId;
  }


  public void setLedgerId(String ledgerId) {
    this.ledgerId = ledgerId;
  }


  public TransferLedgerEvent amount(String amount) {
    
    this.amount = amount;
    return this;
  }

   /**
   * The amount of the ledger event as a decimal string.
   * @return amount
  **/
  @ApiModelProperty(required = true, value = "The amount of the ledger event as a decimal string.")

  public String getAmount() {
    return amount;
  }


  public void setAmount(String amount) {
    this.amount = amount;
  }


  public TransferLedgerEvent transferId(String transferId) {
    
    this.transferId = transferId;
    return this;
  }

   /**
   * The ID of the transfer source that triggered this ledger event.
   * @return transferId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The ID of the transfer source that triggered this ledger event.")

  public String getTransferId() {
    return transferId;
  }


  public void setTransferId(String transferId) {
    this.transferId = transferId;
  }


  public TransferLedgerEvent refundId(String refundId) {
    
    this.refundId = refundId;
    return this;
  }

   /**
   * The ID of the refund source that triggered this ledger event.
   * @return refundId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The ID of the refund source that triggered this ledger event.")

  public String getRefundId() {
    return refundId;
  }


  public void setRefundId(String refundId) {
    this.refundId = refundId;
  }


  public TransferLedgerEvent sweepId(String sweepId) {
    
    this.sweepId = sweepId;
    return this;
  }

   /**
   * The ID of the sweep source that triggered this ledger event.
   * @return sweepId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The ID of the sweep source that triggered this ledger event.")

  public String getSweepId() {
    return sweepId;
  }


  public void setSweepId(String sweepId) {
    this.sweepId = sweepId;
  }


  public TransferLedgerEvent description(String description) {
    
    this.description = description;
    return this;
  }

   /**
   * A description of the ledger event.
   * @return description
  **/
  @ApiModelProperty(required = true, value = "A description of the ledger event.")

  public String getDescription() {
    return description;
  }


  public void setDescription(String description) {
    this.description = description;
  }


  public TransferLedgerEvent pendingBalance(String pendingBalance) {
    
    this.pendingBalance = pendingBalance;
    return this;
  }

   /**
   * The new pending balance after this event.
   * @return pendingBalance
  **/
  @ApiModelProperty(required = true, value = "The new pending balance after this event.")

  public String getPendingBalance() {
    return pendingBalance;
  }


  public void setPendingBalance(String pendingBalance) {
    this.pendingBalance = pendingBalance;
  }


  public TransferLedgerEvent availableBalance(String availableBalance) {
    
    this.availableBalance = availableBalance;
    return this;
  }

   /**
   * The new available balance after this event.
   * @return availableBalance
  **/
  @ApiModelProperty(required = true, value = "The new available balance after this event.")

  public String getAvailableBalance() {
    return availableBalance;
  }


  public void setAvailableBalance(String availableBalance) {
    this.availableBalance = availableBalance;
  }


  public TransferLedgerEvent type(String type) {
    
    this.type = type;
    return this;
  }

   /**
   * The type of balance that was impacted by this event.
   * @return type
  **/
  @ApiModelProperty(required = true, value = "The type of balance that was impacted by this event.")

  public String getType() {
    return type;
  }


  public void setType(String type) {
    this.type = type;
  }


  public TransferLedgerEvent timestamp(OffsetDateTime timestamp) {
    
    this.timestamp = timestamp;
    return this;
  }

   /**
   * The datetime when this ledger event occurred.
   * @return timestamp
  **/
  @ApiModelProperty(required = true, value = "The datetime when this ledger event occurred.")

  public OffsetDateTime getTimestamp() {
    return timestamp;
  }


  public void setTimestamp(OffsetDateTime timestamp) {
    this.timestamp = timestamp;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TransferLedgerEvent transferLedgerEvent = (TransferLedgerEvent) o;
    return Objects.equals(this.ledgerEventId, transferLedgerEvent.ledgerEventId) &&
        Objects.equals(this.ledgerId, transferLedgerEvent.ledgerId) &&
        Objects.equals(this.amount, transferLedgerEvent.amount) &&
        Objects.equals(this.transferId, transferLedgerEvent.transferId) &&
        Objects.equals(this.refundId, transferLedgerEvent.refundId) &&
        Objects.equals(this.sweepId, transferLedgerEvent.sweepId) &&
        Objects.equals(this.description, transferLedgerEvent.description) &&
        Objects.equals(this.pendingBalance, transferLedgerEvent.pendingBalance) &&
        Objects.equals(this.availableBalance, transferLedgerEvent.availableBalance) &&
        Objects.equals(this.type, transferLedgerEvent.type) &&
        Objects.equals(this.timestamp, transferLedgerEvent.timestamp);
  }

  @Override
  public int hashCode() {
    return Objects.hash(ledgerEventId, ledgerId, amount, transferId, refundId, sweepId, description, pendingBalance, availableBalance, type, timestamp);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TransferLedgerEvent {\n");
    sb.append("    ledgerEventId: ").append(toIndentedString(ledgerEventId)).append("\n");
    sb.append("    ledgerId: ").append(toIndentedString(ledgerId)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    transferId: ").append(toIndentedString(transferId)).append("\n");
    sb.append("    refundId: ").append(toIndentedString(refundId)).append("\n");
    sb.append("    sweepId: ").append(toIndentedString(sweepId)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    pendingBalance: ").append(toIndentedString(pendingBalance)).append("\n");
    sb.append("    availableBalance: ").append(toIndentedString(availableBalance)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    timestamp: ").append(toIndentedString(timestamp)).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    ");
  }

}

