/*
 * 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;

/**
 * Fired when there has been a new user event. The webhook payload contains limited information about the event. For full event details, call [&#x60;/protect/event/get&#x60;](https://plaid.com/docs/api/products/protect/#protecteventget).
 */
@ApiModel(description = "Fired when there has been a new user event. The webhook payload contains limited information about the event. For full event details, call [`/protect/event/get`](https://plaid.com/docs/api/products/protect/#protecteventget).")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-12-11T18:58:39.328614Z[Etc/UTC]")
public class ProtectUserEventWebhook {
  public static final String SERIALIZED_NAME_WEBHOOK_TYPE = "webhook_type";
  @SerializedName(SERIALIZED_NAME_WEBHOOK_TYPE)
  private String webhookType;

  public static final String SERIALIZED_NAME_WEBHOOK_CODE = "webhook_code";
  @SerializedName(SERIALIZED_NAME_WEBHOOK_CODE)
  private String webhookCode;

  public static final String SERIALIZED_NAME_EVENT_ID = "event_id";
  @SerializedName(SERIALIZED_NAME_EVENT_ID)
  private String eventId;

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

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

  public static final String SERIALIZED_NAME_USER_ID = "user_id";
  @SerializedName(SERIALIZED_NAME_USER_ID)
  private String userId;


  public ProtectUserEventWebhook webhookType(String webhookType) {
    
    this.webhookType = webhookType;
    return this;
  }

   /**
   * &#x60;\&quot;PROTECT\&quot;&#x60;
   * @return webhookType
  **/
  @ApiModelProperty(required = true, value = "`\"PROTECT\"`")

  public String getWebhookType() {
    return webhookType;
  }


  public void setWebhookType(String webhookType) {
    this.webhookType = webhookType;
  }


  public ProtectUserEventWebhook webhookCode(String webhookCode) {
    
    this.webhookCode = webhookCode;
    return this;
  }

   /**
   * &#x60;PROTECT_USER_EVENT&#x60;
   * @return webhookCode
  **/
  @ApiModelProperty(required = true, value = "`PROTECT_USER_EVENT`")

  public String getWebhookCode() {
    return webhookCode;
  }


  public void setWebhookCode(String webhookCode) {
    this.webhookCode = webhookCode;
  }


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

   /**
   * The event ID of the user event that occurred.
   * @return eventId
  **/
  @ApiModelProperty(required = true, value = "The event ID of the user event that occurred.")

  public String getEventId() {
    return eventId;
  }


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


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

   /**
   * The type of user event that occurred.
   * @return eventType
  **/
  @ApiModelProperty(required = true, value = "The type of user event that occurred.")

  public String getEventType() {
    return eventType;
  }


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


  public ProtectUserEventWebhook 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 ProtectUserEventWebhook userId(String userId) {
    
    this.userId = userId;
    return this;
  }

   /**
   * The Plaid User ID.
   * @return userId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(required = true, value = "The Plaid User ID.")

  public String getUserId() {
    return userId;
  }


  public void setUserId(String userId) {
    this.userId = userId;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ProtectUserEventWebhook protectUserEventWebhook = (ProtectUserEventWebhook) o;
    return Objects.equals(this.webhookType, protectUserEventWebhook.webhookType) &&
        Objects.equals(this.webhookCode, protectUserEventWebhook.webhookCode) &&
        Objects.equals(this.eventId, protectUserEventWebhook.eventId) &&
        Objects.equals(this.eventType, protectUserEventWebhook.eventType) &&
        Objects.equals(this.timestamp, protectUserEventWebhook.timestamp) &&
        Objects.equals(this.userId, protectUserEventWebhook.userId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(webhookType, webhookCode, eventId, eventType, timestamp, userId);
  }

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

}

