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

com.amazonaws.services.iotevents.model.CreateAlarmModelRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS IoT Events module holds the client classes that are used for communicating with AWS IoT Events Service

The 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.iotevents.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 CreateAlarmModelRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* A unique name that helps you identify the alarm model. You can't change this name after you create the alarm * model. *

*/ private String alarmModelName; /** *

* A description that tells you what the alarm model detects. *

*/ private String alarmModelDescription; /** *

* The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, * see Amazon Resource Names * (ARNs) in the AWS General Reference. *

*/ private String roleArn; /** *

* A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. * For more information, see Tagging your AWS IoT * Events resources in the AWS IoT Events Developer Guide. *

*

* You can create up to 50 tags for one alarm model. *

*/ private java.util.List tags; /** *

* An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this * key to the alarm. *

*/ private String key; /** *

* A non-negative integer that reflects the severity level of the alarm. *

*/ private Integer severity; /** *

* Defines when your alarm is invoked. *

*/ private AlarmRule alarmRule; /** *

* Contains information about one or more notification actions. *

*/ private AlarmNotification alarmNotification; /** *

* Contains information about one or more alarm actions. *

*/ private AlarmEventActions alarmEventActions; /** *

* Contains the configuration information of alarm state changes. *

*/ private AlarmCapabilities alarmCapabilities; /** *

* A unique name that helps you identify the alarm model. You can't change this name after you create the alarm * model. *

* * @param alarmModelName * A unique name that helps you identify the alarm model. You can't change this name after you create the * alarm model. */ public void setAlarmModelName(String alarmModelName) { this.alarmModelName = alarmModelName; } /** *

* A unique name that helps you identify the alarm model. You can't change this name after you create the alarm * model. *

* * @return A unique name that helps you identify the alarm model. You can't change this name after you create the * alarm model. */ public String getAlarmModelName() { return this.alarmModelName; } /** *

* A unique name that helps you identify the alarm model. You can't change this name after you create the alarm * model. *

* * @param alarmModelName * A unique name that helps you identify the alarm model. You can't change this name after you create the * alarm model. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withAlarmModelName(String alarmModelName) { setAlarmModelName(alarmModelName); return this; } /** *

* A description that tells you what the alarm model detects. *

* * @param alarmModelDescription * A description that tells you what the alarm model detects. */ public void setAlarmModelDescription(String alarmModelDescription) { this.alarmModelDescription = alarmModelDescription; } /** *

* A description that tells you what the alarm model detects. *

* * @return A description that tells you what the alarm model detects. */ public String getAlarmModelDescription() { return this.alarmModelDescription; } /** *

* A description that tells you what the alarm model detects. *

* * @param alarmModelDescription * A description that tells you what the alarm model detects. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withAlarmModelDescription(String alarmModelDescription) { setAlarmModelDescription(alarmModelDescription); return this; } /** *

* The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, * see Amazon Resource Names * (ARNs) in the AWS General Reference. *

* * @param roleArn * The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more * information, see Amazon Resource Names * (ARNs) in the AWS General Reference. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, * see Amazon Resource Names * (ARNs) in the AWS General Reference. *

* * @return The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more * information, see Amazon Resource Names * (ARNs) in the AWS General Reference. */ public String getRoleArn() { return this.roleArn; } /** *

* The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, * see Amazon Resource Names * (ARNs) in the AWS General Reference. *

* * @param roleArn * The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more * information, see Amazon Resource Names * (ARNs) in the AWS General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. * For more information, see Tagging your AWS IoT * Events resources in the AWS IoT Events Developer Guide. *

*

* You can create up to 50 tags for one alarm model. *

* * @return A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm * model. For more information, see Tagging your * AWS IoT Events resources in the AWS IoT Events Developer Guide.

*

* You can create up to 50 tags for one alarm model. */ public java.util.List getTags() { return tags; } /** *

* A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. * For more information, see Tagging your AWS IoT * Events resources in the AWS IoT Events Developer Guide. *

*

* You can create up to 50 tags for one alarm model. *

* * @param tags * A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm * model. For more information, see Tagging your AWS * IoT Events resources in the AWS IoT Events Developer Guide.

*

* You can create up to 50 tags for one alarm model. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. * For more information, see Tagging your AWS IoT * Events resources in the AWS IoT Events Developer Guide. *

*

* You can create up to 50 tags for one alarm model. *

*

* 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 * A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm * model. For more information, see Tagging your AWS * IoT Events resources in the AWS IoT Events Developer Guide.

*

* You can create up to 50 tags for one alarm model. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. * For more information, see Tagging your AWS IoT * Events resources in the AWS IoT Events Developer Guide. *

*

* You can create up to 50 tags for one alarm model. *

* * @param tags * A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm * model. For more information, see Tagging your AWS * IoT Events resources in the AWS IoT Events Developer Guide.

*

* You can create up to 50 tags for one alarm model. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this * key to the alarm. *

* * @param key * An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with * this key to the alarm. */ public void setKey(String key) { this.key = key; } /** *

* An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this * key to the alarm. *

* * @return An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated * with this key to the alarm. */ public String getKey() { return this.key; } /** *

* An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this * key to the alarm. *

* * @param key * An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with * this key to the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withKey(String key) { setKey(key); return this; } /** *

* A non-negative integer that reflects the severity level of the alarm. *

* * @param severity * A non-negative integer that reflects the severity level of the alarm. */ public void setSeverity(Integer severity) { this.severity = severity; } /** *

* A non-negative integer that reflects the severity level of the alarm. *

* * @return A non-negative integer that reflects the severity level of the alarm. */ public Integer getSeverity() { return this.severity; } /** *

* A non-negative integer that reflects the severity level of the alarm. *

* * @param severity * A non-negative integer that reflects the severity level of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withSeverity(Integer severity) { setSeverity(severity); return this; } /** *

* Defines when your alarm is invoked. *

* * @param alarmRule * Defines when your alarm is invoked. */ public void setAlarmRule(AlarmRule alarmRule) { this.alarmRule = alarmRule; } /** *

* Defines when your alarm is invoked. *

* * @return Defines when your alarm is invoked. */ public AlarmRule getAlarmRule() { return this.alarmRule; } /** *

* Defines when your alarm is invoked. *

* * @param alarmRule * Defines when your alarm is invoked. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withAlarmRule(AlarmRule alarmRule) { setAlarmRule(alarmRule); return this; } /** *

* Contains information about one or more notification actions. *

* * @param alarmNotification * Contains information about one or more notification actions. */ public void setAlarmNotification(AlarmNotification alarmNotification) { this.alarmNotification = alarmNotification; } /** *

* Contains information about one or more notification actions. *

* * @return Contains information about one or more notification actions. */ public AlarmNotification getAlarmNotification() { return this.alarmNotification; } /** *

* Contains information about one or more notification actions. *

* * @param alarmNotification * Contains information about one or more notification actions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withAlarmNotification(AlarmNotification alarmNotification) { setAlarmNotification(alarmNotification); return this; } /** *

* Contains information about one or more alarm actions. *

* * @param alarmEventActions * Contains information about one or more alarm actions. */ public void setAlarmEventActions(AlarmEventActions alarmEventActions) { this.alarmEventActions = alarmEventActions; } /** *

* Contains information about one or more alarm actions. *

* * @return Contains information about one or more alarm actions. */ public AlarmEventActions getAlarmEventActions() { return this.alarmEventActions; } /** *

* Contains information about one or more alarm actions. *

* * @param alarmEventActions * Contains information about one or more alarm actions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withAlarmEventActions(AlarmEventActions alarmEventActions) { setAlarmEventActions(alarmEventActions); return this; } /** *

* Contains the configuration information of alarm state changes. *

* * @param alarmCapabilities * Contains the configuration information of alarm state changes. */ public void setAlarmCapabilities(AlarmCapabilities alarmCapabilities) { this.alarmCapabilities = alarmCapabilities; } /** *

* Contains the configuration information of alarm state changes. *

* * @return Contains the configuration information of alarm state changes. */ public AlarmCapabilities getAlarmCapabilities() { return this.alarmCapabilities; } /** *

* Contains the configuration information of alarm state changes. *

* * @param alarmCapabilities * Contains the configuration information of alarm state changes. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAlarmModelRequest withAlarmCapabilities(AlarmCapabilities alarmCapabilities) { setAlarmCapabilities(alarmCapabilities); 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 (getAlarmModelName() != null) sb.append("AlarmModelName: ").append(getAlarmModelName()).append(","); if (getAlarmModelDescription() != null) sb.append("AlarmModelDescription: ").append(getAlarmModelDescription()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getKey() != null) sb.append("Key: ").append(getKey()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()).append(","); if (getAlarmRule() != null) sb.append("AlarmRule: ").append(getAlarmRule()).append(","); if (getAlarmNotification() != null) sb.append("AlarmNotification: ").append(getAlarmNotification()).append(","); if (getAlarmEventActions() != null) sb.append("AlarmEventActions: ").append(getAlarmEventActions()).append(","); if (getAlarmCapabilities() != null) sb.append("AlarmCapabilities: ").append(getAlarmCapabilities()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateAlarmModelRequest == false) return false; CreateAlarmModelRequest other = (CreateAlarmModelRequest) obj; if (other.getAlarmModelName() == null ^ this.getAlarmModelName() == null) return false; if (other.getAlarmModelName() != null && other.getAlarmModelName().equals(this.getAlarmModelName()) == false) return false; if (other.getAlarmModelDescription() == null ^ this.getAlarmModelDescription() == null) return false; if (other.getAlarmModelDescription() != null && other.getAlarmModelDescription().equals(this.getAlarmModelDescription()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getKey() == null ^ this.getKey() == null) return false; if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getSeverity() == null ^ this.getSeverity() == null) return false; if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == false) return false; if (other.getAlarmRule() == null ^ this.getAlarmRule() == null) return false; if (other.getAlarmRule() != null && other.getAlarmRule().equals(this.getAlarmRule()) == false) return false; if (other.getAlarmNotification() == null ^ this.getAlarmNotification() == null) return false; if (other.getAlarmNotification() != null && other.getAlarmNotification().equals(this.getAlarmNotification()) == false) return false; if (other.getAlarmEventActions() == null ^ this.getAlarmEventActions() == null) return false; if (other.getAlarmEventActions() != null && other.getAlarmEventActions().equals(this.getAlarmEventActions()) == false) return false; if (other.getAlarmCapabilities() == null ^ this.getAlarmCapabilities() == null) return false; if (other.getAlarmCapabilities() != null && other.getAlarmCapabilities().equals(this.getAlarmCapabilities()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmModelName() == null) ? 0 : getAlarmModelName().hashCode()); hashCode = prime * hashCode + ((getAlarmModelDescription() == null) ? 0 : getAlarmModelDescription().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); hashCode = prime * hashCode + ((getAlarmRule() == null) ? 0 : getAlarmRule().hashCode()); hashCode = prime * hashCode + ((getAlarmNotification() == null) ? 0 : getAlarmNotification().hashCode()); hashCode = prime * hashCode + ((getAlarmEventActions() == null) ? 0 : getAlarmEventActions().hashCode()); hashCode = prime * hashCode + ((getAlarmCapabilities() == null) ? 0 : getAlarmCapabilities().hashCode()); return hashCode; } @Override public CreateAlarmModelRequest clone() { return (CreateAlarmModelRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy