All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.simpleemail.model.EventDestination Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SES module holds the client classes that are used for communicating with Amazon Simple Email Service

There is a newer version: 1.12.778
Show newest version
/*
 * 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;

/**
 * 

* Contains information about an event destination. *

* *

* When you create or update an event destination, you must provide one, and only one, destination. The destination can * be Amazon CloudWatch, Amazon Kinesis Firehose or Amazon Simple Notification Service (Amazon SNS). *

*
*

* Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon * CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS). For information about using * configuration sets, see the Amazon * SES Developer Guide. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EventDestination implements Serializable, Cloneable { /** *

* The name of the event destination. The name must meet the following requirements: *

*
    *
  • *

    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

    *
  • *
  • *

    * Contain 64 characters or fewer. *

    *
  • *
*/ private String name; /** *

* Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to false * to prevent publishing to this destination. The default value is false. *

*/ private Boolean enabled; /** *

* The type of email sending events to publish to the event destination. *

*
    *
  • *

    * send - The call was successful and Amazon SES is attempting to deliver the email. *

    *
  • *
  • *

    * reject - Amazon SES determined that the email contained a virus and rejected it. *

    *
  • *
  • *

    * bounce - The recipient's mail server permanently rejected the email. This corresponds to a hard * bounce. *

    *
  • *
  • *

    * complaint - The recipient marked the email as spam. *

    *
  • *
  • *

    * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

    *
  • *
  • *

    * open - The recipient received the email and opened it in their email client. *

    *
  • *
  • *

    * click - The recipient clicked one or more links in the email. *

    *
  • *
  • *

    * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

    *
  • *
*/ private com.amazonaws.internal.SdkInternalList matchingEventTypes; /** *

* An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose * event destination. *

*/ private KinesisFirehoseDestination kinesisFirehoseDestination; /** *

* An object that contains the names, default values, and sources of the dimensions associated with an Amazon * CloudWatch event destination. *

*/ private CloudWatchDestination cloudWatchDestination; /** *

* An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event * destination. *

*/ private SNSDestination sNSDestination; /** *

* The name of the event destination. The name must meet the following requirements: *

*
    *
  • *

    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

    *
  • *
  • *

    * Contain 64 characters or fewer. *

    *
  • *
* * @param name * The name of the event destination. The name must meet the following requirements:

*
    *
  • *

    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

    *
  • *
  • *

    * Contain 64 characters or fewer. *

    *
  • */ public void setName(String name) { this.name = name; } /** *

    * The name of the event destination. The name must meet the following requirements: *

    *
      *
    • *

      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

      *
    • *
    • *

      * Contain 64 characters or fewer. *

      *
    • *
    * * @return The name of the event destination. The name must meet the following requirements:

    *
      *
    • *

      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

      *
    • *
    • *

      * Contain 64 characters or fewer. *

      *
    • */ public String getName() { return this.name; } /** *

      * The name of the event destination. The name must meet the following requirements: *

      *
        *
      • *

        * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

        *
      • *
      • *

        * Contain 64 characters or fewer. *

        *
      • *
      * * @param name * The name of the event destination. The name must meet the following requirements:

      *
        *
      • *

        * Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). *

        *
      • *
      • *

        * Contain 64 characters or fewer. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public EventDestination withName(String name) { setName(name); return this; } /** *

        * Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to false * to prevent publishing to this destination. The default value is false. *

        * * @param enabled * Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to * false to prevent publishing to this destination. The default value is false. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** *

        * Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to false * to prevent publishing to this destination. The default value is false. *

        * * @return Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to * false to prevent publishing to this destination. The default value is false. */ public Boolean getEnabled() { return this.enabled; } /** *

        * Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to false * to prevent publishing to this destination. The default value is false. *

        * * @param enabled * Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to * false to prevent publishing to this destination. The default value is false. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDestination withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** *

        * Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to false * to prevent publishing to this destination. The default value is false. *

        * * @return Sets whether Amazon SES publishes events to this destination when you send an email with the associated * configuration set. Set to true to enable publishing to this destination; set to * false to prevent publishing to this destination. The default value is false. */ public Boolean isEnabled() { return this.enabled; } /** *

        * The type of email sending events to publish to the event destination. *

        *
          *
        • *

          * send - The call was successful and Amazon SES is attempting to deliver the email. *

          *
        • *
        • *

          * reject - Amazon SES determined that the email contained a virus and rejected it. *

          *
        • *
        • *

          * bounce - The recipient's mail server permanently rejected the email. This corresponds to a hard * bounce. *

          *
        • *
        • *

          * complaint - The recipient marked the email as spam. *

          *
        • *
        • *

          * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

          *
        • *
        • *

          * open - The recipient received the email and opened it in their email client. *

          *
        • *
        • *

          * click - The recipient clicked one or more links in the email. *

          *
        • *
        • *

          * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

          *
        • *
        * * @return The type of email sending events to publish to the event destination.

        *
          *
        • *

          * send - The call was successful and Amazon SES is attempting to deliver the email. *

          *
        • *
        • *

          * reject - Amazon SES determined that the email contained a virus and rejected it. *

          *
        • *
        • *

          * bounce - The recipient's mail server permanently rejected the email. This corresponds to a * hard bounce. *

          *
        • *
        • *

          * complaint - The recipient marked the email as spam. *

          *
        • *
        • *

          * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

          *
        • *
        • *

          * open - The recipient received the email and opened it in their email client. *

          *
        • *
        • *

          * click - The recipient clicked one or more links in the email. *

          *
        • *
        • *

          * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

          *
        • * @see EventType */ public java.util.List getMatchingEventTypes() { if (matchingEventTypes == null) { matchingEventTypes = new com.amazonaws.internal.SdkInternalList(); } return matchingEventTypes; } /** *

          * The type of email sending events to publish to the event destination. *

          *
            *
          • *

            * send - The call was successful and Amazon SES is attempting to deliver the email. *

            *
          • *
          • *

            * reject - Amazon SES determined that the email contained a virus and rejected it. *

            *
          • *
          • *

            * bounce - The recipient's mail server permanently rejected the email. This corresponds to a hard * bounce. *

            *
          • *
          • *

            * complaint - The recipient marked the email as spam. *

            *
          • *
          • *

            * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

            *
          • *
          • *

            * open - The recipient received the email and opened it in their email client. *

            *
          • *
          • *

            * click - The recipient clicked one or more links in the email. *

            *
          • *
          • *

            * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

            *
          • *
          * * @param matchingEventTypes * The type of email sending events to publish to the event destination.

          *
            *
          • *

            * send - The call was successful and Amazon SES is attempting to deliver the email. *

            *
          • *
          • *

            * reject - Amazon SES determined that the email contained a virus and rejected it. *

            *
          • *
          • *

            * bounce - The recipient's mail server permanently rejected the email. This corresponds to a * hard bounce. *

            *
          • *
          • *

            * complaint - The recipient marked the email as spam. *

            *
          • *
          • *

            * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

            *
          • *
          • *

            * open - The recipient received the email and opened it in their email client. *

            *
          • *
          • *

            * click - The recipient clicked one or more links in the email. *

            *
          • *
          • *

            * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

            *
          • * @see EventType */ public void setMatchingEventTypes(java.util.Collection matchingEventTypes) { if (matchingEventTypes == null) { this.matchingEventTypes = null; return; } this.matchingEventTypes = new com.amazonaws.internal.SdkInternalList(matchingEventTypes); } /** *

            * The type of email sending events to publish to the event destination. *

            *
              *
            • *

              * send - The call was successful and Amazon SES is attempting to deliver the email. *

              *
            • *
            • *

              * reject - Amazon SES determined that the email contained a virus and rejected it. *

              *
            • *
            • *

              * bounce - The recipient's mail server permanently rejected the email. This corresponds to a hard * bounce. *

              *
            • *
            • *

              * complaint - The recipient marked the email as spam. *

              *
            • *
            • *

              * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

              *
            • *
            • *

              * open - The recipient received the email and opened it in their email client. *

              *
            • *
            • *

              * click - The recipient clicked one or more links in the email. *

              *
            • *
            • *

              * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

              *
            • *
            *

            * NOTE: This method appends the values to the existing list (if any). Use * {@link #setMatchingEventTypes(java.util.Collection)} or {@link #withMatchingEventTypes(java.util.Collection)} if * you want to override the existing values. *

            * * @param matchingEventTypes * The type of email sending events to publish to the event destination.

            *
              *
            • *

              * send - The call was successful and Amazon SES is attempting to deliver the email. *

              *
            • *
            • *

              * reject - Amazon SES determined that the email contained a virus and rejected it. *

              *
            • *
            • *

              * bounce - The recipient's mail server permanently rejected the email. This corresponds to a * hard bounce. *

              *
            • *
            • *

              * complaint - The recipient marked the email as spam. *

              *
            • *
            • *

              * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

              *
            • *
            • *

              * open - The recipient received the email and opened it in their email client. *

              *
            • *
            • *

              * click - The recipient clicked one or more links in the email. *

              *
            • *
            • *

              * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

              *
            • * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public EventDestination withMatchingEventTypes(String... matchingEventTypes) { if (this.matchingEventTypes == null) { setMatchingEventTypes(new com.amazonaws.internal.SdkInternalList(matchingEventTypes.length)); } for (String ele : matchingEventTypes) { this.matchingEventTypes.add(ele); } return this; } /** *

              * The type of email sending events to publish to the event destination. *

              *
                *
              • *

                * send - The call was successful and Amazon SES is attempting to deliver the email. *

                *
              • *
              • *

                * reject - Amazon SES determined that the email contained a virus and rejected it. *

                *
              • *
              • *

                * bounce - The recipient's mail server permanently rejected the email. This corresponds to a hard * bounce. *

                *
              • *
              • *

                * complaint - The recipient marked the email as spam. *

                *
              • *
              • *

                * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

                *
              • *
              • *

                * open - The recipient received the email and opened it in their email client. *

                *
              • *
              • *

                * click - The recipient clicked one or more links in the email. *

                *
              • *
              • *

                * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

                *
              • *
              * * @param matchingEventTypes * The type of email sending events to publish to the event destination.

              *
                *
              • *

                * send - The call was successful and Amazon SES is attempting to deliver the email. *

                *
              • *
              • *

                * reject - Amazon SES determined that the email contained a virus and rejected it. *

                *
              • *
              • *

                * bounce - The recipient's mail server permanently rejected the email. This corresponds to a * hard bounce. *

                *
              • *
              • *

                * complaint - The recipient marked the email as spam. *

                *
              • *
              • *

                * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

                *
              • *
              • *

                * open - The recipient received the email and opened it in their email client. *

                *
              • *
              • *

                * click - The recipient clicked one or more links in the email. *

                *
              • *
              • *

                * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

                *
              • * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public EventDestination withMatchingEventTypes(java.util.Collection matchingEventTypes) { setMatchingEventTypes(matchingEventTypes); return this; } /** *

                * The type of email sending events to publish to the event destination. *

                *
                  *
                • *

                  * send - The call was successful and Amazon SES is attempting to deliver the email. *

                  *
                • *
                • *

                  * reject - Amazon SES determined that the email contained a virus and rejected it. *

                  *
                • *
                • *

                  * bounce - The recipient's mail server permanently rejected the email. This corresponds to a hard * bounce. *

                  *
                • *
                • *

                  * complaint - The recipient marked the email as spam. *

                  *
                • *
                • *

                  * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

                  *
                • *
                • *

                  * open - The recipient received the email and opened it in their email client. *

                  *
                • *
                • *

                  * click - The recipient clicked one or more links in the email. *

                  *
                • *
                • *

                  * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

                  *
                • *
                * * @param matchingEventTypes * The type of email sending events to publish to the event destination.

                *
                  *
                • *

                  * send - The call was successful and Amazon SES is attempting to deliver the email. *

                  *
                • *
                • *

                  * reject - Amazon SES determined that the email contained a virus and rejected it. *

                  *
                • *
                • *

                  * bounce - The recipient's mail server permanently rejected the email. This corresponds to a * hard bounce. *

                  *
                • *
                • *

                  * complaint - The recipient marked the email as spam. *

                  *
                • *
                • *

                  * delivery - Amazon SES successfully delivered the email to the recipient's mail server. *

                  *
                • *
                • *

                  * open - The recipient received the email and opened it in their email client. *

                  *
                • *
                • *

                  * click - The recipient clicked one or more links in the email. *

                  *
                • *
                • *

                  * renderingFailure - Amazon SES did not send the email because of a template rendering issue. *

                  *
                • * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public EventDestination withMatchingEventTypes(EventType... matchingEventTypes) { com.amazonaws.internal.SdkInternalList matchingEventTypesCopy = new com.amazonaws.internal.SdkInternalList(matchingEventTypes.length); for (EventType value : matchingEventTypes) { matchingEventTypesCopy.add(value.toString()); } if (getMatchingEventTypes() == null) { setMatchingEventTypes(matchingEventTypesCopy); } else { getMatchingEventTypes().addAll(matchingEventTypesCopy); } return this; } /** *

                  * An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose * event destination. *

                  * * @param kinesisFirehoseDestination * An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis * Firehose event destination. */ public void setKinesisFirehoseDestination(KinesisFirehoseDestination kinesisFirehoseDestination) { this.kinesisFirehoseDestination = kinesisFirehoseDestination; } /** *

                  * An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose * event destination. *

                  * * @return An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis * Firehose event destination. */ public KinesisFirehoseDestination getKinesisFirehoseDestination() { return this.kinesisFirehoseDestination; } /** *

                  * An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose * event destination. *

                  * * @param kinesisFirehoseDestination * An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis * Firehose event destination. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDestination withKinesisFirehoseDestination(KinesisFirehoseDestination kinesisFirehoseDestination) { setKinesisFirehoseDestination(kinesisFirehoseDestination); return this; } /** *

                  * An object that contains the names, default values, and sources of the dimensions associated with an Amazon * CloudWatch event destination. *

                  * * @param cloudWatchDestination * An object that contains the names, default values, and sources of the dimensions associated with an Amazon * CloudWatch event destination. */ public void setCloudWatchDestination(CloudWatchDestination cloudWatchDestination) { this.cloudWatchDestination = cloudWatchDestination; } /** *

                  * An object that contains the names, default values, and sources of the dimensions associated with an Amazon * CloudWatch event destination. *

                  * * @return An object that contains the names, default values, and sources of the dimensions associated with an * Amazon CloudWatch event destination. */ public CloudWatchDestination getCloudWatchDestination() { return this.cloudWatchDestination; } /** *

                  * An object that contains the names, default values, and sources of the dimensions associated with an Amazon * CloudWatch event destination. *

                  * * @param cloudWatchDestination * An object that contains the names, default values, and sources of the dimensions associated with an Amazon * CloudWatch event destination. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDestination withCloudWatchDestination(CloudWatchDestination cloudWatchDestination) { setCloudWatchDestination(cloudWatchDestination); return this; } /** *

                  * An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event * destination. *

                  * * @param sNSDestination * An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) * event destination. */ public void setSNSDestination(SNSDestination sNSDestination) { this.sNSDestination = sNSDestination; } /** *

                  * An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event * destination. *

                  * * @return An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) * event destination. */ public SNSDestination getSNSDestination() { return this.sNSDestination; } /** *

                  * An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event * destination. *

                  * * @param sNSDestination * An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) * event destination. * @return Returns a reference to this object so that method calls can be chained together. */ public EventDestination withSNSDestination(SNSDestination sNSDestination) { setSNSDestination(sNSDestination); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getEnabled() != null) sb.append("Enabled: ").append(getEnabled()).append(","); if (getMatchingEventTypes() != null) sb.append("MatchingEventTypes: ").append(getMatchingEventTypes()).append(","); if (getKinesisFirehoseDestination() != null) sb.append("KinesisFirehoseDestination: ").append(getKinesisFirehoseDestination()).append(","); if (getCloudWatchDestination() != null) sb.append("CloudWatchDestination: ").append(getCloudWatchDestination()).append(","); if (getSNSDestination() != null) sb.append("SNSDestination: ").append(getSNSDestination()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EventDestination == false) return false; EventDestination other = (EventDestination) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; if (other.getMatchingEventTypes() == null ^ this.getMatchingEventTypes() == null) return false; if (other.getMatchingEventTypes() != null && other.getMatchingEventTypes().equals(this.getMatchingEventTypes()) == false) return false; if (other.getKinesisFirehoseDestination() == null ^ this.getKinesisFirehoseDestination() == null) return false; if (other.getKinesisFirehoseDestination() != null && other.getKinesisFirehoseDestination().equals(this.getKinesisFirehoseDestination()) == false) return false; if (other.getCloudWatchDestination() == null ^ this.getCloudWatchDestination() == null) return false; if (other.getCloudWatchDestination() != null && other.getCloudWatchDestination().equals(this.getCloudWatchDestination()) == false) return false; if (other.getSNSDestination() == null ^ this.getSNSDestination() == null) return false; if (other.getSNSDestination() != null && other.getSNSDestination().equals(this.getSNSDestination()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getMatchingEventTypes() == null) ? 0 : getMatchingEventTypes().hashCode()); hashCode = prime * hashCode + ((getKinesisFirehoseDestination() == null) ? 0 : getKinesisFirehoseDestination().hashCode()); hashCode = prime * hashCode + ((getCloudWatchDestination() == null) ? 0 : getCloudWatchDestination().hashCode()); hashCode = prime * hashCode + ((getSNSDestination() == null) ? 0 : getSNSDestination().hashCode()); return hashCode; } @Override public EventDestination clone() { try { return (EventDestination) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy