com.mailslurp.models.InboxPreview Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailslurp-client-java Show documentation
Show all versions of mailslurp-client-java Show documentation
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.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* Inbox data preview element.
*/
@ApiModel(description = "Inbox data preview element.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-03T06:03:24.997Z[GMT]")
public class InboxPreview {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private UUID id;
public static final String SERIALIZED_NAME_DOMAIN_ID = "domainId";
@SerializedName(SERIALIZED_NAME_DOMAIN_ID)
private UUID domainId;
public static final String SERIALIZED_NAME_EMAIL_ADDRESS = "emailAddress";
@SerializedName(SERIALIZED_NAME_EMAIL_ADDRESS)
private String emailAddress;
public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
@SerializedName(SERIALIZED_NAME_CREATED_AT)
private OffsetDateTime createdAt;
public static final String SERIALIZED_NAME_FAVOURITE = "favourite";
@SerializedName(SERIALIZED_NAME_FAVOURITE)
private Boolean favourite;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_TAGS = "tags";
@SerializedName(SERIALIZED_NAME_TAGS)
private List tags = null;
public static final String SERIALIZED_NAME_TEAM_ACCESS = "teamAccess";
@SerializedName(SERIALIZED_NAME_TEAM_ACCESS)
private Boolean teamAccess;
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
*/
@JsonAdapter(InboxTypeEnum.Adapter.class)
public enum InboxTypeEnum {
HTTP_INBOX("HTTP_INBOX"),
SMTP_INBOX("SMTP_INBOX");
private String value;
InboxTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static InboxTypeEnum fromValue(String value) {
for (InboxTypeEnum b : InboxTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final InboxTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public InboxTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return InboxTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_INBOX_TYPE = "inboxType";
@SerializedName(SERIALIZED_NAME_INBOX_TYPE)
private InboxTypeEnum inboxType;
public static final String SERIALIZED_NAME_VIRTUAL_INBOX = "virtualInbox";
@SerializedName(SERIALIZED_NAME_VIRTUAL_INBOX)
private Boolean virtualInbox;
public static final String SERIALIZED_NAME_EXPIRES_AT = "expiresAt";
@SerializedName(SERIALIZED_NAME_EXPIRES_AT)
private String expiresAt;
/**
* Inbox function if used as a primitive for another system.
*/
@JsonAdapter(FunctionsAsEnum.Adapter.class)
public enum FunctionsAsEnum {
ALIAS("ALIAS"),
THREAD("THREAD"),
CATCH_ALL("CATCH_ALL"),
CONNECTOR("CONNECTOR");
private String value;
FunctionsAsEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static FunctionsAsEnum fromValue(String value) {
for (FunctionsAsEnum b : FunctionsAsEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final FunctionsAsEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public FunctionsAsEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return FunctionsAsEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_FUNCTIONS_AS = "functionsAs";
@SerializedName(SERIALIZED_NAME_FUNCTIONS_AS)
private FunctionsAsEnum functionsAs;
public InboxPreview id(UUID id) {
this.id = id;
return this;
}
/**
* ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
* @return id
**/
@ApiModelProperty(required = true, value = "ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public InboxPreview domainId(UUID domainId) {
this.domainId = domainId;
return this;
}
/**
* ID of custom domain used by the inbox if any
* @return domainId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "ID of custom domain used by the inbox if any")
public UUID getDomainId() {
return domainId;
}
public void setDomainId(UUID domainId) {
this.domainId = domainId;
}
public InboxPreview emailAddress(String emailAddress) {
this.emailAddress = emailAddress;
return this;
}
/**
* The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
* @return emailAddress
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.")
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public InboxPreview createdAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
* @return createdAt
**/
@ApiModelProperty(required = true, value = "When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.")
public OffsetDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
public InboxPreview favourite(Boolean favourite) {
this.favourite = favourite;
return this;
}
/**
* Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
* @return favourite
**/
@ApiModelProperty(required = true, value = "Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering")
public Boolean getFavourite() {
return favourite;
}
public void setFavourite(Boolean favourite) {
this.favourite = favourite;
}
public InboxPreview name(String name) {
this.name = name;
return this;
}
/**
* Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public InboxPreview tags(List tags) {
this.tags = tags;
return this;
}
public InboxPreview addTagsItem(String tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
* @return tags
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.")
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public InboxPreview teamAccess(Boolean teamAccess) {
this.teamAccess = teamAccess;
return this;
}
/**
* Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/
* @return teamAccess
**/
@ApiModelProperty(required = true, value = "Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/")
public Boolean getTeamAccess() {
return teamAccess;
}
public void setTeamAccess(Boolean teamAccess) {
this.teamAccess = teamAccess;
}
public InboxPreview inboxType(InboxTypeEnum inboxType) {
this.inboxType = inboxType;
return this;
}
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
* @return inboxType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).")
public InboxTypeEnum getInboxType() {
return inboxType;
}
public void setInboxType(InboxTypeEnum inboxType) {
this.inboxType = inboxType;
}
public InboxPreview virtualInbox(Boolean virtualInbox) {
this.virtualInbox = virtualInbox;
return this;
}
/**
* Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions.
* @return virtualInbox
**/
@ApiModelProperty(required = true, value = "Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions.")
public Boolean getVirtualInbox() {
return virtualInbox;
}
public void setVirtualInbox(Boolean virtualInbox) {
this.virtualInbox = virtualInbox;
}
public InboxPreview expiresAt(String expiresAt) {
this.expiresAt = expiresAt;
return this;
}
/**
* Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.
* @return expiresAt
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.")
public String getExpiresAt() {
return expiresAt;
}
public void setExpiresAt(String expiresAt) {
this.expiresAt = expiresAt;
}
public InboxPreview functionsAs(FunctionsAsEnum functionsAs) {
this.functionsAs = functionsAs;
return this;
}
/**
* Inbox function if used as a primitive for another system.
* @return functionsAs
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Inbox function if used as a primitive for another system.")
public FunctionsAsEnum getFunctionsAs() {
return functionsAs;
}
public void setFunctionsAs(FunctionsAsEnum functionsAs) {
this.functionsAs = functionsAs;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InboxPreview inboxPreview = (InboxPreview) o;
return Objects.equals(this.id, inboxPreview.id) &&
Objects.equals(this.domainId, inboxPreview.domainId) &&
Objects.equals(this.emailAddress, inboxPreview.emailAddress) &&
Objects.equals(this.createdAt, inboxPreview.createdAt) &&
Objects.equals(this.favourite, inboxPreview.favourite) &&
Objects.equals(this.name, inboxPreview.name) &&
Objects.equals(this.tags, inboxPreview.tags) &&
Objects.equals(this.teamAccess, inboxPreview.teamAccess) &&
Objects.equals(this.inboxType, inboxPreview.inboxType) &&
Objects.equals(this.virtualInbox, inboxPreview.virtualInbox) &&
Objects.equals(this.expiresAt, inboxPreview.expiresAt) &&
Objects.equals(this.functionsAs, inboxPreview.functionsAs);
}
@Override
public int hashCode() {
return Objects.hash(id, domainId, emailAddress, createdAt, favourite, name, tags, teamAccess, inboxType, virtualInbox, expiresAt, functionsAs);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InboxPreview {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n");
sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" favourite: ").append(toIndentedString(favourite)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" teamAccess: ").append(toIndentedString(teamAccess)).append("\n");
sb.append(" inboxType: ").append(toIndentedString(inboxType)).append("\n");
sb.append(" virtualInbox: ").append(toIndentedString(virtualInbox)).append("\n");
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
sb.append(" functionsAs: ").append(toIndentedString(functionsAs)).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 ");
}
}