Class RuleAction
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<RuleAction.Builder,RuleAction>
The action for a rule to take. Only one of the contained actions can be set.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AddHeaderActionThis action adds a header.final ArchiveActionarchive()This action archives the email.static RuleAction.Builderbuilder()final DeliverToMailboxActionThis action delivers an email to a WorkMail mailbox.final DropActiondrop()This action terminates the evaluation of rules in the rule set.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.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.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final RelayActionrelay()This action relays the email to another SMTP server.final ReplaceRecipientActionThe action replaces certain or all recipients with a different set of recipients.final SendActionsend()This action sends the email to the internet.static Class<? extends RuleAction.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.type()Retrieve an enum value representing which member of this object is populated.final S3ActionThis action writes the MIME content of the email to an S3 bucket.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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
This action delivers an email to a WorkMail mailbox.
- Returns:
- This action delivers an email to a WorkMail mailbox.
-
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
This action relays the email to another SMTP server.
- Returns:
- This action relays the email to another SMTP server.
-
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
This action sends the email to the internet.
- Returns:
- This action sends the email to the internet.
-
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
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<RuleAction.Builder,RuleAction> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
fromAddHeader
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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. -
sdkFields
-