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

com.mailslurp.models.CreateAliasOptions 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.util.UUID;

/**
 * Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address.
 */
@ApiModel(description = "Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-03T06:03:24.997Z[GMT]")
public class CreateAliasOptions {
  public static final String SERIALIZED_NAME_EMAIL_ADDRESS = "emailAddress";
  @SerializedName(SERIALIZED_NAME_EMAIL_ADDRESS)
  private String emailAddress;

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

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_USE_THREADS = "useThreads";
  @SerializedName(SERIALIZED_NAME_USE_THREADS)
  private Boolean useThreads;

  public static final String SERIALIZED_NAME_DOMAIN_ID = "domainId";
  @SerializedName(SERIALIZED_NAME_DOMAIN_ID)
  private UUID domainId;

  public static final String SERIALIZED_NAME_VERIFY_EMAIL_ADDRESS = "verifyEmailAddress";
  @SerializedName(SERIALIZED_NAME_VERIFY_EMAIL_ADDRESS)
  private Boolean verifyEmailAddress;


  public CreateAliasOptions emailAddress(String emailAddress) {
    
    this.emailAddress = emailAddress;
    return this;
  }

   /**
   * Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first.
   * @return emailAddress
  **/
  @ApiModelProperty(required = true, value = "Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first.")

  public String getEmailAddress() {
    return emailAddress;
  }


  public void setEmailAddress(String emailAddress) {
    this.emailAddress = emailAddress;
  }


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

   /**
   * Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address
   * @return inboxId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address")

  public UUID getInboxId() {
    return inboxId;
  }


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


  public CreateAliasOptions name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * Optional name for alias
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Optional name for alias")

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public CreateAliasOptions useThreads(Boolean useThreads) {
    
    this.useThreads = useThreads;
    return this;
  }

   /**
   * Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved.
   * @return useThreads
  **/
  @ApiModelProperty(required = true, value = "Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved.")

  public Boolean getUseThreads() {
    return useThreads;
  }


  public void setUseThreads(Boolean useThreads) {
    this.useThreads = useThreads;
  }


  public CreateAliasOptions domainId(UUID domainId) {
    
    this.domainId = domainId;
    return this;
  }

   /**
   * Custom domain ID to use when generating alias email addresses
   * @return domainId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Custom domain ID to use when generating alias email addresses")

  public UUID getDomainId() {
    return domainId;
  }


  public void setDomainId(UUID domainId) {
    this.domainId = domainId;
  }


  public CreateAliasOptions verifyEmailAddress(Boolean verifyEmailAddress) {
    
    this.verifyEmailAddress = verifyEmailAddress;
    return this;
  }

   /**
   * Whether to verify the masked email address exists before sending an email to it
   * @return verifyEmailAddress
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Whether to verify the masked email address exists before sending an email to it")

  public Boolean getVerifyEmailAddress() {
    return verifyEmailAddress;
  }


  public void setVerifyEmailAddress(Boolean verifyEmailAddress) {
    this.verifyEmailAddress = verifyEmailAddress;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateAliasOptions createAliasOptions = (CreateAliasOptions) o;
    return Objects.equals(this.emailAddress, createAliasOptions.emailAddress) &&
        Objects.equals(this.inboxId, createAliasOptions.inboxId) &&
        Objects.equals(this.name, createAliasOptions.name) &&
        Objects.equals(this.useThreads, createAliasOptions.useThreads) &&
        Objects.equals(this.domainId, createAliasOptions.domainId) &&
        Objects.equals(this.verifyEmailAddress, createAliasOptions.verifyEmailAddress);
  }

  @Override
  public int hashCode() {
    return Objects.hash(emailAddress, inboxId, name, useThreads, domainId, verifyEmailAddress);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateAliasOptions {\n");
    sb.append("    emailAddress: ").append(toIndentedString(emailAddress)).append("\n");
    sb.append("    inboxId: ").append(toIndentedString(inboxId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    useThreads: ").append(toIndentedString(useThreads)).append("\n");
    sb.append("    domainId: ").append(toIndentedString(domainId)).append("\n");
    sb.append("    verifyEmailAddress: ").append(toIndentedString(verifyEmailAddress)).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 - 2024 Weber Informatics LLC | Privacy Policy