/* * 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.iotevents.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on * this alarm model. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class NotificationAction implements Serializable, Cloneable, StructuredPojo { /** ** Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function * provided by AWS IoT Events. *
*/ private NotificationTargetActions action; /** ** Contains the configuration information of SMS notifications. *
*/ private java.util.List* Contains the configuration information of email notifications. *
*/ private java.util.List* Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function * provided by AWS IoT Events. *
* * @param action * Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function * provided by AWS IoT Events. */ public void setAction(NotificationTargetActions action) { this.action = action; } /** ** Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function * provided by AWS IoT Events. *
* * @return Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda * function provided by AWS IoT Events. */ public NotificationTargetActions getAction() { return this.action; } /** ** Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function * provided by AWS IoT Events. *
* * @param action * Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function * provided by AWS IoT Events. * @return Returns a reference to this object so that method calls can be chained together. */ public NotificationAction withAction(NotificationTargetActions action) { setAction(action); return this; } /** ** Contains the configuration information of SMS notifications. *
* * @return Contains the configuration information of SMS notifications. */ public java.util.List* Contains the configuration information of SMS notifications. *
* * @param smsConfigurations * Contains the configuration information of SMS notifications. */ public void setSmsConfigurations(java.util.Collection* Contains the configuration information of SMS notifications. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSmsConfigurations(java.util.Collection)} or {@link #withSmsConfigurations(java.util.Collection)} if * you want to override the existing values. *
* * @param smsConfigurations * Contains the configuration information of SMS notifications. * @return Returns a reference to this object so that method calls can be chained together. */ public NotificationAction withSmsConfigurations(SMSConfiguration... smsConfigurations) { if (this.smsConfigurations == null) { setSmsConfigurations(new java.util.ArrayList* Contains the configuration information of SMS notifications. *
* * @param smsConfigurations * Contains the configuration information of SMS notifications. * @return Returns a reference to this object so that method calls can be chained together. */ public NotificationAction withSmsConfigurations(java.util.Collection* Contains the configuration information of email notifications. *
* * @return Contains the configuration information of email notifications. */ public java.util.List* Contains the configuration information of email notifications. *
* * @param emailConfigurations * Contains the configuration information of email notifications. */ public void setEmailConfigurations(java.util.Collection* Contains the configuration information of email notifications. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEmailConfigurations(java.util.Collection)} or {@link #withEmailConfigurations(java.util.Collection)} * if you want to override the existing values. *
* * @param emailConfigurations * Contains the configuration information of email notifications. * @return Returns a reference to this object so that method calls can be chained together. */ public NotificationAction withEmailConfigurations(EmailConfiguration... emailConfigurations) { if (this.emailConfigurations == null) { setEmailConfigurations(new java.util.ArrayList* Contains the configuration information of email notifications. *
* * @param emailConfigurations * Contains the configuration information of email notifications. * @return Returns a reference to this object so that method calls can be chained together. */ public NotificationAction withEmailConfigurations(java.util.Collection