Class RuleAction
- java.lang.Object
-
- software.amazon.awssdk.services.mailmanager.model.RuleAction
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<RuleAction.Builder,RuleAction>
@Generated("software.amazon.awssdk:codegen") public final class RuleAction extends Object implements SdkPojo, Serializable, ToCopyableBuilder<RuleAction.Builder,RuleAction>
The action for a rule to take. Only one of the contained actions can be set.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRuleAction.Builderstatic classRuleAction.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AddHeaderActionaddHeader()This action adds a header.ArchiveActionarchive()This action archives the email.static RuleAction.Builderbuilder()DeliverToMailboxActiondeliverToMailbox()This action delivers an email to a WorkMail mailbox.DropActiondrop()This action terminates the evaluation of rules in the rule set.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static RuleActionfromAddHeader(Consumer<AddHeaderAction.Builder> addHeader)Create an instance of this class withaddHeader()initialized to the given value.static RuleActionfromAddHeader(AddHeaderAction addHeader)Create an instance of this class withaddHeader()initialized to the given value.static RuleActionfromArchive(Consumer<ArchiveAction.Builder> archive)Create an instance of this class witharchive()initialized to the given value.static RuleActionfromArchive(ArchiveAction archive)Create an instance of this class witharchive()initialized to the given value.static RuleActionfromDeliverToMailbox(Consumer<DeliverToMailboxAction.Builder> deliverToMailbox)Create an instance of this class withdeliverToMailbox()initialized to the given value.static RuleActionfromDeliverToMailbox(DeliverToMailboxAction deliverToMailbox)Create an instance of this class withdeliverToMailbox()initialized to the given value.static RuleActionfromDrop(Consumer<DropAction.Builder> drop)Create an instance of this class withdrop()initialized to the given value.static RuleActionfromDrop(DropAction drop)Create an instance of this class withdrop()initialized to the given value.static RuleActionfromRelay(Consumer<RelayAction.Builder> relay)Create an instance of this class withrelay()initialized to the given value.static RuleActionfromRelay(RelayAction relay)Create an instance of this class withrelay()initialized to the given value.static RuleActionfromReplaceRecipient(Consumer<ReplaceRecipientAction.Builder> replaceRecipient)Create an instance of this class withreplaceRecipient()initialized to the given value.static RuleActionfromReplaceRecipient(ReplaceRecipientAction replaceRecipient)Create an instance of this class withreplaceRecipient()initialized to the given value.static RuleActionfromSend(Consumer<SendAction.Builder> send)Create an instance of this class withsend()initialized to the given value.static RuleActionfromSend(SendAction send)Create an instance of this class withsend()initialized to the given value.static RuleActionfromWriteToS3(Consumer<S3Action.Builder> writeToS3)Create an instance of this class withwriteToS3()initialized to the given value.static RuleActionfromWriteToS3(S3Action writeToS3)Create an instance of this class withwriteToS3()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()RelayActionrelay()This action relays the email to another SMTP server.ReplaceRecipientActionreplaceRecipient()The action replaces certain or all recipients with a different set of recipients.List<SdkField<?>>sdkFields()SendActionsend()This action sends the email to the internet.static Class<? extends RuleAction.Builder>serializableBuilderClass()RuleAction.BuildertoBuilder()StringtoString()Returns a string representation of this object.RuleAction.Typetype()Retrieve an enum value representing which member of this object is populated.S3ActionwriteToS3()This action writes the MIME content of the email to an S3 bucket.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
addHeader
public final AddHeaderAction addHeader()
This action adds a header. This can be used to add arbitrary email headers.
- Returns:
- This action adds a header. This can be used to add arbitrary email headers.
-
archive
public final ArchiveAction archive()
This action archives the email. This can be used to deliver an email to an archive.
- Returns:
- This action archives the email. This can be used to deliver an email to an archive.
-
deliverToMailbox
public final DeliverToMailboxAction deliverToMailbox()
This action delivers an email to a WorkMail mailbox.
- Returns:
- This action delivers an email to a WorkMail mailbox.
-
drop
public final DropAction drop()
This action terminates the evaluation of rules in the rule set.
- Returns:
- This action terminates the evaluation of rules in the rule set.
-
relay
public final RelayAction relay()
This action relays the email to another SMTP server.
- Returns:
- This action relays the email to another SMTP server.
-
replaceRecipient
public final ReplaceRecipientAction replaceRecipient()
The action replaces certain or all recipients with a different set of recipients.
- Returns:
- The action replaces certain or all recipients with a different set of recipients.
-
send
public final SendAction send()
This action sends the email to the internet.
- Returns:
- This action sends the email to the internet.
-
writeToS3
public final S3Action writeToS3()
This action writes the MIME content of the email to an S3 bucket.
- Returns:
- This action writes the MIME content of the email to an S3 bucket.
-
toBuilder
public RuleAction.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<RuleAction.Builder,RuleAction>
-
builder
public static RuleAction.Builder builder()
-
serializableBuilderClass
public static Class<? extends RuleAction.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
fromAddHeader
public static RuleAction fromAddHeader(AddHeaderAction addHeader)
Create an instance of this class withaddHeader()initialized to the given value.This action adds a header. This can be used to add arbitrary email headers.
- Parameters:
addHeader- This action adds a header. This can be used to add arbitrary email headers.
-
fromAddHeader
public static RuleAction fromAddHeader(Consumer<AddHeaderAction.Builder> addHeader)
Create an instance of this class withaddHeader()initialized to the given value.This action adds a header. This can be used to add arbitrary email headers.
- Parameters:
addHeader- This action adds a header. This can be used to add arbitrary email headers.
-
fromArchive
public static RuleAction fromArchive(ArchiveAction archive)
Create an instance of this class witharchive()initialized to the given value.This action archives the email. This can be used to deliver an email to an archive.
- Parameters:
archive- This action archives the email. This can be used to deliver an email to an archive.
-
fromArchive
public static RuleAction fromArchive(Consumer<ArchiveAction.Builder> archive)
Create an instance of this class witharchive()initialized to the given value.This action archives the email. This can be used to deliver an email to an archive.
- Parameters:
archive- This action archives the email. This can be used to deliver an email to an archive.
-
fromDeliverToMailbox
public static RuleAction fromDeliverToMailbox(DeliverToMailboxAction deliverToMailbox)
Create an instance of this class withdeliverToMailbox()initialized to the given value.This action delivers an email to a WorkMail mailbox.
- Parameters:
deliverToMailbox- This action delivers an email to a WorkMail mailbox.
-
fromDeliverToMailbox
public static RuleAction fromDeliverToMailbox(Consumer<DeliverToMailboxAction.Builder> deliverToMailbox)
Create an instance of this class withdeliverToMailbox()initialized to the given value.This action delivers an email to a WorkMail mailbox.
- Parameters:
deliverToMailbox- This action delivers an email to a WorkMail mailbox.
-
fromDrop
public static RuleAction fromDrop(DropAction drop)
Create an instance of this class withdrop()initialized to the given value.This action terminates the evaluation of rules in the rule set.
- Parameters:
drop- This action terminates the evaluation of rules in the rule set.
-
fromDrop
public static RuleAction fromDrop(Consumer<DropAction.Builder> drop)
Create an instance of this class withdrop()initialized to the given value.This action terminates the evaluation of rules in the rule set.
- Parameters:
drop- This action terminates the evaluation of rules in the rule set.
-
fromRelay
public static RuleAction fromRelay(RelayAction relay)
Create an instance of this class withrelay()initialized to the given value.This action relays the email to another SMTP server.
- Parameters:
relay- This action relays the email to another SMTP server.
-
fromRelay
public static RuleAction fromRelay(Consumer<RelayAction.Builder> relay)
Create an instance of this class withrelay()initialized to the given value.This action relays the email to another SMTP server.
- Parameters:
relay- This action relays the email to another SMTP server.
-
fromReplaceRecipient
public static RuleAction fromReplaceRecipient(ReplaceRecipientAction replaceRecipient)
Create an instance of this class withreplaceRecipient()initialized to the given value.The action replaces certain or all recipients with a different set of recipients.
- Parameters:
replaceRecipient- The action replaces certain or all recipients with a different set of recipients.
-
fromReplaceRecipient
public static RuleAction fromReplaceRecipient(Consumer<ReplaceRecipientAction.Builder> replaceRecipient)
Create an instance of this class withreplaceRecipient()initialized to the given value.The action replaces certain or all recipients with a different set of recipients.
- Parameters:
replaceRecipient- The action replaces certain or all recipients with a different set of recipients.
-
fromSend
public static RuleAction fromSend(SendAction send)
Create an instance of this class withsend()initialized to the given value.This action sends the email to the internet.
- Parameters:
send- This action sends the email to the internet.
-
fromSend
public static RuleAction fromSend(Consumer<SendAction.Builder> send)
Create an instance of this class withsend()initialized to the given value.This action sends the email to the internet.
- Parameters:
send- This action sends the email to the internet.
-
fromWriteToS3
public static RuleAction fromWriteToS3(S3Action writeToS3)
Create an instance of this class withwriteToS3()initialized to the given value.This action writes the MIME content of the email to an S3 bucket.
- Parameters:
writeToS3- This action writes the MIME content of the email to an S3 bucket.
-
fromWriteToS3
public static RuleAction fromWriteToS3(Consumer<S3Action.Builder> writeToS3)
Create an instance of this class withwriteToS3()initialized to the given value.This action writes the MIME content of the email to an S3 bucket.
- Parameters:
writeToS3- This action writes the MIME content of the email to an S3 bucket.
-
type
public RuleAction.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beRuleAction.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beRuleAction.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-