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

com.amazonaws.services.cloudwatch.model.SetAlarmStateRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show 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.cloudwatch.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 SetAlarmStateRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the alarm. *

*/ private String alarmName; /** *

* The value of the state. *

*/ private String stateValue; /** *

* The reason that this alarm is set to this specific state, in text format. *

*/ private String stateReason; /** *

* The reason that this alarm is set to this specific state, in JSON format. *

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto Scaling * alarm actions, the Auto Scaling policy uses the information in this field to take the correct action. *

*/ private String stateReasonData; /** *

* The name of the alarm. *

* * @param alarmName * The name of the alarm. */ public void setAlarmName(String alarmName) { this.alarmName = alarmName; } /** *

* The name of the alarm. *

* * @return The name of the alarm. */ public String getAlarmName() { return this.alarmName; } /** *

* The name of the alarm. *

* * @param alarmName * The name of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public SetAlarmStateRequest withAlarmName(String alarmName) { setAlarmName(alarmName); return this; } /** *

* The value of the state. *

* * @param stateValue * The value of the state. * @see StateValue */ public void setStateValue(String stateValue) { this.stateValue = stateValue; } /** *

* The value of the state. *

* * @return The value of the state. * @see StateValue */ public String getStateValue() { return this.stateValue; } /** *

* The value of the state. *

* * @param stateValue * The value of the state. * @return Returns a reference to this object so that method calls can be chained together. * @see StateValue */ public SetAlarmStateRequest withStateValue(String stateValue) { setStateValue(stateValue); return this; } /** *

* The value of the state. *

* * @param stateValue * The value of the state. * @see StateValue */ public void setStateValue(StateValue stateValue) { withStateValue(stateValue); } /** *

* The value of the state. *

* * @param stateValue * The value of the state. * @return Returns a reference to this object so that method calls can be chained together. * @see StateValue */ public SetAlarmStateRequest withStateValue(StateValue stateValue) { this.stateValue = stateValue.toString(); return this; } /** *

* The reason that this alarm is set to this specific state, in text format. *

* * @param stateReason * The reason that this alarm is set to this specific state, in text format. */ public void setStateReason(String stateReason) { this.stateReason = stateReason; } /** *

* The reason that this alarm is set to this specific state, in text format. *

* * @return The reason that this alarm is set to this specific state, in text format. */ public String getStateReason() { return this.stateReason; } /** *

* The reason that this alarm is set to this specific state, in text format. *

* * @param stateReason * The reason that this alarm is set to this specific state, in text format. * @return Returns a reference to this object so that method calls can be chained together. */ public SetAlarmStateRequest withStateReason(String stateReason) { setStateReason(stateReason); return this; } /** *

* The reason that this alarm is set to this specific state, in JSON format. *

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto Scaling * alarm actions, the Auto Scaling policy uses the information in this field to take the correct action. *

* * @param stateReasonData * The reason that this alarm is set to this specific state, in JSON format.

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto * Scaling alarm actions, the Auto Scaling policy uses the information in this field to take the correct * action. */ public void setStateReasonData(String stateReasonData) { this.stateReasonData = stateReasonData; } /** *

* The reason that this alarm is set to this specific state, in JSON format. *

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto Scaling * alarm actions, the Auto Scaling policy uses the information in this field to take the correct action. *

* * @return The reason that this alarm is set to this specific state, in JSON format.

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto * Scaling alarm actions, the Auto Scaling policy uses the information in this field to take the correct * action. */ public String getStateReasonData() { return this.stateReasonData; } /** *

* The reason that this alarm is set to this specific state, in JSON format. *

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto Scaling * alarm actions, the Auto Scaling policy uses the information in this field to take the correct action. *

* * @param stateReasonData * The reason that this alarm is set to this specific state, in JSON format.

*

* For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto * Scaling alarm actions, the Auto Scaling policy uses the information in this field to take the correct * action. * @return Returns a reference to this object so that method calls can be chained together. */ public SetAlarmStateRequest withStateReasonData(String stateReasonData) { setStateReasonData(stateReasonData); 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 (getAlarmName() != null) sb.append("AlarmName: ").append(getAlarmName()).append(","); if (getStateValue() != null) sb.append("StateValue: ").append(getStateValue()).append(","); if (getStateReason() != null) sb.append("StateReason: ").append(getStateReason()).append(","); if (getStateReasonData() != null) sb.append("StateReasonData: ").append(getStateReasonData()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SetAlarmStateRequest == false) return false; SetAlarmStateRequest other = (SetAlarmStateRequest) obj; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false) return false; if (other.getStateValue() == null ^ this.getStateValue() == null) return false; if (other.getStateValue() != null && other.getStateValue().equals(this.getStateValue()) == false) return false; if (other.getStateReason() == null ^ this.getStateReason() == null) return false; if (other.getStateReason() != null && other.getStateReason().equals(this.getStateReason()) == false) return false; if (other.getStateReasonData() == null ^ this.getStateReasonData() == null) return false; if (other.getStateReasonData() != null && other.getStateReasonData().equals(this.getStateReasonData()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getStateValue() == null) ? 0 : getStateValue().hashCode()); hashCode = prime * hashCode + ((getStateReason() == null) ? 0 : getStateReason().hashCode()); hashCode = prime * hashCode + ((getStateReasonData() == null) ? 0 : getStateReasonData().hashCode()); return hashCode; } @Override public SetAlarmStateRequest clone() { return (SetAlarmStateRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy