com.mailslurp.models.CreateConnectorOptions 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;
/**
* Options for creating an inbox connection with an external mail provider
*/
@ApiModel(description = "Options for creating an inbox connection with an external mail provider")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-03T06:03:24.997Z[GMT]")
public class CreateConnectorOptions {
public static final String SERIALIZED_NAME_SYNC_ENABLED = "syncEnabled";
@SerializedName(SERIALIZED_NAME_SYNC_ENABLED)
private Boolean syncEnabled;
/**
* Sync schedule type
*/
@JsonAdapter(SyncScheduleTypeEnum.Adapter.class)
public enum SyncScheduleTypeEnum {
INTERVAL("INTERVAL");
private String value;
SyncScheduleTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static SyncScheduleTypeEnum fromValue(String value) {
for (SyncScheduleTypeEnum b : SyncScheduleTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final SyncScheduleTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public SyncScheduleTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return SyncScheduleTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_SYNC_SCHEDULE_TYPE = "syncScheduleType";
@SerializedName(SERIALIZED_NAME_SYNC_SCHEDULE_TYPE)
private SyncScheduleTypeEnum syncScheduleType;
public static final String SERIALIZED_NAME_SYNC_INTERVAL = "syncInterval";
@SerializedName(SERIALIZED_NAME_SYNC_INTERVAL)
private Integer syncInterval;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_EMAIL_ADDRESS = "emailAddress";
@SerializedName(SERIALIZED_NAME_EMAIL_ADDRESS)
private String emailAddress;
public static final String SERIALIZED_NAME_ENABLED = "enabled";
@SerializedName(SERIALIZED_NAME_ENABLED)
private Boolean enabled;
public CreateConnectorOptions syncEnabled(Boolean syncEnabled) {
this.syncEnabled = syncEnabled;
return this;
}
/**
* Enable automatic background sync
* @return syncEnabled
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Enable automatic background sync")
public Boolean getSyncEnabled() {
return syncEnabled;
}
public void setSyncEnabled(Boolean syncEnabled) {
this.syncEnabled = syncEnabled;
}
public CreateConnectorOptions syncScheduleType(SyncScheduleTypeEnum syncScheduleType) {
this.syncScheduleType = syncScheduleType;
return this;
}
/**
* Sync schedule type
* @return syncScheduleType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Sync schedule type")
public SyncScheduleTypeEnum getSyncScheduleType() {
return syncScheduleType;
}
public void setSyncScheduleType(SyncScheduleTypeEnum syncScheduleType) {
this.syncScheduleType = syncScheduleType;
}
public CreateConnectorOptions syncInterval(Integer syncInterval) {
this.syncInterval = syncInterval;
return this;
}
/**
* Sync interval in minutes
* @return syncInterval
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Sync interval in minutes")
public Integer getSyncInterval() {
return syncInterval;
}
public void setSyncInterval(Integer syncInterval) {
this.syncInterval = syncInterval;
}
public CreateConnectorOptions name(String name) {
this.name = name;
return this;
}
/**
* Name of connector
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of connector")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateConnectorOptions emailAddress(String emailAddress) {
this.emailAddress = emailAddress;
return this;
}
/**
* Email address of external inbox
* @return emailAddress
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Email address of external inbox")
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public CreateConnectorOptions enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Is connector enabled
* @return enabled
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Is connector enabled")
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateConnectorOptions createConnectorOptions = (CreateConnectorOptions) o;
return Objects.equals(this.syncEnabled, createConnectorOptions.syncEnabled) &&
Objects.equals(this.syncScheduleType, createConnectorOptions.syncScheduleType) &&
Objects.equals(this.syncInterval, createConnectorOptions.syncInterval) &&
Objects.equals(this.name, createConnectorOptions.name) &&
Objects.equals(this.emailAddress, createConnectorOptions.emailAddress) &&
Objects.equals(this.enabled, createConnectorOptions.enabled);
}
@Override
public int hashCode() {
return Objects.hash(syncEnabled, syncScheduleType, syncInterval, name, emailAddress, enabled);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateConnectorOptions {\n");
sb.append(" syncEnabled: ").append(toIndentedString(syncEnabled)).append("\n");
sb.append(" syncScheduleType: ").append(toIndentedString(syncScheduleType)).append("\n");
sb.append(" syncInterval: ").append(toIndentedString(syncInterval)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).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 ");
}
}