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

/**
 * The latest scored event for a user.
 */
@ApiModel(description = "The latest scored event for a user.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class LatestScoredEvent {
  public static final String SERIALIZED_NAME_EVENT_ID = "event_id";
  @SerializedName(SERIALIZED_NAME_EVENT_ID)
  private String eventId;

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

  public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type";
  @SerializedName(SERIALIZED_NAME_EVENT_TYPE)
  private String eventType;

  public static final String SERIALIZED_NAME_TRUST_INDEX = "trust_index";
  @SerializedName(SERIALIZED_NAME_TRUST_INDEX)
  private TrustIndex trustIndex;

  public static final String SERIALIZED_NAME_FRAUD_ATTRIBUTES = "fraud_attributes";
  @SerializedName(SERIALIZED_NAME_FRAUD_ATTRIBUTES)
  private Object fraudAttributes;


  public LatestScoredEvent eventId(String eventId) {
    
    this.eventId = eventId;
    return this;
  }

   /**
   * The event ID.
   * @return eventId
  **/
  @ApiModelProperty(required = true, value = "The event ID.")

  public String getEventId() {
    return eventId;
  }


  public void setEventId(String eventId) {
    this.eventId = eventId;
  }


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

   /**
   * The timestamp of the event, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format, e.g. &#x60;\&quot;2017-09-14T14:42:19.350Z\&quot;&#x60;
   * @return timestamp
  **/
  @ApiModelProperty(required = true, value = "The timestamp of the event, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format, e.g. `\"2017-09-14T14:42:19.350Z\"`")

  public OffsetDateTime getTimestamp() {
    return timestamp;
  }


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


  public LatestScoredEvent eventType(String eventType) {
    
    this.eventType = eventType;
    return this;
  }

   /**
   * The type of event.
   * @return eventType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The type of event.")

  public String getEventType() {
    return eventType;
  }


  public void setEventType(String eventType) {
    this.eventType = eventType;
  }


  public LatestScoredEvent trustIndex(TrustIndex trustIndex) {
    
    this.trustIndex = trustIndex;
    return this;
  }

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

  public TrustIndex getTrustIndex() {
    return trustIndex;
  }


  public void setTrustIndex(TrustIndex trustIndex) {
    this.trustIndex = trustIndex;
  }


  public LatestScoredEvent fraudAttributes(Object fraudAttributes) {
    
    this.fraudAttributes = fraudAttributes;
    return this;
  }

   /**
   * Event fraud attributes as an arbitrary set of key-value pairs.
   * @return fraudAttributes
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "Event fraud attributes as an arbitrary set of key-value pairs.")

  public Object getFraudAttributes() {
    return fraudAttributes;
  }


  public void setFraudAttributes(Object fraudAttributes) {
    this.fraudAttributes = fraudAttributes;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LatestScoredEvent latestScoredEvent = (LatestScoredEvent) o;
    return Objects.equals(this.eventId, latestScoredEvent.eventId) &&
        Objects.equals(this.timestamp, latestScoredEvent.timestamp) &&
        Objects.equals(this.eventType, latestScoredEvent.eventType) &&
        Objects.equals(this.trustIndex, latestScoredEvent.trustIndex) &&
        Objects.equals(this.fraudAttributes, latestScoredEvent.fraudAttributes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(eventId, timestamp, eventType, trustIndex, fraudAttributes);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LatestScoredEvent {\n");
    sb.append("    eventId: ").append(toIndentedString(eventId)).append("\n");
    sb.append("    timestamp: ").append(toIndentedString(timestamp)).append("\n");
    sb.append("    eventType: ").append(toIndentedString(eventType)).append("\n");
    sb.append("    trustIndex: ").append(toIndentedString(trustIndex)).append("\n");
    sb.append("    fraudAttributes: ").append(toIndentedString(fraudAttributes)).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    ");
  }

}

