com.amazonaws.services.simpleemail.model.IdentityMailFromDomainAttributes Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ses Show documentation
/*
* Copyright 2019-2024 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;
import javax.annotation.Generated;
/**
*
* Represents the custom MAIL FROM domain attributes of a verified identity (email address or domain).
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class IdentityMailFromDomainAttributes implements Serializable, Cloneable {
/**
*
* 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
.
*
*/
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
.
*
*/
private String behaviorOnMXFailure;
/**
*
* 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.
*
*
* @return The custom MAIL FROM domain that the identity is configured to use.
*/
public String getMailFromDomain() {
return this.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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public IdentityMailFromDomainAttributes withMailFromDomain(String mailFromDomain) {
setMailFromDomain(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
.
*
*
* @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
.
*
*
* @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 this.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
.
*
*
* @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 Returns a reference to this object so that method calls can be chained together.
* @see CustomMailFromStatus
*/
public IdentityMailFromDomainAttributes withMailFromDomainStatus(String mailFromDomainStatus) {
setMailFromDomainStatus(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
.
*
*
* @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) {
withMailFromDomainStatus(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
.
*
*
* @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 Returns a reference to this 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
.
*
*
* @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
.
*
*
* @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 this.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
.
*
*
* @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 Returns a reference to this object so that method calls can be chained together.
* @see BehaviorOnMXFailure
*/
public IdentityMailFromDomainAttributes withBehaviorOnMXFailure(String behaviorOnMXFailure) {
setBehaviorOnMXFailure(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
.
*
*
* @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) {
withBehaviorOnMXFailure(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
.
*
*
* @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 Returns a reference to this 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. 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 (getMailFromDomain() != null)
sb.append("MailFromDomain: ").append(getMailFromDomain()).append(",");
if (getMailFromDomainStatus() != null)
sb.append("MailFromDomainStatus: ").append(getMailFromDomainStatus()).append(",");
if (getBehaviorOnMXFailure() != null)
sb.append("BehaviorOnMXFailure: ").append(getBehaviorOnMXFailure());
sb.append("}");
return sb.toString();
}
@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;
}
@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 IdentityMailFromDomainAttributes clone() {
try {
return (IdentityMailFromDomainAttributes) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}