
com.amazonaws.services.simpleemail.model.IdentityMailFromDomainAttributes Maven / Gradle / Ivy
Show all versions of aws-android-sdk-ses Show documentation
/*
* Copyright 2010-2016 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.simpleemail.model;
import java.io.Serializable;
/**
*
* Represents the custom MAIL FROM domain attributes of a verified
* identity (email address or domain).
*
*/
public class IdentityMailFromDomainAttributes implements Serializable {
/**
* The custom MAIL FROM domain that the identity is configured to use.
*/
private String mailFromDomain;
/**
* The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* Constraints:
* Allowed Values: Pending, Success, Failed, TemporaryFailure
*/
private String mailFromDomainStatus;
/**
* The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* Constraints:
* Allowed Values: UseDefaultValue, RejectMessage
*/
private String behaviorOnMXFailure;
/**
* The custom MAIL FROM domain that the identity is configured to use.
*
* @return The custom MAIL FROM domain that the identity is configured to use.
*/
public String getMailFromDomain() {
return mailFromDomain;
}
/**
* The custom MAIL FROM domain that the identity is configured to use.
*
* @param mailFromDomain The custom MAIL FROM domain that the identity is configured to use.
*/
public void setMailFromDomain(String mailFromDomain) {
this.mailFromDomain = mailFromDomain;
}
/**
* The custom MAIL FROM domain that the identity is configured to use.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param mailFromDomain The custom MAIL FROM domain that the identity is configured to use.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public IdentityMailFromDomainAttributes withMailFromDomain(String mailFromDomain) {
this.mailFromDomain = mailFromDomain;
return this;
}
/**
* The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* Constraints:
* Allowed Values: Pending, Success, Failed, TemporaryFailure
*
* @return The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* @see CustomMailFromStatus
*/
public String getMailFromDomainStatus() {
return mailFromDomainStatus;
}
/**
* The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* Constraints:
* Allowed Values: Pending, Success, Failed, TemporaryFailure
*
* @param mailFromDomainStatus The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* @see CustomMailFromStatus
*/
public void setMailFromDomainStatus(String mailFromDomainStatus) {
this.mailFromDomainStatus = mailFromDomainStatus;
}
/**
* The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Allowed Values: Pending, Success, Failed, TemporaryFailure
*
* @param mailFromDomainStatus The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see CustomMailFromStatus
*/
public IdentityMailFromDomainAttributes withMailFromDomainStatus(String mailFromDomainStatus) {
this.mailFromDomainStatus = mailFromDomainStatus;
return this;
}
/**
* The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* Constraints:
* Allowed Values: Pending, Success, Failed, TemporaryFailure
*
* @param mailFromDomainStatus The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* @see CustomMailFromStatus
*/
public void setMailFromDomainStatus(CustomMailFromStatus mailFromDomainStatus) {
this.mailFromDomainStatus = mailFromDomainStatus.toString();
}
/**
* The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Allowed Values: Pending, Success, Failed, TemporaryFailure
*
* @param mailFromDomainStatus The state that indicates whether Amazon SES has successfully read the
* MX record required for custom MAIL FROM domain setup. If the state is
* Success
, Amazon SES uses the specified custom MAIL FROM
* domain when the verified identity sends an email. All other states
* indicate that Amazon SES takes the action described by
* BehaviorOnMXFailure
.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see CustomMailFromStatus
*/
public IdentityMailFromDomainAttributes withMailFromDomainStatus(CustomMailFromStatus mailFromDomainStatus) {
this.mailFromDomainStatus = mailFromDomainStatus.toString();
return this;
}
/**
* The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* Constraints:
* Allowed Values: UseDefaultValue, RejectMessage
*
* @return The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* @see BehaviorOnMXFailure
*/
public String getBehaviorOnMXFailure() {
return behaviorOnMXFailure;
}
/**
* The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* Constraints:
* Allowed Values: UseDefaultValue, RejectMessage
*
* @param behaviorOnMXFailure The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* @see BehaviorOnMXFailure
*/
public void setBehaviorOnMXFailure(String behaviorOnMXFailure) {
this.behaviorOnMXFailure = behaviorOnMXFailure;
}
/**
* The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Allowed Values: UseDefaultValue, RejectMessage
*
* @param behaviorOnMXFailure The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see BehaviorOnMXFailure
*/
public IdentityMailFromDomainAttributes withBehaviorOnMXFailure(String behaviorOnMXFailure) {
this.behaviorOnMXFailure = behaviorOnMXFailure;
return this;
}
/**
* The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* Constraints:
* Allowed Values: UseDefaultValue, RejectMessage
*
* @param behaviorOnMXFailure The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* @see BehaviorOnMXFailure
*/
public void setBehaviorOnMXFailure(BehaviorOnMXFailure behaviorOnMXFailure) {
this.behaviorOnMXFailure = behaviorOnMXFailure.toString();
}
/**
* The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Allowed Values: UseDefaultValue, RejectMessage
*
* @param behaviorOnMXFailure The action that Amazon SES takes if it cannot successfully read the
* required MX record when you send an email. A value of
* UseDefaultValue
indicates that if Amazon SES cannot read
* the required MX record, it uses amazonses.com (or a subdomain of that)
* as the MAIL FROM domain. A value of RejectMessage
* indicates that if Amazon SES cannot read the required MX record,
* Amazon SES returns a MailFromDomainNotVerified
error and
* does not send the email.
The custom MAIL FROM setup states that
* result in this behavior are Pending
, Failed
,
* and TemporaryFailure
.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see BehaviorOnMXFailure
*/
public IdentityMailFromDomainAttributes withBehaviorOnMXFailure(BehaviorOnMXFailure behaviorOnMXFailure) {
this.behaviorOnMXFailure = behaviorOnMXFailure.toString();
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getMailFromDomain() != null) sb.append("MailFromDomain: " + getMailFromDomain() + ",");
if (getMailFromDomainStatus() != null) sb.append("MailFromDomainStatus: " + getMailFromDomainStatus() + ",");
if (getBehaviorOnMXFailure() != null) sb.append("BehaviorOnMXFailure: " + getBehaviorOnMXFailure() );
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMailFromDomain() == null) ? 0 : getMailFromDomain().hashCode());
hashCode = prime * hashCode + ((getMailFromDomainStatus() == null) ? 0 : getMailFromDomainStatus().hashCode());
hashCode = prime * hashCode + ((getBehaviorOnMXFailure() == null) ? 0 : getBehaviorOnMXFailure().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof IdentityMailFromDomainAttributes == false) return false;
IdentityMailFromDomainAttributes other = (IdentityMailFromDomainAttributes)obj;
if (other.getMailFromDomain() == null ^ this.getMailFromDomain() == null) return false;
if (other.getMailFromDomain() != null && other.getMailFromDomain().equals(this.getMailFromDomain()) == false) return false;
if (other.getMailFromDomainStatus() == null ^ this.getMailFromDomainStatus() == null) return false;
if (other.getMailFromDomainStatus() != null && other.getMailFromDomainStatus().equals(this.getMailFromDomainStatus()) == false) return false;
if (other.getBehaviorOnMXFailure() == null ^ this.getBehaviorOnMXFailure() == null) return false;
if (other.getBehaviorOnMXFailure() != null && other.getBehaviorOnMXFailure().equals(this.getBehaviorOnMXFailure()) == false) return false;
return true;
}
}