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.780
Show newest version
/*
 * Copyright 2012-2017 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 the event destination to which the specified email sending events are published. *

* *

* When you create or update an event destination, you must provide one, and only one, destination. The destination can * be either Amazon CloudWatch or Amazon Kinesis Firehose. *

*
*

* Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon * CloudWatch or Amazon Kinesis Firehose. 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: *

*
    *
  • *

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

    *
  • *
  • *

    * Contain less than 64 characters. *

    *
  • *
*/ 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. *

*/ 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; /** *

* The name of the event destination. The name must: *

*
    *
  • *

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

    *
  • *
  • *

    * Contain less than 64 characters. *

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

*
    *
  • *

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

    *
  • *
  • *

    * Contain less than 64 characters. *

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

    * The name of the event destination. The name must: *

    *
      *
    • *

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

      *
    • *
    • *

      * Contain less than 64 characters. *

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

    *
      *
    • *

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

      *
    • *
    • *

      * Contain less than 64 characters. *

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

      * The name of the event destination. The name must: *

      *
        *
      • *

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

        *
      • *
      • *

        * Contain less than 64 characters. *

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

      *
        *
      • *

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

        *
      • *
      • *

        * Contain less than 64 characters. *

        *
      • * @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. *

        * * @return The type of email sending events to publish to the event destination. * @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. *

        * * @param matchingEventTypes * The type of email sending events to publish to the event destination. * @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. *

        *

        * 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. * @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. *

        * * @param matchingEventTypes * The type of email sending events to publish to the event destination. * @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. *

        * * @param matchingEventTypes * The type of email sending events to publish to the event destination. * @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; } /** * Returns a string representation of this object; useful for testing and debugging. * * @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()); 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; 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()); 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 - 2025 Weber Informatics LLC | Privacy Policy