/* * Copyright 2018-2023 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.pinpointsmsvoicev2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateEventDestinationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action. *
*/ private String configurationSetName; /** ** The name that identifies the event destination. *
*/ private String eventDestinationName; /** ** An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every * event type. *
*/ private java.util.List* An object that contains information about an event destination for logging to Amazon CloudWatch logs. *
*/ private CloudWatchLogsDestination cloudWatchLogsDestination; /** ** An object that contains information about an event destination for logging to Amazon Kinesis Data Firehose. *
*/ private KinesisFirehoseDestination kinesisFirehoseDestination; /** ** An object that contains information about an event destination for logging to Amazon SNS. *
*/ private SnsDestination snsDestination; /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
*/ private String clientToken; /** ** Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action. *
* * @param configurationSetName * Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action. */ public void setConfigurationSetName(String configurationSetName) { this.configurationSetName = configurationSetName; } /** ** Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action. *
* * @return Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets * action. */ public String getConfigurationSetName() { return this.configurationSetName; } /** ** Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action. *
* * @param configurationSetName * Either the name of the configuration set or the configuration set ARN to apply event logging to. The * ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventDestinationRequest withConfigurationSetName(String configurationSetName) { setConfigurationSetName(configurationSetName); return this; } /** ** The name that identifies the event destination. *
* * @param eventDestinationName * The name that identifies the event destination. */ public void setEventDestinationName(String eventDestinationName) { this.eventDestinationName = eventDestinationName; } /** ** The name that identifies the event destination. *
* * @return The name that identifies the event destination. */ public String getEventDestinationName() { return this.eventDestinationName; } /** ** The name that identifies the event destination. *
* * @param eventDestinationName * The name that identifies the event destination. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventDestinationRequest withEventDestinationName(String eventDestinationName) { setEventDestinationName(eventDestinationName); return this; } /** ** An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every * event type. *
* * @return An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs * every event type. * @see EventType */ public java.util.List* An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every * event type. *
* * @param matchingEventTypes * An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs * every event type. * @see EventType */ public void setMatchingEventTypes(java.util.Collection* An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every * event type. *
** 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 * An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs * every event type. * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public CreateEventDestinationRequest withMatchingEventTypes(String... matchingEventTypes) { if (this.matchingEventTypes == null) { setMatchingEventTypes(new java.util.ArrayList* An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every * event type. *
* * @param matchingEventTypes * An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs * every event type. * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public CreateEventDestinationRequest withMatchingEventTypes(java.util.Collection* An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs every * event type. *
* * @param matchingEventTypes * An array of event types that determine which events to log. If "ALL" is used, then Amazon Pinpoint logs * every event type. * @return Returns a reference to this object so that method calls can be chained together. * @see EventType */ public CreateEventDestinationRequest withMatchingEventTypes(EventType... matchingEventTypes) { java.util.ArrayList* An object that contains information about an event destination for logging to Amazon CloudWatch logs. *
* * @param cloudWatchLogsDestination * An object that contains information about an event destination for logging to Amazon CloudWatch logs. */ public void setCloudWatchLogsDestination(CloudWatchLogsDestination cloudWatchLogsDestination) { this.cloudWatchLogsDestination = cloudWatchLogsDestination; } /** ** An object that contains information about an event destination for logging to Amazon CloudWatch logs. *
* * @return An object that contains information about an event destination for logging to Amazon CloudWatch logs. */ public CloudWatchLogsDestination getCloudWatchLogsDestination() { return this.cloudWatchLogsDestination; } /** ** An object that contains information about an event destination for logging to Amazon CloudWatch logs. *
* * @param cloudWatchLogsDestination * An object that contains information about an event destination for logging to Amazon CloudWatch logs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventDestinationRequest withCloudWatchLogsDestination(CloudWatchLogsDestination cloudWatchLogsDestination) { setCloudWatchLogsDestination(cloudWatchLogsDestination); return this; } /** ** An object that contains information about an event destination for logging to Amazon Kinesis Data Firehose. *
* * @param kinesisFirehoseDestination * An object that contains information about an event destination for logging to Amazon Kinesis Data * Firehose. */ public void setKinesisFirehoseDestination(KinesisFirehoseDestination kinesisFirehoseDestination) { this.kinesisFirehoseDestination = kinesisFirehoseDestination; } /** ** An object that contains information about an event destination for logging to Amazon Kinesis Data Firehose. *
* * @return An object that contains information about an event destination for logging to Amazon Kinesis Data * Firehose. */ public KinesisFirehoseDestination getKinesisFirehoseDestination() { return this.kinesisFirehoseDestination; } /** ** An object that contains information about an event destination for logging to Amazon Kinesis Data Firehose. *
* * @param kinesisFirehoseDestination * An object that contains information about an event destination for logging to Amazon Kinesis Data * Firehose. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventDestinationRequest withKinesisFirehoseDestination(KinesisFirehoseDestination kinesisFirehoseDestination) { setKinesisFirehoseDestination(kinesisFirehoseDestination); return this; } /** ** An object that contains information about an event destination for logging to Amazon SNS. *
* * @param snsDestination * An object that contains information about an event destination for logging to Amazon SNS. */ public void setSnsDestination(SnsDestination snsDestination) { this.snsDestination = snsDestination; } /** ** An object that contains information about an event destination for logging to Amazon SNS. *
* * @return An object that contains information about an event destination for logging to Amazon SNS. */ public SnsDestination getSnsDestination() { return this.snsDestination; } /** ** An object that contains information about an event destination for logging to Amazon SNS. *
* * @param snsDestination * An object that contains information about an event destination for logging to Amazon SNS. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventDestinationRequest withSnsDestination(SnsDestination snsDestination) { setSnsDestination(snsDestination); return this; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't * specify a client token, a randomly generated token is used for the request to ensure idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't * specify a client token, a randomly generated token is used for the request to ensure idempotency. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't * specify a client token, a randomly generated token is used for the request to ensure idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateEventDestinationRequest withClientToken(String clientToken) { setClientToken(clientToken); 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 (getConfigurationSetName() != null) sb.append("ConfigurationSetName: ").append(getConfigurationSetName()).append(","); if (getEventDestinationName() != null) sb.append("EventDestinationName: ").append(getEventDestinationName()).append(","); if (getMatchingEventTypes() != null) sb.append("MatchingEventTypes: ").append(getMatchingEventTypes()).append(","); if (getCloudWatchLogsDestination() != null) sb.append("CloudWatchLogsDestination: ").append(getCloudWatchLogsDestination()).append(","); if (getKinesisFirehoseDestination() != null) sb.append("KinesisFirehoseDestination: ").append(getKinesisFirehoseDestination()).append(","); if (getSnsDestination() != null) sb.append("SnsDestination: ").append(getSnsDestination()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateEventDestinationRequest == false) return false; CreateEventDestinationRequest other = (CreateEventDestinationRequest) obj; if (other.getConfigurationSetName() == null ^ this.getConfigurationSetName() == null) return false; if (other.getConfigurationSetName() != null && other.getConfigurationSetName().equals(this.getConfigurationSetName()) == false) return false; if (other.getEventDestinationName() == null ^ this.getEventDestinationName() == null) return false; if (other.getEventDestinationName() != null && other.getEventDestinationName().equals(this.getEventDestinationName()) == 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.getCloudWatchLogsDestination() == null ^ this.getCloudWatchLogsDestination() == null) return false; if (other.getCloudWatchLogsDestination() != null && other.getCloudWatchLogsDestination().equals(this.getCloudWatchLogsDestination()) == 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.getSnsDestination() == null ^ this.getSnsDestination() == null) return false; if (other.getSnsDestination() != null && other.getSnsDestination().equals(this.getSnsDestination()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConfigurationSetName() == null) ? 0 : getConfigurationSetName().hashCode()); hashCode = prime * hashCode + ((getEventDestinationName() == null) ? 0 : getEventDestinationName().hashCode()); hashCode = prime * hashCode + ((getMatchingEventTypes() == null) ? 0 : getMatchingEventTypes().hashCode()); hashCode = prime * hashCode + ((getCloudWatchLogsDestination() == null) ? 0 : getCloudWatchLogsDestination().hashCode()); hashCode = prime * hashCode + ((getKinesisFirehoseDestination() == null) ? 0 : getKinesisFirehoseDestination().hashCode()); hashCode = prime * hashCode + ((getSnsDestination() == null) ? 0 : getSnsDestination().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); return hashCode; } @Override public CreateEventDestinationRequest clone() { return (CreateEventDestinationRequest) super.clone(); } }