public class ReceiptRule
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.
Each receipt rule defines a set of email addresses or domains to which it applies. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule's actions on the message.
For information about setting up receipt rules, see the Amazon SES Developer Guide.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<ReceiptAction> |
actions
An ordered list of actions to perform on messages that match at least one
of the recipient email addresses or domains specified in the receipt
rule.
|
private java.lang.Boolean |
enabled
If
true , the receipt rule is active. |
private java.lang.String |
name
The name of the receipt rule.
|
private SdkInternalList<java.lang.String> |
recipients
The recipient domains and email addresses to which the receipt rule
applies.
|
private java.lang.Boolean |
scanEnabled
If
true , then messages to which this receipt rule applies
are scanned for spam and viruses. |
private java.lang.String |
tlsPolicy
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS).
|
Constructor and Description |
---|
ReceiptRule() |
Modifier and Type | Method and Description |
---|---|
ReceiptRule |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<ReceiptAction> |
getActions()
An ordered list of actions to perform on messages that match at least one
of the recipient email addresses or domains specified in the receipt
rule.
|
java.lang.Boolean |
getEnabled()
If
true , the receipt rule is active. |
java.lang.String |
getName()
The name of the receipt rule.
|
java.util.List<java.lang.String> |
getRecipients()
The recipient domains and email addresses to which the receipt rule
applies.
|
java.lang.Boolean |
getScanEnabled()
If
true , then messages to which this receipt rule applies
are scanned for spam and viruses. |
java.lang.String |
getTlsPolicy()
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS).
|
int |
hashCode() |
java.lang.Boolean |
isEnabled()
If
true , the receipt rule is active. |
java.lang.Boolean |
isScanEnabled()
If
true , then messages to which this receipt rule applies
are scanned for spam and viruses. |
void |
setActions(java.util.Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one
of the recipient email addresses or domains specified in the receipt
rule.
|
void |
setEnabled(java.lang.Boolean enabled)
If
true , the receipt rule is active. |
void |
setName(java.lang.String name)
The name of the receipt rule.
|
void |
setRecipients(java.util.Collection<java.lang.String> recipients)
The recipient domains and email addresses to which the receipt rule
applies.
|
void |
setScanEnabled(java.lang.Boolean scanEnabled)
If
true , then messages to which this receipt rule applies
are scanned for spam and viruses. |
void |
setTlsPolicy(java.lang.String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS).
|
void |
setTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS).
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ReceiptRule |
withActions(java.util.Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one
of the recipient email addresses or domains specified in the receipt
rule.
|
ReceiptRule |
withActions(ReceiptAction... actions)
An ordered list of actions to perform on messages that match at least one
of the recipient email addresses or domains specified in the receipt
rule.
|
ReceiptRule |
withEnabled(java.lang.Boolean enabled)
If
true , the receipt rule is active. |
ReceiptRule |
withName(java.lang.String name)
The name of the receipt rule.
|
ReceiptRule |
withRecipients(java.util.Collection<java.lang.String> recipients)
The recipient domains and email addresses to which the receipt rule
applies.
|
ReceiptRule |
withRecipients(java.lang.String... recipients)
The recipient domains and email addresses to which the receipt rule
applies.
|
ReceiptRule |
withScanEnabled(java.lang.Boolean scanEnabled)
If
true , then messages to which this receipt rule applies
are scanned for spam and viruses. |
ReceiptRule |
withTlsPolicy(java.lang.String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS).
|
ReceiptRule |
withTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS).
|
private java.lang.String name
The name of the receipt rule. The name must:
private java.lang.Boolean enabled
If true
, the receipt rule is active. The default value is
false
.
private java.lang.String tlsPolicy
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS). If this parameter is set to Require
, Amazon SES will
bounce emails that are not received over TLS. The default is
Optional
.
private SdkInternalList<java.lang.String> recipients
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
private SdkInternalList<ReceiptAction> actions
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
private java.lang.Boolean scanEnabled
If true
, then messages to which this receipt rule applies
are scanned for spam and viruses. The default value is false
.
public void setName(java.lang.String name)
The name of the receipt rule. The name must:
name
- The name of the receipt rule. The name must:
public java.lang.String getName()
The name of the receipt rule. The name must:
public ReceiptRule withName(java.lang.String name)
The name of the receipt rule. The name must:
name
- The name of the receipt rule. The name must:
public void setEnabled(java.lang.Boolean enabled)
If true
, the receipt rule is active. The default value is
false
.
enabled
- If true
, the receipt rule is active. The default
value is false
.public java.lang.Boolean getEnabled()
If true
, the receipt rule is active. The default value is
false
.
true
, the receipt rule is active. The default
value is false
.public ReceiptRule withEnabled(java.lang.Boolean enabled)
If true
, the receipt rule is active. The default value is
false
.
enabled
- If true
, the receipt rule is active. The default
value is false
.public java.lang.Boolean isEnabled()
If true
, the receipt rule is active. The default value is
false
.
true
, the receipt rule is active. The default
value is false
.public void setTlsPolicy(java.lang.String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS). If this parameter is set to Require
, Amazon SES will
bounce emails that are not received over TLS. The default is
Optional
.
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer
Security (TLS). If this parameter is set to Require
,
Amazon SES will bounce emails that are not received over TLS. The
default is Optional
.TlsPolicy
public java.lang.String getTlsPolicy()
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS). If this parameter is set to Require
, Amazon SES will
bounce emails that are not received over TLS. The default is
Optional
.
Require
,
Amazon SES will bounce emails that are not received over TLS. The
default is Optional
.TlsPolicy
public ReceiptRule withTlsPolicy(java.lang.String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS). If this parameter is set to Require
, Amazon SES will
bounce emails that are not received over TLS. The default is
Optional
.
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer
Security (TLS). If this parameter is set to Require
,
Amazon SES will bounce emails that are not received over TLS. The
default is Optional
.TlsPolicy
public void setTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS). If this parameter is set to Require
, Amazon SES will
bounce emails that are not received over TLS. The default is
Optional
.
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer
Security (TLS). If this parameter is set to Require
,
Amazon SES will bounce emails that are not received over TLS. The
default is Optional
.TlsPolicy
public ReceiptRule withTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer Security
(TLS). If this parameter is set to Require
, Amazon SES will
bounce emails that are not received over TLS. The default is
Optional
.
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is
delivered over a connection encrypted with Transport Layer
Security (TLS). If this parameter is set to Require
,
Amazon SES will bounce emails that are not received over TLS. The
default is Optional
.TlsPolicy
public java.util.List<java.lang.String> getRecipients()
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
public void setRecipients(java.util.Collection<java.lang.String> recipients)
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
recipients
- The recipient domains and email addresses to which the receipt
rule applies. If this field is not specified, this rule will match
all recipients under all verified domains.public ReceiptRule withRecipients(java.lang.String... recipients)
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
NOTE: This method appends the values to the existing list (if
any). Use setRecipients(java.util.Collection)
or
withRecipients(java.util.Collection)
if you want to override the
existing values.
recipients
- The recipient domains and email addresses to which the receipt
rule applies. If this field is not specified, this rule will match
all recipients under all verified domains.public ReceiptRule withRecipients(java.util.Collection<java.lang.String> recipients)
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
recipients
- The recipient domains and email addresses to which the receipt
rule applies. If this field is not specified, this rule will match
all recipients under all verified domains.public java.util.List<ReceiptAction> getActions()
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
public void setActions(java.util.Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
actions
- An ordered list of actions to perform on messages that match at
least one of the recipient email addresses or domains specified in
the receipt rule.public ReceiptRule withActions(ReceiptAction... actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
NOTE: This method appends the values to the existing list (if
any). Use setActions(java.util.Collection)
or
withActions(java.util.Collection)
if you want to override the
existing values.
actions
- An ordered list of actions to perform on messages that match at
least one of the recipient email addresses or domains specified in
the receipt rule.public ReceiptRule withActions(java.util.Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
actions
- An ordered list of actions to perform on messages that match at
least one of the recipient email addresses or domains specified in
the receipt rule.public void setScanEnabled(java.lang.Boolean scanEnabled)
If true
, then messages to which this receipt rule applies
are scanned for spam and viruses. The default value is false
.
scanEnabled
- If true
, then messages to which this receipt rule
applies are scanned for spam and viruses. The default value is
false
.public java.lang.Boolean getScanEnabled()
If true
, then messages to which this receipt rule applies
are scanned for spam and viruses. The default value is false
.
true
, then messages to which this receipt rule
applies are scanned for spam and viruses. The default value is
false
.public ReceiptRule withScanEnabled(java.lang.Boolean scanEnabled)
If true
, then messages to which this receipt rule applies
are scanned for spam and viruses. The default value is false
.
scanEnabled
- If true
, then messages to which this receipt rule
applies are scanned for spam and viruses. The default value is
false
.public java.lang.Boolean isScanEnabled()
If true
, then messages to which this receipt rule applies
are scanned for spam and viruses. The default value is false
.
true
, then messages to which this receipt rule
applies are scanned for spam and viruses. The default value is
false
.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ReceiptRule clone()
clone
in class java.lang.Object