All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailslurp.models.WebhookResultDto Maven / Gradle / Ivy

Go to download

Official MailSlurp email API - create real inboxes then send and receive emails and attachments from tests and code.

The newest version!
/*
 * MailSlurp API
 * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
 *
 * The version of the OpenAPI document: 6.5.2
 * Contact: [email protected]
 *
 * 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.mailslurp.models;

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;
import java.util.UUID;

/**
 * Result of a webhook notification
 */
@ApiModel(description = "Result of a webhook notification")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-03T06:03:24.997Z[GMT]")
public class WebhookResultDto {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private UUID id;

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

  public static final String SERIALIZED_NAME_WEBHOOK_ID = "webhookId";
  @SerializedName(SERIALIZED_NAME_WEBHOOK_ID)
  private UUID webhookId;

  public static final String SERIALIZED_NAME_WEBHOOK_URL = "webhookUrl";
  @SerializedName(SERIALIZED_NAME_WEBHOOK_URL)
  private String webhookUrl;

  public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId";
  @SerializedName(SERIALIZED_NAME_MESSAGE_ID)
  private String messageId;

  public static final String SERIALIZED_NAME_REDRIVE_ID = "redriveId";
  @SerializedName(SERIALIZED_NAME_REDRIVE_ID)
  private UUID redriveId;

  /**
   * Gets or Sets httpMethod
   */
  @JsonAdapter(HttpMethodEnum.Adapter.class)
  public enum HttpMethodEnum {
    POST("POST"),
    
    DELETE("DELETE"),
    
    GET("GET"),
    
    PUT("PUT"),
    
    PATCH("PATCH"),
    
    HEAD("HEAD"),
    
    OPTIONS("OPTIONS"),
    
    TRACE("TRACE");

    private String value;

    HttpMethodEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static HttpMethodEnum fromValue(String value) {
      for (HttpMethodEnum b : HttpMethodEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final HttpMethodEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public HttpMethodEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return HttpMethodEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_HTTP_METHOD = "httpMethod";
  @SerializedName(SERIALIZED_NAME_HTTP_METHOD)
  private HttpMethodEnum httpMethod;

  /**
   * Gets or Sets webhookEvent
   */
  @JsonAdapter(WebhookEventEnum.Adapter.class)
  public enum WebhookEventEnum {
    EMAIL_RECEIVED("EMAIL_RECEIVED"),
    
    NEW_EMAIL("NEW_EMAIL"),
    
    NEW_CONTACT("NEW_CONTACT"),
    
    NEW_ATTACHMENT("NEW_ATTACHMENT"),
    
    EMAIL_OPENED("EMAIL_OPENED"),
    
    EMAIL_READ("EMAIL_READ"),
    
    DELIVERY_STATUS("DELIVERY_STATUS"),
    
    BOUNCE("BOUNCE"),
    
    BOUNCE_RECIPIENT("BOUNCE_RECIPIENT"),
    
    NEW_SMS("NEW_SMS");

    private String value;

    WebhookEventEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static WebhookEventEnum fromValue(String value) {
      for (WebhookEventEnum b : WebhookEventEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final WebhookEventEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public WebhookEventEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return WebhookEventEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_WEBHOOK_EVENT = "webhookEvent";
  @SerializedName(SERIALIZED_NAME_WEBHOOK_EVENT)
  private WebhookEventEnum webhookEvent;

  public static final String SERIALIZED_NAME_RESPONSE_STATUS = "responseStatus";
  @SerializedName(SERIALIZED_NAME_RESPONSE_STATUS)
  private Integer responseStatus;

  public static final String SERIALIZED_NAME_RESPONSE_TIME_MILLIS = "responseTimeMillis";
  @SerializedName(SERIALIZED_NAME_RESPONSE_TIME_MILLIS)
  private Long responseTimeMillis;

  public static final String SERIALIZED_NAME_RESPONSE_BODY_EXTRACT = "responseBodyExtract";
  @SerializedName(SERIALIZED_NAME_RESPONSE_BODY_EXTRACT)
  private String responseBodyExtract;

  /**
   * Gets or Sets resultType
   */
  @JsonAdapter(ResultTypeEnum.Adapter.class)
  public enum ResultTypeEnum {
    BAD_RESPONSE("BAD_RESPONSE"),
    
    EXCEPTION("EXCEPTION"),
    
    SUCCESS("SUCCESS"),
    
    REDRIVEN("REDRIVEN");

    private String value;

    ResultTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ResultTypeEnum fromValue(String value) {
      for (ResultTypeEnum b : ResultTypeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      return null;
    }

    public static class Adapter extends TypeAdapter {
      @Override
      public void write(final JsonWriter jsonWriter, final ResultTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ResultTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ResultTypeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_RESULT_TYPE = "resultType";
  @SerializedName(SERIALIZED_NAME_RESULT_TYPE)
  private ResultTypeEnum resultType;

  public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
  @SerializedName(SERIALIZED_NAME_CREATED_AT)
  private OffsetDateTime createdAt;

  public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
  @SerializedName(SERIALIZED_NAME_UPDATED_AT)
  private OffsetDateTime updatedAt;

  public static final String SERIALIZED_NAME_SEEN = "seen";
  @SerializedName(SERIALIZED_NAME_SEEN)
  private Boolean seen;

  public static final String SERIALIZED_NAME_INBOX_ID = "inboxId";
  @SerializedName(SERIALIZED_NAME_INBOX_ID)
  private UUID inboxId;

  public static final String SERIALIZED_NAME_EMAIL_ID = "emailId";
  @SerializedName(SERIALIZED_NAME_EMAIL_ID)
  private UUID emailId;

  public static final String SERIALIZED_NAME_ATTACHMENT_ID = "attachmentId";
  @SerializedName(SERIALIZED_NAME_ATTACHMENT_ID)
  private UUID attachmentId;

  public static final String SERIALIZED_NAME_PHONE_ID = "phoneId";
  @SerializedName(SERIALIZED_NAME_PHONE_ID)
  private UUID phoneId;

  public static final String SERIALIZED_NAME_SMS_ID = "smsId";
  @SerializedName(SERIALIZED_NAME_SMS_ID)
  private UUID smsId;


  public WebhookResultDto id(UUID id) {
    
    this.id = id;
    return this;
  }

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

  public UUID getId() {
    return id;
  }


  public void setId(UUID id) {
    this.id = id;
  }


  public WebhookResultDto userId(UUID userId) {
    
    this.userId = userId;
    return this;
  }

   /**
   * Get userId
   * @return userId
  **/
  @ApiModelProperty(required = true, value = "")

  public UUID getUserId() {
    return userId;
  }


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


  public WebhookResultDto webhookId(UUID webhookId) {
    
    this.webhookId = webhookId;
    return this;
  }

   /**
   * Get webhookId
   * @return webhookId
  **/
  @ApiModelProperty(required = true, value = "")

  public UUID getWebhookId() {
    return webhookId;
  }


  public void setWebhookId(UUID webhookId) {
    this.webhookId = webhookId;
  }


  public WebhookResultDto webhookUrl(String webhookUrl) {
    
    this.webhookUrl = webhookUrl;
    return this;
  }

   /**
   * Get webhookUrl
   * @return webhookUrl
  **/
  @ApiModelProperty(required = true, value = "")

  public String getWebhookUrl() {
    return webhookUrl;
  }


  public void setWebhookUrl(String webhookUrl) {
    this.webhookUrl = webhookUrl;
  }


  public WebhookResultDto messageId(String messageId) {
    
    this.messageId = messageId;
    return this;
  }

   /**
   * Get messageId
   * @return messageId
  **/
  @ApiModelProperty(required = true, value = "")

  public String getMessageId() {
    return messageId;
  }


  public void setMessageId(String messageId) {
    this.messageId = messageId;
  }


  public WebhookResultDto redriveId(UUID redriveId) {
    
    this.redriveId = redriveId;
    return this;
  }

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

  public UUID getRedriveId() {
    return redriveId;
  }


  public void setRedriveId(UUID redriveId) {
    this.redriveId = redriveId;
  }


  public WebhookResultDto httpMethod(HttpMethodEnum httpMethod) {
    
    this.httpMethod = httpMethod;
    return this;
  }

   /**
   * Get httpMethod
   * @return httpMethod
  **/
  @ApiModelProperty(required = true, value = "")

  public HttpMethodEnum getHttpMethod() {
    return httpMethod;
  }


  public void setHttpMethod(HttpMethodEnum httpMethod) {
    this.httpMethod = httpMethod;
  }


  public WebhookResultDto webhookEvent(WebhookEventEnum webhookEvent) {
    
    this.webhookEvent = webhookEvent;
    return this;
  }

   /**
   * Get webhookEvent
   * @return webhookEvent
  **/
  @ApiModelProperty(required = true, value = "")

  public WebhookEventEnum getWebhookEvent() {
    return webhookEvent;
  }


  public void setWebhookEvent(WebhookEventEnum webhookEvent) {
    this.webhookEvent = webhookEvent;
  }


  public WebhookResultDto responseStatus(Integer responseStatus) {
    
    this.responseStatus = responseStatus;
    return this;
  }

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

  public Integer getResponseStatus() {
    return responseStatus;
  }


  public void setResponseStatus(Integer responseStatus) {
    this.responseStatus = responseStatus;
  }


  public WebhookResultDto responseTimeMillis(Long responseTimeMillis) {
    
    this.responseTimeMillis = responseTimeMillis;
    return this;
  }

   /**
   * Get responseTimeMillis
   * @return responseTimeMillis
  **/
  @ApiModelProperty(required = true, value = "")

  public Long getResponseTimeMillis() {
    return responseTimeMillis;
  }


  public void setResponseTimeMillis(Long responseTimeMillis) {
    this.responseTimeMillis = responseTimeMillis;
  }


  public WebhookResultDto responseBodyExtract(String responseBodyExtract) {
    
    this.responseBodyExtract = responseBodyExtract;
    return this;
  }

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

  public String getResponseBodyExtract() {
    return responseBodyExtract;
  }


  public void setResponseBodyExtract(String responseBodyExtract) {
    this.responseBodyExtract = responseBodyExtract;
  }


  public WebhookResultDto resultType(ResultTypeEnum resultType) {
    
    this.resultType = resultType;
    return this;
  }

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

  public ResultTypeEnum getResultType() {
    return resultType;
  }


  public void setResultType(ResultTypeEnum resultType) {
    this.resultType = resultType;
  }


  public WebhookResultDto createdAt(OffsetDateTime createdAt) {
    
    this.createdAt = createdAt;
    return this;
  }

   /**
   * Get createdAt
   * @return createdAt
  **/
  @ApiModelProperty(required = true, value = "")

  public OffsetDateTime getCreatedAt() {
    return createdAt;
  }


  public void setCreatedAt(OffsetDateTime createdAt) {
    this.createdAt = createdAt;
  }


  public WebhookResultDto updatedAt(OffsetDateTime updatedAt) {
    
    this.updatedAt = updatedAt;
    return this;
  }

   /**
   * Get updatedAt
   * @return updatedAt
  **/
  @ApiModelProperty(required = true, value = "")

  public OffsetDateTime getUpdatedAt() {
    return updatedAt;
  }


  public void setUpdatedAt(OffsetDateTime updatedAt) {
    this.updatedAt = updatedAt;
  }


  public WebhookResultDto seen(Boolean seen) {
    
    this.seen = seen;
    return this;
  }

   /**
   * Get seen
   * @return seen
  **/
  @ApiModelProperty(required = true, value = "")

  public Boolean getSeen() {
    return seen;
  }


  public void setSeen(Boolean seen) {
    this.seen = seen;
  }


  public WebhookResultDto inboxId(UUID inboxId) {
    
    this.inboxId = inboxId;
    return this;
  }

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

  public UUID getInboxId() {
    return inboxId;
  }


  public void setInboxId(UUID inboxId) {
    this.inboxId = inboxId;
  }


  public WebhookResultDto emailId(UUID emailId) {
    
    this.emailId = emailId;
    return this;
  }

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

  public UUID getEmailId() {
    return emailId;
  }


  public void setEmailId(UUID emailId) {
    this.emailId = emailId;
  }


  public WebhookResultDto attachmentId(UUID attachmentId) {
    
    this.attachmentId = attachmentId;
    return this;
  }

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

  public UUID getAttachmentId() {
    return attachmentId;
  }


  public void setAttachmentId(UUID attachmentId) {
    this.attachmentId = attachmentId;
  }


  public WebhookResultDto phoneId(UUID phoneId) {
    
    this.phoneId = phoneId;
    return this;
  }

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

  public UUID getPhoneId() {
    return phoneId;
  }


  public void setPhoneId(UUID phoneId) {
    this.phoneId = phoneId;
  }


  public WebhookResultDto smsId(UUID smsId) {
    
    this.smsId = smsId;
    return this;
  }

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

  public UUID getSmsId() {
    return smsId;
  }


  public void setSmsId(UUID smsId) {
    this.smsId = smsId;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WebhookResultDto webhookResultDto = (WebhookResultDto) o;
    return Objects.equals(this.id, webhookResultDto.id) &&
        Objects.equals(this.userId, webhookResultDto.userId) &&
        Objects.equals(this.webhookId, webhookResultDto.webhookId) &&
        Objects.equals(this.webhookUrl, webhookResultDto.webhookUrl) &&
        Objects.equals(this.messageId, webhookResultDto.messageId) &&
        Objects.equals(this.redriveId, webhookResultDto.redriveId) &&
        Objects.equals(this.httpMethod, webhookResultDto.httpMethod) &&
        Objects.equals(this.webhookEvent, webhookResultDto.webhookEvent) &&
        Objects.equals(this.responseStatus, webhookResultDto.responseStatus) &&
        Objects.equals(this.responseTimeMillis, webhookResultDto.responseTimeMillis) &&
        Objects.equals(this.responseBodyExtract, webhookResultDto.responseBodyExtract) &&
        Objects.equals(this.resultType, webhookResultDto.resultType) &&
        Objects.equals(this.createdAt, webhookResultDto.createdAt) &&
        Objects.equals(this.updatedAt, webhookResultDto.updatedAt) &&
        Objects.equals(this.seen, webhookResultDto.seen) &&
        Objects.equals(this.inboxId, webhookResultDto.inboxId) &&
        Objects.equals(this.emailId, webhookResultDto.emailId) &&
        Objects.equals(this.attachmentId, webhookResultDto.attachmentId) &&
        Objects.equals(this.phoneId, webhookResultDto.phoneId) &&
        Objects.equals(this.smsId, webhookResultDto.smsId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, userId, webhookId, webhookUrl, messageId, redriveId, httpMethod, webhookEvent, responseStatus, responseTimeMillis, responseBodyExtract, resultType, createdAt, updatedAt, seen, inboxId, emailId, attachmentId, phoneId, smsId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WebhookResultDto {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
    sb.append("    webhookId: ").append(toIndentedString(webhookId)).append("\n");
    sb.append("    webhookUrl: ").append(toIndentedString(webhookUrl)).append("\n");
    sb.append("    messageId: ").append(toIndentedString(messageId)).append("\n");
    sb.append("    redriveId: ").append(toIndentedString(redriveId)).append("\n");
    sb.append("    httpMethod: ").append(toIndentedString(httpMethod)).append("\n");
    sb.append("    webhookEvent: ").append(toIndentedString(webhookEvent)).append("\n");
    sb.append("    responseStatus: ").append(toIndentedString(responseStatus)).append("\n");
    sb.append("    responseTimeMillis: ").append(toIndentedString(responseTimeMillis)).append("\n");
    sb.append("    responseBodyExtract: ").append(toIndentedString(responseBodyExtract)).append("\n");
    sb.append("    resultType: ").append(toIndentedString(resultType)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
    sb.append("    seen: ").append(toIndentedString(seen)).append("\n");
    sb.append("    inboxId: ").append(toIndentedString(inboxId)).append("\n");
    sb.append("    emailId: ").append(toIndentedString(emailId)).append("\n");
    sb.append("    attachmentId: ").append(toIndentedString(attachmentId)).append("\n");
    sb.append("    phoneId: ").append(toIndentedString(phoneId)).append("\n");
    sb.append("    smsId: ").append(toIndentedString(smsId)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy