/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Provides information about the status and settings of the email channel for an application. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EmailChannelResponse implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier for the application that the email channel applies to. *
*/ private String applicationId; /** ** The Amazon SES * configuration set that's applied to messages that are sent through the channel. *
*/ private String configurationSet; /** ** The date and time, in ISO 8601 format, when the email channel was enabled. *
*/ private String creationDate; /** ** Specifies whether the email channel is enabled for the application. *
*/ private Boolean enabled; /** ** The verified email address that email is sent from when you send email through the channel. *
*/ private String fromAddress; /** ** (Not used) This property is retained only for backward compatibility. *
*/ private Boolean hasCredential; /** ** (Deprecated) An identifier for the email channel. This property is retained only for backward compatibility. *
*/ private String id; /** ** The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's * used when you send email through the channel. *
*/ private String identity; /** ** Specifies whether the email channel is archived. *
*/ private Boolean isArchived; /** ** The user who last modified the email channel. *
*/ private String lastModifiedBy; /** ** The date and time, in ISO 8601 format, when the email channel was last modified. *
*/ private String lastModifiedDate; /** ** The maximum number of emails that can be sent through the channel each second. *
*/ private Integer messagesPerSecond; /** ** The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL. *
*/ private String platform; /** ** The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related * event data for the channel. *
*/ private String roleArn; /** ** The current version of the email channel. *
*/ private Integer version; /** ** The unique identifier for the application that the email channel applies to. *
* * @param applicationId * The unique identifier for the application that the email channel applies to. */ public void setApplicationId(String applicationId) { this.applicationId = applicationId; } /** ** The unique identifier for the application that the email channel applies to. *
* * @return The unique identifier for the application that the email channel applies to. */ public String getApplicationId() { return this.applicationId; } /** ** The unique identifier for the application that the email channel applies to. *
* * @param applicationId * The unique identifier for the application that the email channel applies to. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withApplicationId(String applicationId) { setApplicationId(applicationId); return this; } /** ** The Amazon SES * configuration set that's applied to messages that are sent through the channel. *
* * @param configurationSet * The Amazon SES * configuration set that's applied to messages that are sent through the channel. */ public void setConfigurationSet(String configurationSet) { this.configurationSet = configurationSet; } /** ** The Amazon SES * configuration set that's applied to messages that are sent through the channel. *
* * @return The Amazon SES * configuration set that's applied to messages that are sent through the channel. */ public String getConfigurationSet() { return this.configurationSet; } /** ** The Amazon SES * configuration set that's applied to messages that are sent through the channel. *
* * @param configurationSet * The Amazon SES * configuration set that's applied to messages that are sent through the channel. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withConfigurationSet(String configurationSet) { setConfigurationSet(configurationSet); return this; } /** ** The date and time, in ISO 8601 format, when the email channel was enabled. *
* * @param creationDate * The date and time, in ISO 8601 format, when the email channel was enabled. */ public void setCreationDate(String creationDate) { this.creationDate = creationDate; } /** ** The date and time, in ISO 8601 format, when the email channel was enabled. *
* * @return The date and time, in ISO 8601 format, when the email channel was enabled. */ public String getCreationDate() { return this.creationDate; } /** ** The date and time, in ISO 8601 format, when the email channel was enabled. *
* * @param creationDate * The date and time, in ISO 8601 format, when the email channel was enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withCreationDate(String creationDate) { setCreationDate(creationDate); return this; } /** ** Specifies whether the email channel is enabled for the application. *
* * @param enabled * Specifies whether the email channel is enabled for the application. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** ** Specifies whether the email channel is enabled for the application. *
* * @return Specifies whether the email channel is enabled for the application. */ public Boolean getEnabled() { return this.enabled; } /** ** Specifies whether the email channel is enabled for the application. *
* * @param enabled * Specifies whether the email channel is enabled for the application. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** ** Specifies whether the email channel is enabled for the application. *
* * @return Specifies whether the email channel is enabled for the application. */ public Boolean isEnabled() { return this.enabled; } /** ** The verified email address that email is sent from when you send email through the channel. *
* * @param fromAddress * The verified email address that email is sent from when you send email through the channel. */ public void setFromAddress(String fromAddress) { this.fromAddress = fromAddress; } /** ** The verified email address that email is sent from when you send email through the channel. *
* * @return The verified email address that email is sent from when you send email through the channel. */ public String getFromAddress() { return this.fromAddress; } /** ** The verified email address that email is sent from when you send email through the channel. *
* * @param fromAddress * The verified email address that email is sent from when you send email through the channel. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withFromAddress(String fromAddress) { setFromAddress(fromAddress); return this; } /** ** (Not used) This property is retained only for backward compatibility. *
* * @param hasCredential * (Not used) This property is retained only for backward compatibility. */ public void setHasCredential(Boolean hasCredential) { this.hasCredential = hasCredential; } /** ** (Not used) This property is retained only for backward compatibility. *
* * @return (Not used) This property is retained only for backward compatibility. */ public Boolean getHasCredential() { return this.hasCredential; } /** ** (Not used) This property is retained only for backward compatibility. *
* * @param hasCredential * (Not used) This property is retained only for backward compatibility. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withHasCredential(Boolean hasCredential) { setHasCredential(hasCredential); return this; } /** ** (Not used) This property is retained only for backward compatibility. *
* * @return (Not used) This property is retained only for backward compatibility. */ public Boolean isHasCredential() { return this.hasCredential; } /** ** (Deprecated) An identifier for the email channel. This property is retained only for backward compatibility. *
* * @param id * (Deprecated) An identifier for the email channel. This property is retained only for backward * compatibility. */ public void setId(String id) { this.id = id; } /** ** (Deprecated) An identifier for the email channel. This property is retained only for backward compatibility. *
* * @return (Deprecated) An identifier for the email channel. This property is retained only for backward * compatibility. */ public String getId() { return this.id; } /** ** (Deprecated) An identifier for the email channel. This property is retained only for backward compatibility. *
* * @param id * (Deprecated) An identifier for the email channel. This property is retained only for backward * compatibility. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withId(String id) { setId(id); return this; } /** ** The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's * used when you send email through the channel. *
* * @param identity ** The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), * that's used when you send email through the channel. *
*/ public void setIdentity(String identity) { this.identity = identity; } /** ** The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's * used when you send email through the channel. *
* * @return* The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), * that's used when you send email through the channel. *
*/ public String getIdentity() { return this.identity; } /** ** The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's * used when you send email through the channel. *
* * @param identity ** The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), * that's used when you send email through the channel. *
* @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withIdentity(String identity) { setIdentity(identity); return this; } /** ** Specifies whether the email channel is archived. *
* * @param isArchived * Specifies whether the email channel is archived. */ public void setIsArchived(Boolean isArchived) { this.isArchived = isArchived; } /** ** Specifies whether the email channel is archived. *
* * @return Specifies whether the email channel is archived. */ public Boolean getIsArchived() { return this.isArchived; } /** ** Specifies whether the email channel is archived. *
* * @param isArchived * Specifies whether the email channel is archived. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withIsArchived(Boolean isArchived) { setIsArchived(isArchived); return this; } /** ** Specifies whether the email channel is archived. *
* * @return Specifies whether the email channel is archived. */ public Boolean isArchived() { return this.isArchived; } /** ** The user who last modified the email channel. *
* * @param lastModifiedBy * The user who last modified the email channel. */ public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } /** ** The user who last modified the email channel. *
* * @return The user who last modified the email channel. */ public String getLastModifiedBy() { return this.lastModifiedBy; } /** ** The user who last modified the email channel. *
* * @param lastModifiedBy * The user who last modified the email channel. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withLastModifiedBy(String lastModifiedBy) { setLastModifiedBy(lastModifiedBy); return this; } /** ** The date and time, in ISO 8601 format, when the email channel was last modified. *
* * @param lastModifiedDate * The date and time, in ISO 8601 format, when the email channel was last modified. */ public void setLastModifiedDate(String lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** ** The date and time, in ISO 8601 format, when the email channel was last modified. *
* * @return The date and time, in ISO 8601 format, when the email channel was last modified. */ public String getLastModifiedDate() { return this.lastModifiedDate; } /** ** The date and time, in ISO 8601 format, when the email channel was last modified. *
* * @param lastModifiedDate * The date and time, in ISO 8601 format, when the email channel was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withLastModifiedDate(String lastModifiedDate) { setLastModifiedDate(lastModifiedDate); return this; } /** ** The maximum number of emails that can be sent through the channel each second. *
* * @param messagesPerSecond * The maximum number of emails that can be sent through the channel each second. */ public void setMessagesPerSecond(Integer messagesPerSecond) { this.messagesPerSecond = messagesPerSecond; } /** ** The maximum number of emails that can be sent through the channel each second. *
* * @return The maximum number of emails that can be sent through the channel each second. */ public Integer getMessagesPerSecond() { return this.messagesPerSecond; } /** ** The maximum number of emails that can be sent through the channel each second. *
* * @param messagesPerSecond * The maximum number of emails that can be sent through the channel each second. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withMessagesPerSecond(Integer messagesPerSecond) { setMessagesPerSecond(messagesPerSecond); return this; } /** ** The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL. *
* * @param platform * The type of messaging or notification platform for the channel. For the email channel, this value is * EMAIL. */ public void setPlatform(String platform) { this.platform = platform; } /** ** The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL. *
* * @return The type of messaging or notification platform for the channel. For the email channel, this value is * EMAIL. */ public String getPlatform() { return this.platform; } /** ** The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL. *
* * @param platform * The type of messaging or notification platform for the channel. For the email channel, this value is * EMAIL. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withPlatform(String platform) { setPlatform(platform); return this; } /** ** The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related * event data for the channel. *
* * @param roleArn ** The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit * email-related event data for the channel. *
*/ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related * event data for the channel. *
* * @return* The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit * email-related event data for the channel. *
*/ public String getRoleArn() { return this.roleArn; } /** ** The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related * event data for the channel. *
* * @param roleArn ** The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit * email-related event data for the channel. *
* @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** ** The current version of the email channel. *
* * @param version * The current version of the email channel. */ public void setVersion(Integer version) { this.version = version; } /** ** The current version of the email channel. *
* * @return The current version of the email channel. */ public Integer getVersion() { return this.version; } /** ** The current version of the email channel. *
* * @param version * The current version of the email channel. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailChannelResponse withVersion(Integer version) { setVersion(version); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getApplicationId() != null) sb.append("ApplicationId: ").append(getApplicationId()).append(","); if (getConfigurationSet() != null) sb.append("ConfigurationSet: ").append(getConfigurationSet()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getEnabled() != null) sb.append("Enabled: ").append(getEnabled()).append(","); if (getFromAddress() != null) sb.append("FromAddress: ").append(getFromAddress()).append(","); if (getHasCredential() != null) sb.append("HasCredential: ").append(getHasCredential()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getIdentity() != null) sb.append("Identity: ").append(getIdentity()).append(","); if (getIsArchived() != null) sb.append("IsArchived: ").append(getIsArchived()).append(","); if (getLastModifiedBy() != null) sb.append("LastModifiedBy: ").append(getLastModifiedBy()).append(","); if (getLastModifiedDate() != null) sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(","); if (getMessagesPerSecond() != null) sb.append("MessagesPerSecond: ").append(getMessagesPerSecond()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EmailChannelResponse == false) return false; EmailChannelResponse other = (EmailChannelResponse) obj; if (other.getApplicationId() == null ^ this.getApplicationId() == null) return false; if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false) return false; if (other.getConfigurationSet() == null ^ this.getConfigurationSet() == null) return false; if (other.getConfigurationSet() != null && other.getConfigurationSet().equals(this.getConfigurationSet()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; if (other.getFromAddress() == null ^ this.getFromAddress() == null) return false; if (other.getFromAddress() != null && other.getFromAddress().equals(this.getFromAddress()) == false) return false; if (other.getHasCredential() == null ^ this.getHasCredential() == null) return false; if (other.getHasCredential() != null && other.getHasCredential().equals(this.getHasCredential()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getIdentity() == null ^ this.getIdentity() == null) return false; if (other.getIdentity() != null && other.getIdentity().equals(this.getIdentity()) == false) return false; if (other.getIsArchived() == null ^ this.getIsArchived() == null) return false; if (other.getIsArchived() != null && other.getIsArchived().equals(this.getIsArchived()) == false) return false; if (other.getLastModifiedBy() == null ^ this.getLastModifiedBy() == null) return false; if (other.getLastModifiedBy() != null && other.getLastModifiedBy().equals(this.getLastModifiedBy()) == false) return false; if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null) return false; if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false) return false; if (other.getMessagesPerSecond() == null ^ this.getMessagesPerSecond() == null) return false; if (other.getMessagesPerSecond() != null && other.getMessagesPerSecond().equals(this.getMessagesPerSecond()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode()); hashCode = prime * hashCode + ((getConfigurationSet() == null) ? 0 : getConfigurationSet().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getFromAddress() == null) ? 0 : getFromAddress().hashCode()); hashCode = prime * hashCode + ((getHasCredential() == null) ? 0 : getHasCredential().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getIdentity() == null) ? 0 : getIdentity().hashCode()); hashCode = prime * hashCode + ((getIsArchived() == null) ? 0 : getIsArchived().hashCode()); hashCode = prime * hashCode + ((getLastModifiedBy() == null) ? 0 : getLastModifiedBy().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); hashCode = prime * hashCode + ((getMessagesPerSecond() == null) ? 0 : getMessagesPerSecond().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); return hashCode; } @Override public EmailChannelResponse clone() { try { return (EmailChannelResponse) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.pinpoint.model.transform.EmailChannelResponseMarshaller.getInstance().marshall(this, protocolMarshaller); } }