/* * 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.redshift.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes event subscriptions. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EventSubscription implements Serializable, Cloneable { /** ** The Amazon Web Services account associated with the Amazon Redshift event notification subscription. *
*/ private String customerAwsId; /** ** The name of the Amazon Redshift event notification subscription. *
*/ private String custSubscriptionId; /** ** The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. *
*/ private String snsTopicArn; /** ** The status of the Amazon Redshift event notification subscription. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon SNS * topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created. *
** The date and time the Amazon Redshift event notification subscription was created. *
*/ private java.util.Date subscriptionCreationTime; /** ** The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. *
*/ private String sourceType; /** ** A list of the sources that publish events to the Amazon Redshift event notification subscription. *
*/ private com.amazonaws.internal.SdkInternalList* The list of Amazon Redshift event categories specified in the event notification subscription. *
** Values: Configuration, Management, Monitoring, Security, Pending *
*/ private com.amazonaws.internal.SdkInternalList* The event severity specified in the Amazon Redshift event notification subscription. *
** Values: ERROR, INFO *
*/ private String severity; /** *
* A boolean value indicating whether the subscription is enabled; true
indicates that the subscription
* is enabled.
*
* The list of tags for the event subscription. *
*/ private com.amazonaws.internal.SdkInternalList* The Amazon Web Services account associated with the Amazon Redshift event notification subscription. *
* * @param customerAwsId * The Amazon Web Services account associated with the Amazon Redshift event notification subscription. */ public void setCustomerAwsId(String customerAwsId) { this.customerAwsId = customerAwsId; } /** ** The Amazon Web Services account associated with the Amazon Redshift event notification subscription. *
* * @return The Amazon Web Services account associated with the Amazon Redshift event notification subscription. */ public String getCustomerAwsId() { return this.customerAwsId; } /** ** The Amazon Web Services account associated with the Amazon Redshift event notification subscription. *
* * @param customerAwsId * The Amazon Web Services account associated with the Amazon Redshift event notification subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withCustomerAwsId(String customerAwsId) { setCustomerAwsId(customerAwsId); return this; } /** ** The name of the Amazon Redshift event notification subscription. *
* * @param custSubscriptionId * The name of the Amazon Redshift event notification subscription. */ public void setCustSubscriptionId(String custSubscriptionId) { this.custSubscriptionId = custSubscriptionId; } /** ** The name of the Amazon Redshift event notification subscription. *
* * @return The name of the Amazon Redshift event notification subscription. */ public String getCustSubscriptionId() { return this.custSubscriptionId; } /** ** The name of the Amazon Redshift event notification subscription. *
* * @param custSubscriptionId * The name of the Amazon Redshift event notification subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withCustSubscriptionId(String custSubscriptionId) { setCustSubscriptionId(custSubscriptionId); return this; } /** ** The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. *
* * @param snsTopicArn * The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. */ public void setSnsTopicArn(String snsTopicArn) { this.snsTopicArn = snsTopicArn; } /** ** The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. *
* * @return The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. */ public String getSnsTopicArn() { return this.snsTopicArn; } /** ** The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. *
* * @param snsTopicArn * The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event notification subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withSnsTopicArn(String snsTopicArn) { setSnsTopicArn(snsTopicArn); return this; } /** ** The status of the Amazon Redshift event notification subscription. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon SNS * topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was * created. *
** The status of the Amazon Redshift event notification subscription. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon SNS * topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was * created. *
** The status of the Amazon Redshift event notification subscription. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon SNS * topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created. *
** Constraints: *
** Can be one of the following: active | no-permission | topic-not-exist *
** The status "no-permission" indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was * created. *
** The date and time the Amazon Redshift event notification subscription was created. *
* * @param subscriptionCreationTime * The date and time the Amazon Redshift event notification subscription was created. */ public void setSubscriptionCreationTime(java.util.Date subscriptionCreationTime) { this.subscriptionCreationTime = subscriptionCreationTime; } /** ** The date and time the Amazon Redshift event notification subscription was created. *
* * @return The date and time the Amazon Redshift event notification subscription was created. */ public java.util.Date getSubscriptionCreationTime() { return this.subscriptionCreationTime; } /** ** The date and time the Amazon Redshift event notification subscription was created. *
* * @param subscriptionCreationTime * The date and time the Amazon Redshift event notification subscription was created. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withSubscriptionCreationTime(java.util.Date subscriptionCreationTime) { setSubscriptionCreationTime(subscriptionCreationTime); return this; } /** ** The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. *
* * @param sourceType * The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. */ public void setSourceType(String sourceType) { this.sourceType = sourceType; } /** ** The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. *
* * @return The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. */ public String getSourceType() { return this.sourceType; } /** ** The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. *
* * @param sourceType * The source type of the events returned by the Amazon Redshift event notification, such as cluster, * cluster-snapshot, cluster-parameter-group, cluster-security-group, or scheduled-action. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withSourceType(String sourceType) { setSourceType(sourceType); return this; } /** ** A list of the sources that publish events to the Amazon Redshift event notification subscription. *
* * @return A list of the sources that publish events to the Amazon Redshift event notification subscription. */ public java.util.List* A list of the sources that publish events to the Amazon Redshift event notification subscription. *
* * @param sourceIdsList * A list of the sources that publish events to the Amazon Redshift event notification subscription. */ public void setSourceIdsList(java.util.Collection* A list of the sources that publish events to the Amazon Redshift event notification subscription. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourceIdsList(java.util.Collection)} or {@link #withSourceIdsList(java.util.Collection)} if you want * to override the existing values. *
* * @param sourceIdsList * A list of the sources that publish events to the Amazon Redshift event notification subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withSourceIdsList(String... sourceIdsList) { if (this.sourceIdsList == null) { setSourceIdsList(new com.amazonaws.internal.SdkInternalList* A list of the sources that publish events to the Amazon Redshift event notification subscription. *
* * @param sourceIdsList * A list of the sources that publish events to the Amazon Redshift event notification subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withSourceIdsList(java.util.Collection* The list of Amazon Redshift event categories specified in the event notification subscription. *
** Values: Configuration, Management, Monitoring, Security, Pending *
* * @return The list of Amazon Redshift event categories specified in the event notification subscription. *
* Values: Configuration, Management, Monitoring, Security, Pending
*/
public java.util.List
* The list of Amazon Redshift event categories specified in the event notification subscription.
*
* Values: Configuration, Management, Monitoring, Security, Pending
*
* Values: Configuration, Management, Monitoring, Security, Pending
*/
public void setEventCategoriesList(java.util.Collection
* The list of Amazon Redshift event categories specified in the event notification subscription.
*
* Values: Configuration, Management, Monitoring, Security, Pending
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEventCategoriesList(java.util.Collection)} or {@link #withEventCategoriesList(java.util.Collection)}
* if you want to override the existing values.
*
* Values: Configuration, Management, Monitoring, Security, Pending
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventSubscription withEventCategoriesList(String... eventCategoriesList) {
if (this.eventCategoriesList == null) {
setEventCategoriesList(new com.amazonaws.internal.SdkInternalList
* The list of Amazon Redshift event categories specified in the event notification subscription.
*
* Values: Configuration, Management, Monitoring, Security, Pending
*
* Values: Configuration, Management, Monitoring, Security, Pending
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventSubscription withEventCategoriesList(java.util.Collection
* The event severity specified in the Amazon Redshift event notification subscription.
*
* Values: ERROR, INFO
*
* Values: ERROR, INFO */ public void setSeverity(String severity) { this.severity = severity; } /** *
* The event severity specified in the Amazon Redshift event notification subscription. *
** Values: ERROR, INFO *
* * @return The event severity specified in the Amazon Redshift event notification subscription. ** Values: ERROR, INFO */ public String getSeverity() { return this.severity; } /** *
* The event severity specified in the Amazon Redshift event notification subscription. *
** Values: ERROR, INFO *
* * @param severity * The event severity specified in the Amazon Redshift event notification subscription. ** Values: ERROR, INFO * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withSeverity(String severity) { setSeverity(severity); return this; } /** *
* A boolean value indicating whether the subscription is enabled; true
indicates that the subscription
* is enabled.
*
true
indicates that the
* subscription is enabled.
*/
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
*
* A boolean value indicating whether the subscription is enabled; true
indicates that the subscription
* is enabled.
*
true
indicates that the
* subscription is enabled.
*/
public Boolean getEnabled() {
return this.enabled;
}
/**
*
* A boolean value indicating whether the subscription is enabled; true
indicates that the subscription
* is enabled.
*
true
indicates that the
* subscription is enabled.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventSubscription withEnabled(Boolean enabled) {
setEnabled(enabled);
return this;
}
/**
*
* A boolean value indicating whether the subscription is enabled; true
indicates that the subscription
* is enabled.
*
true
indicates that the
* subscription is enabled.
*/
public Boolean isEnabled() {
return this.enabled;
}
/**
* * The list of tags for the event subscription. *
* * @return The list of tags for the event subscription. */ public java.util.List* The list of tags for the event subscription. *
* * @param tags * The list of tags for the event subscription. */ public void setTags(java.util.Collection* The list of tags for the event subscription. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The list of tags for the event subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The list of tags for the event subscription. *
* * @param tags * The list of tags for the event subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EventSubscription withTags(java.util.Collection