Class ReceiptRule

java.lang.Object
com.amazonaws.services.simpleemail.model.ReceiptRule
All Implemented Interfaces:
Serializable, Cloneable

public class ReceiptRule extends Object implements Serializable, 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.

See Also:
  • Constructor Details

    • ReceiptRule

      public ReceiptRule()
  • Method Details

    • setName

      public void setName(String name)

      The name of the receipt rule. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
      • Start and end with a letter or number.
      • Contain less than 64 characters.
      Parameters:
      name - The name of the receipt rule. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
      • Start and end with a letter or number.
      • Contain less than 64 characters.
    • getName

      public String getName()

      The name of the receipt rule. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
      • Start and end with a letter or number.
      • Contain less than 64 characters.
      Returns:
      The name of the receipt rule. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
      • Start and end with a letter or number.
      • Contain less than 64 characters.
    • withName

      public ReceiptRule withName(String name)

      The name of the receipt rule. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
      • Start and end with a letter or number.
      • Contain less than 64 characters.
      Parameters:
      name - The name of the receipt rule. The name must:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
      • Start and end with a letter or number.
      • Contain less than 64 characters.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setEnabled

      public void setEnabled(Boolean enabled)

      If true, the receipt rule is active. The default value is false.

      Parameters:
      enabled - If true, the receipt rule is active. The default value is false.
    • getEnabled

      public Boolean getEnabled()

      If true, the receipt rule is active. The default value is false.

      Returns:
      If true, the receipt rule is active. The default value is false.
    • withEnabled

      public ReceiptRule withEnabled(Boolean enabled)

      If true, the receipt rule is active. The default value is false.

      Parameters:
      enabled - If true, the receipt rule is active. The default value is false.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • isEnabled

      public Boolean isEnabled()

      If true, the receipt rule is active. The default value is false.

      Returns:
      If true, the receipt rule is active. The default value is false.
    • setTlsPolicy

      public void setTlsPolicy(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.

      Parameters:
      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.
      See Also:
    • getTlsPolicy

      public 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.

      Returns:
      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.
      See Also:
    • withTlsPolicy

      public ReceiptRule withTlsPolicy(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setTlsPolicy

      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.

      Parameters:
      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.
      See Also:
    • withTlsPolicy

      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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • getRecipients

      public List<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.

      Returns:
      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.
    • setRecipients

      public void setRecipients(Collection<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.

      Parameters:
      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.
    • withRecipients

      public ReceiptRule withRecipients(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withRecipients

      public ReceiptRule withRecipients(Collection<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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getActions

      public 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.

      Returns:
      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.
    • setActions

      public void setActions(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.

      Parameters:
      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.
    • withActions

      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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withActions

      public ReceiptRule withActions(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setScanEnabled

      public void setScanEnabled(Boolean scanEnabled)

      If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false .

      Parameters:
      scanEnabled - If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false.
    • getScanEnabled

      public Boolean getScanEnabled()

      If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false .

      Returns:
      If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false.
    • withScanEnabled

      public ReceiptRule withScanEnabled(Boolean scanEnabled)

      If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false .

      Parameters:
      scanEnabled - If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • isScanEnabled

      public Boolean isScanEnabled()

      If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false .

      Returns:
      If true, then messages to which this receipt rule applies are scanned for spam and viruses. The default value is false.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public ReceiptRule clone()
      Overrides:
      clone in class Object