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

com.amazonaws.services.cloudwatch.model.CompositeAlarm 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;

/**
 * 

* The details about a composite alarm. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CompositeAlarm implements Serializable, Cloneable { /** *

* Indicates whether actions should be executed during any changes to the alarm state. *

*/ private Boolean actionsEnabled; /** *

* The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). *

*/ private com.amazonaws.internal.SdkInternalList alarmActions; /** *

* The Amazon Resource Name (ARN) of the alarm. *

*/ private String alarmArn; /** *

* The time stamp of the last update to the alarm configuration. *

*/ private java.util.Date alarmConfigurationUpdatedTimestamp; /** *

* The description of the alarm. *

*/ private String alarmDescription; /** *

* The name of the alarm. *

*/ private String alarmName; /** *

* The rule that this alarm uses to evaluate its alarm state. *

*/ private String alarmRule; /** *

* The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each * action is specified as an Amazon Resource Name (ARN). *

*/ private com.amazonaws.internal.SdkInternalList insufficientDataActions; /** *

* The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified * as an Amazon Resource Name (ARN). *

*/ private com.amazonaws.internal.SdkInternalList oKActions; /** *

* An explanation for the alarm state, in text format. *

*/ private String stateReason; /** *

* An explanation for the alarm state, in JSON format. *

*/ private String stateReasonData; /** *

* Tracks the timestamp of any state update, even if StateValue doesn't change. *

*/ private java.util.Date stateUpdatedTimestamp; /** *

* The state value for the alarm. *

*/ private String stateValue; /** *

* The timestamp of the last change to the alarm's StateValue. *

*/ private java.util.Date stateTransitionedTimestamp; /** *

* When the value is ALARM, it means that the actions are suppressed because the suppressor alarm is in * ALARM When the value is WaitPeriod, it means that the actions are suppressed because * the composite alarm is waiting for the suppressor alarm to go into into the ALARM state. The maximum * waiting time is as specified in ActionsSuppressorWaitPeriod. After this time, the composite alarm * performs its actions. When the value is ExtensionPeriod, it means that the actions are suppressed * because the composite alarm is waiting after the suppressor alarm went out of the ALARM state. The * maximum waiting time is as specified in ActionsSuppressorExtensionPeriod. After this time, the * composite alarm performs its actions. *

*/ private String actionsSuppressedBy; /** *

* Captures the reason for action suppression. *

*/ private String actionsSuppressedReason; /** *

* Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm. *

*/ private String actionsSuppressor; /** *

* The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* WaitPeriod is required only when ActionsSuppressor is specified. *

*
*/ private Integer actionsSuppressorWaitPeriod; /** *

* The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

*
*/ private Integer actionsSuppressorExtensionPeriod; /** *

* Indicates whether actions should be executed during any changes to the alarm state. *

* * @param actionsEnabled * Indicates whether actions should be executed during any changes to the alarm state. */ public void setActionsEnabled(Boolean actionsEnabled) { this.actionsEnabled = actionsEnabled; } /** *

* Indicates whether actions should be executed during any changes to the alarm state. *

* * @return Indicates whether actions should be executed during any changes to the alarm state. */ public Boolean getActionsEnabled() { return this.actionsEnabled; } /** *

* Indicates whether actions should be executed during any changes to the alarm state. *

* * @param actionsEnabled * Indicates whether actions should be executed during any changes to the alarm state. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withActionsEnabled(Boolean actionsEnabled) { setActionsEnabled(actionsEnabled); return this; } /** *

* Indicates whether actions should be executed during any changes to the alarm state. *

* * @return Indicates whether actions should be executed during any changes to the alarm state. */ public Boolean isActionsEnabled() { return this.actionsEnabled; } /** *

* The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). *

* * @return The actions to execute when this alarm transitions to the ALARM state from any other state. Each action * is specified as an Amazon Resource Name (ARN). */ public java.util.List getAlarmActions() { if (alarmActions == null) { alarmActions = new com.amazonaws.internal.SdkInternalList(); } return alarmActions; } /** *

* The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). *

* * @param alarmActions * The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). */ public void setAlarmActions(java.util.Collection alarmActions) { if (alarmActions == null) { this.alarmActions = null; return; } this.alarmActions = new com.amazonaws.internal.SdkInternalList(alarmActions); } /** *

* The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAlarmActions(java.util.Collection)} or {@link #withAlarmActions(java.util.Collection)} if you want to * override the existing values. *

* * @param alarmActions * The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withAlarmActions(String... alarmActions) { if (this.alarmActions == null) { setAlarmActions(new com.amazonaws.internal.SdkInternalList(alarmActions.length)); } for (String ele : alarmActions) { this.alarmActions.add(ele); } return this; } /** *

* The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). *

* * @param alarmActions * The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is * specified as an Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withAlarmActions(java.util.Collection alarmActions) { setAlarmActions(alarmActions); return this; } /** *

* The Amazon Resource Name (ARN) of the alarm. *

* * @param alarmArn * The Amazon Resource Name (ARN) of the alarm. */ public void setAlarmArn(String alarmArn) { this.alarmArn = alarmArn; } /** *

* The Amazon Resource Name (ARN) of the alarm. *

* * @return The Amazon Resource Name (ARN) of the alarm. */ public String getAlarmArn() { return this.alarmArn; } /** *

* The Amazon Resource Name (ARN) of the alarm. *

* * @param alarmArn * The Amazon Resource Name (ARN) of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withAlarmArn(String alarmArn) { setAlarmArn(alarmArn); return this; } /** *

* The time stamp of the last update to the alarm configuration. *

* * @param alarmConfigurationUpdatedTimestamp * The time stamp of the last update to the alarm configuration. */ public void setAlarmConfigurationUpdatedTimestamp(java.util.Date alarmConfigurationUpdatedTimestamp) { this.alarmConfigurationUpdatedTimestamp = alarmConfigurationUpdatedTimestamp; } /** *

* The time stamp of the last update to the alarm configuration. *

* * @return The time stamp of the last update to the alarm configuration. */ public java.util.Date getAlarmConfigurationUpdatedTimestamp() { return this.alarmConfigurationUpdatedTimestamp; } /** *

* The time stamp of the last update to the alarm configuration. *

* * @param alarmConfigurationUpdatedTimestamp * The time stamp of the last update to the alarm configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withAlarmConfigurationUpdatedTimestamp(java.util.Date alarmConfigurationUpdatedTimestamp) { setAlarmConfigurationUpdatedTimestamp(alarmConfigurationUpdatedTimestamp); return this; } /** *

* The description of the alarm. *

* * @param alarmDescription * The description of the alarm. */ public void setAlarmDescription(String alarmDescription) { this.alarmDescription = alarmDescription; } /** *

* The description of the alarm. *

* * @return The description of the alarm. */ public String getAlarmDescription() { return this.alarmDescription; } /** *

* The description of the alarm. *

* * @param alarmDescription * The description of the alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withAlarmDescription(String alarmDescription) { setAlarmDescription(alarmDescription); return this; } /** *

* 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 CompositeAlarm withAlarmName(String alarmName) { setAlarmName(alarmName); return this; } /** *

* The rule that this alarm uses to evaluate its alarm state. *

* * @param alarmRule * The rule that this alarm uses to evaluate its alarm state. */ public void setAlarmRule(String alarmRule) { this.alarmRule = alarmRule; } /** *

* The rule that this alarm uses to evaluate its alarm state. *

* * @return The rule that this alarm uses to evaluate its alarm state. */ public String getAlarmRule() { return this.alarmRule; } /** *

* The rule that this alarm uses to evaluate its alarm state. *

* * @param alarmRule * The rule that this alarm uses to evaluate its alarm state. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withAlarmRule(String alarmRule) { setAlarmRule(alarmRule); return this; } /** *

* The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each * action is specified as an Amazon Resource Name (ARN). *

* * @return The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. * Each action is specified as an Amazon Resource Name (ARN). */ public java.util.List getInsufficientDataActions() { if (insufficientDataActions == null) { insufficientDataActions = new com.amazonaws.internal.SdkInternalList(); } return insufficientDataActions; } /** *

* The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each * action is specified as an Amazon Resource Name (ARN). *

* * @param insufficientDataActions * The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. * Each action is specified as an Amazon Resource Name (ARN). */ public void setInsufficientDataActions(java.util.Collection insufficientDataActions) { if (insufficientDataActions == null) { this.insufficientDataActions = null; return; } this.insufficientDataActions = new com.amazonaws.internal.SdkInternalList(insufficientDataActions); } /** *

* The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each * action is specified as an Amazon Resource Name (ARN). *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInsufficientDataActions(java.util.Collection)} or * {@link #withInsufficientDataActions(java.util.Collection)} if you want to override the existing values. *

* * @param insufficientDataActions * The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. * Each action is specified as an Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withInsufficientDataActions(String... insufficientDataActions) { if (this.insufficientDataActions == null) { setInsufficientDataActions(new com.amazonaws.internal.SdkInternalList(insufficientDataActions.length)); } for (String ele : insufficientDataActions) { this.insufficientDataActions.add(ele); } return this; } /** *

* The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each * action is specified as an Amazon Resource Name (ARN). *

* * @param insufficientDataActions * The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. * Each action is specified as an Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withInsufficientDataActions(java.util.Collection insufficientDataActions) { setInsufficientDataActions(insufficientDataActions); return this; } /** *

* The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified * as an Amazon Resource Name (ARN). *

* * @return The actions to execute when this alarm transitions to the OK state from any other state. Each action is * specified as an Amazon Resource Name (ARN). */ public java.util.List getOKActions() { if (oKActions == null) { oKActions = new com.amazonaws.internal.SdkInternalList(); } return oKActions; } /** *

* The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified * as an Amazon Resource Name (ARN). *

* * @param oKActions * The actions to execute when this alarm transitions to the OK state from any other state. Each action is * specified as an Amazon Resource Name (ARN). */ public void setOKActions(java.util.Collection oKActions) { if (oKActions == null) { this.oKActions = null; return; } this.oKActions = new com.amazonaws.internal.SdkInternalList(oKActions); } /** *

* The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified * as an Amazon Resource Name (ARN). *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setOKActions(java.util.Collection)} or {@link #withOKActions(java.util.Collection)} if you want to * override the existing values. *

* * @param oKActions * The actions to execute when this alarm transitions to the OK state from any other state. Each action is * specified as an Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withOKActions(String... oKActions) { if (this.oKActions == null) { setOKActions(new com.amazonaws.internal.SdkInternalList(oKActions.length)); } for (String ele : oKActions) { this.oKActions.add(ele); } return this; } /** *

* The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified * as an Amazon Resource Name (ARN). *

* * @param oKActions * The actions to execute when this alarm transitions to the OK state from any other state. Each action is * specified as an Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withOKActions(java.util.Collection oKActions) { setOKActions(oKActions); return this; } /** *

* An explanation for the alarm state, in text format. *

* * @param stateReason * An explanation for the alarm state, in text format. */ public void setStateReason(String stateReason) { this.stateReason = stateReason; } /** *

* An explanation for the alarm state, in text format. *

* * @return An explanation for the alarm state, in text format. */ public String getStateReason() { return this.stateReason; } /** *

* An explanation for the alarm state, in text format. *

* * @param stateReason * An explanation for the alarm state, in text format. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withStateReason(String stateReason) { setStateReason(stateReason); return this; } /** *

* An explanation for the alarm state, in JSON format. *

* * @param stateReasonData * An explanation for the alarm state, in JSON format. */ public void setStateReasonData(String stateReasonData) { this.stateReasonData = stateReasonData; } /** *

* An explanation for the alarm state, in JSON format. *

* * @return An explanation for the alarm state, in JSON format. */ public String getStateReasonData() { return this.stateReasonData; } /** *

* An explanation for the alarm state, in JSON format. *

* * @param stateReasonData * An explanation for the alarm state, in JSON format. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withStateReasonData(String stateReasonData) { setStateReasonData(stateReasonData); return this; } /** *

* Tracks the timestamp of any state update, even if StateValue doesn't change. *

* * @param stateUpdatedTimestamp * Tracks the timestamp of any state update, even if StateValue doesn't change. */ public void setStateUpdatedTimestamp(java.util.Date stateUpdatedTimestamp) { this.stateUpdatedTimestamp = stateUpdatedTimestamp; } /** *

* Tracks the timestamp of any state update, even if StateValue doesn't change. *

* * @return Tracks the timestamp of any state update, even if StateValue doesn't change. */ public java.util.Date getStateUpdatedTimestamp() { return this.stateUpdatedTimestamp; } /** *

* Tracks the timestamp of any state update, even if StateValue doesn't change. *

* * @param stateUpdatedTimestamp * Tracks the timestamp of any state update, even if StateValue doesn't change. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withStateUpdatedTimestamp(java.util.Date stateUpdatedTimestamp) { setStateUpdatedTimestamp(stateUpdatedTimestamp); return this; } /** *

* The state value for the alarm. *

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

* The state value for the alarm. *

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

* The state value for the alarm. *

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

* The state value for the alarm. *

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

* The timestamp of the last change to the alarm's StateValue. *

* * @param stateTransitionedTimestamp * The timestamp of the last change to the alarm's StateValue. */ public void setStateTransitionedTimestamp(java.util.Date stateTransitionedTimestamp) { this.stateTransitionedTimestamp = stateTransitionedTimestamp; } /** *

* The timestamp of the last change to the alarm's StateValue. *

* * @return The timestamp of the last change to the alarm's StateValue. */ public java.util.Date getStateTransitionedTimestamp() { return this.stateTransitionedTimestamp; } /** *

* The timestamp of the last change to the alarm's StateValue. *

* * @param stateTransitionedTimestamp * The timestamp of the last change to the alarm's StateValue. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withStateTransitionedTimestamp(java.util.Date stateTransitionedTimestamp) { setStateTransitionedTimestamp(stateTransitionedTimestamp); return this; } /** *

* When the value is ALARM, it means that the actions are suppressed because the suppressor alarm is in * ALARM When the value is WaitPeriod, it means that the actions are suppressed because * the composite alarm is waiting for the suppressor alarm to go into into the ALARM state. The maximum * waiting time is as specified in ActionsSuppressorWaitPeriod. After this time, the composite alarm * performs its actions. When the value is ExtensionPeriod, it means that the actions are suppressed * because the composite alarm is waiting after the suppressor alarm went out of the ALARM state. The * maximum waiting time is as specified in ActionsSuppressorExtensionPeriod. After this time, the * composite alarm performs its actions. *

* * @param actionsSuppressedBy * When the value is ALARM, it means that the actions are suppressed because the suppressor * alarm is in ALARM When the value is WaitPeriod, it means that the actions are * suppressed because the composite alarm is waiting for the suppressor alarm to go into into the * ALARM state. The maximum waiting time is as specified in * ActionsSuppressorWaitPeriod. After this time, the composite alarm performs its actions. When * the value is ExtensionPeriod, it means that the actions are suppressed because the composite * alarm is waiting after the suppressor alarm went out of the ALARM state. The maximum waiting * time is as specified in ActionsSuppressorExtensionPeriod. After this time, the composite * alarm performs its actions. * @see ActionsSuppressedBy */ public void setActionsSuppressedBy(String actionsSuppressedBy) { this.actionsSuppressedBy = actionsSuppressedBy; } /** *

* When the value is ALARM, it means that the actions are suppressed because the suppressor alarm is in * ALARM When the value is WaitPeriod, it means that the actions are suppressed because * the composite alarm is waiting for the suppressor alarm to go into into the ALARM state. The maximum * waiting time is as specified in ActionsSuppressorWaitPeriod. After this time, the composite alarm * performs its actions. When the value is ExtensionPeriod, it means that the actions are suppressed * because the composite alarm is waiting after the suppressor alarm went out of the ALARM state. The * maximum waiting time is as specified in ActionsSuppressorExtensionPeriod. After this time, the * composite alarm performs its actions. *

* * @return When the value is ALARM, it means that the actions are suppressed because the suppressor * alarm is in ALARM When the value is WaitPeriod, it means that the actions are * suppressed because the composite alarm is waiting for the suppressor alarm to go into into the * ALARM state. The maximum waiting time is as specified in * ActionsSuppressorWaitPeriod. After this time, the composite alarm performs its actions. When * the value is ExtensionPeriod, it means that the actions are suppressed because the composite * alarm is waiting after the suppressor alarm went out of the ALARM state. The maximum waiting * time is as specified in ActionsSuppressorExtensionPeriod. After this time, the composite * alarm performs its actions. * @see ActionsSuppressedBy */ public String getActionsSuppressedBy() { return this.actionsSuppressedBy; } /** *

* When the value is ALARM, it means that the actions are suppressed because the suppressor alarm is in * ALARM When the value is WaitPeriod, it means that the actions are suppressed because * the composite alarm is waiting for the suppressor alarm to go into into the ALARM state. The maximum * waiting time is as specified in ActionsSuppressorWaitPeriod. After this time, the composite alarm * performs its actions. When the value is ExtensionPeriod, it means that the actions are suppressed * because the composite alarm is waiting after the suppressor alarm went out of the ALARM state. The * maximum waiting time is as specified in ActionsSuppressorExtensionPeriod. After this time, the * composite alarm performs its actions. *

* * @param actionsSuppressedBy * When the value is ALARM, it means that the actions are suppressed because the suppressor * alarm is in ALARM When the value is WaitPeriod, it means that the actions are * suppressed because the composite alarm is waiting for the suppressor alarm to go into into the * ALARM state. The maximum waiting time is as specified in * ActionsSuppressorWaitPeriod. After this time, the composite alarm performs its actions. When * the value is ExtensionPeriod, it means that the actions are suppressed because the composite * alarm is waiting after the suppressor alarm went out of the ALARM state. The maximum waiting * time is as specified in ActionsSuppressorExtensionPeriod. After this time, the composite * alarm performs its actions. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionsSuppressedBy */ public CompositeAlarm withActionsSuppressedBy(String actionsSuppressedBy) { setActionsSuppressedBy(actionsSuppressedBy); return this; } /** *

* When the value is ALARM, it means that the actions are suppressed because the suppressor alarm is in * ALARM When the value is WaitPeriod, it means that the actions are suppressed because * the composite alarm is waiting for the suppressor alarm to go into into the ALARM state. The maximum * waiting time is as specified in ActionsSuppressorWaitPeriod. After this time, the composite alarm * performs its actions. When the value is ExtensionPeriod, it means that the actions are suppressed * because the composite alarm is waiting after the suppressor alarm went out of the ALARM state. The * maximum waiting time is as specified in ActionsSuppressorExtensionPeriod. After this time, the * composite alarm performs its actions. *

* * @param actionsSuppressedBy * When the value is ALARM, it means that the actions are suppressed because the suppressor * alarm is in ALARM When the value is WaitPeriod, it means that the actions are * suppressed because the composite alarm is waiting for the suppressor alarm to go into into the * ALARM state. The maximum waiting time is as specified in * ActionsSuppressorWaitPeriod. After this time, the composite alarm performs its actions. When * the value is ExtensionPeriod, it means that the actions are suppressed because the composite * alarm is waiting after the suppressor alarm went out of the ALARM state. The maximum waiting * time is as specified in ActionsSuppressorExtensionPeriod. After this time, the composite * alarm performs its actions. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionsSuppressedBy */ public CompositeAlarm withActionsSuppressedBy(ActionsSuppressedBy actionsSuppressedBy) { this.actionsSuppressedBy = actionsSuppressedBy.toString(); return this; } /** *

* Captures the reason for action suppression. *

* * @param actionsSuppressedReason * Captures the reason for action suppression. */ public void setActionsSuppressedReason(String actionsSuppressedReason) { this.actionsSuppressedReason = actionsSuppressedReason; } /** *

* Captures the reason for action suppression. *

* * @return Captures the reason for action suppression. */ public String getActionsSuppressedReason() { return this.actionsSuppressedReason; } /** *

* Captures the reason for action suppression. *

* * @param actionsSuppressedReason * Captures the reason for action suppression. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withActionsSuppressedReason(String actionsSuppressedReason) { setActionsSuppressedReason(actionsSuppressedReason); return this; } /** *

* Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm. *

* * @param actionsSuppressor * Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing * alarm. */ public void setActionsSuppressor(String actionsSuppressor) { this.actionsSuppressor = actionsSuppressor; } /** *

* Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm. *

* * @return Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing * alarm. */ public String getActionsSuppressor() { return this.actionsSuppressor; } /** *

* Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm. *

* * @param actionsSuppressor * Actions will be suppressed if the suppressor alarm is in the ALARM state. * ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing * alarm. * @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withActionsSuppressor(String actionsSuppressor) { setActionsSuppressor(actionsSuppressor); return this; } /** *

* The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* WaitPeriod is required only when ActionsSuppressor is specified. *

*
* * @param actionsSuppressorWaitPeriod * The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions.

*

* WaitPeriod is required only when ActionsSuppressor is specified. *

*/ public void setActionsSuppressorWaitPeriod(Integer actionsSuppressorWaitPeriod) { this.actionsSuppressorWaitPeriod = actionsSuppressorWaitPeriod; } /** *

* The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* WaitPeriod is required only when ActionsSuppressor is specified. *

*
* * @return The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions.

*

* WaitPeriod is required only when ActionsSuppressor is specified. *

*/ public Integer getActionsSuppressorWaitPeriod() { return this.actionsSuppressorWaitPeriod; } /** *

* The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* WaitPeriod is required only when ActionsSuppressor is specified. *

*
* * @param actionsSuppressorWaitPeriod * The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the * ALARM state. After this time, the composite alarm performs its actions.

*

* WaitPeriod is required only when ActionsSuppressor is specified. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withActionsSuppressorWaitPeriod(Integer actionsSuppressorWaitPeriod) { setActionsSuppressorWaitPeriod(actionsSuppressorWaitPeriod); return this; } /** *

* The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

*
* * @param actionsSuppressorExtensionPeriod * The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions.

*

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

*/ public void setActionsSuppressorExtensionPeriod(Integer actionsSuppressorExtensionPeriod) { this.actionsSuppressorExtensionPeriod = actionsSuppressorExtensionPeriod; } /** *

* The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

*
* * @return The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions.

*

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

*/ public Integer getActionsSuppressorExtensionPeriod() { return this.actionsSuppressorExtensionPeriod; } /** *

* The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions. *

* *

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

*
* * @param actionsSuppressorExtensionPeriod * The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the * ALARM state. After this time, the composite alarm performs its actions.

*

* ExtensionPeriod is required only when ActionsSuppressor is specified. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CompositeAlarm withActionsSuppressorExtensionPeriod(Integer actionsSuppressorExtensionPeriod) { setActionsSuppressorExtensionPeriod(actionsSuppressorExtensionPeriod); 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 (getActionsEnabled() != null) sb.append("ActionsEnabled: ").append(getActionsEnabled()).append(","); if (getAlarmActions() != null) sb.append("AlarmActions: ").append(getAlarmActions()).append(","); if (getAlarmArn() != null) sb.append("AlarmArn: ").append(getAlarmArn()).append(","); if (getAlarmConfigurationUpdatedTimestamp() != null) sb.append("AlarmConfigurationUpdatedTimestamp: ").append(getAlarmConfigurationUpdatedTimestamp()).append(","); if (getAlarmDescription() != null) sb.append("AlarmDescription: ").append(getAlarmDescription()).append(","); if (getAlarmName() != null) sb.append("AlarmName: ").append(getAlarmName()).append(","); if (getAlarmRule() != null) sb.append("AlarmRule: ").append(getAlarmRule()).append(","); if (getInsufficientDataActions() != null) sb.append("InsufficientDataActions: ").append(getInsufficientDataActions()).append(","); if (getOKActions() != null) sb.append("OKActions: ").append(getOKActions()).append(","); if (getStateReason() != null) sb.append("StateReason: ").append(getStateReason()).append(","); if (getStateReasonData() != null) sb.append("StateReasonData: ").append(getStateReasonData()).append(","); if (getStateUpdatedTimestamp() != null) sb.append("StateUpdatedTimestamp: ").append(getStateUpdatedTimestamp()).append(","); if (getStateValue() != null) sb.append("StateValue: ").append(getStateValue()).append(","); if (getStateTransitionedTimestamp() != null) sb.append("StateTransitionedTimestamp: ").append(getStateTransitionedTimestamp()).append(","); if (getActionsSuppressedBy() != null) sb.append("ActionsSuppressedBy: ").append(getActionsSuppressedBy()).append(","); if (getActionsSuppressedReason() != null) sb.append("ActionsSuppressedReason: ").append(getActionsSuppressedReason()).append(","); if (getActionsSuppressor() != null) sb.append("ActionsSuppressor: ").append(getActionsSuppressor()).append(","); if (getActionsSuppressorWaitPeriod() != null) sb.append("ActionsSuppressorWaitPeriod: ").append(getActionsSuppressorWaitPeriod()).append(","); if (getActionsSuppressorExtensionPeriod() != null) sb.append("ActionsSuppressorExtensionPeriod: ").append(getActionsSuppressorExtensionPeriod()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CompositeAlarm == false) return false; CompositeAlarm other = (CompositeAlarm) obj; if (other.getActionsEnabled() == null ^ this.getActionsEnabled() == null) return false; if (other.getActionsEnabled() != null && other.getActionsEnabled().equals(this.getActionsEnabled()) == false) return false; if (other.getAlarmActions() == null ^ this.getAlarmActions() == null) return false; if (other.getAlarmActions() != null && other.getAlarmActions().equals(this.getAlarmActions()) == false) return false; if (other.getAlarmArn() == null ^ this.getAlarmArn() == null) return false; if (other.getAlarmArn() != null && other.getAlarmArn().equals(this.getAlarmArn()) == false) return false; if (other.getAlarmConfigurationUpdatedTimestamp() == null ^ this.getAlarmConfigurationUpdatedTimestamp() == null) return false; if (other.getAlarmConfigurationUpdatedTimestamp() != null && other.getAlarmConfigurationUpdatedTimestamp().equals(this.getAlarmConfigurationUpdatedTimestamp()) == false) return false; if (other.getAlarmDescription() == null ^ this.getAlarmDescription() == null) return false; if (other.getAlarmDescription() != null && other.getAlarmDescription().equals(this.getAlarmDescription()) == false) return false; if (other.getAlarmName() == null ^ this.getAlarmName() == null) return false; if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == 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.getInsufficientDataActions() == null ^ this.getInsufficientDataActions() == null) return false; if (other.getInsufficientDataActions() != null && other.getInsufficientDataActions().equals(this.getInsufficientDataActions()) == false) return false; if (other.getOKActions() == null ^ this.getOKActions() == null) return false; if (other.getOKActions() != null && other.getOKActions().equals(this.getOKActions()) == 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; if (other.getStateUpdatedTimestamp() == null ^ this.getStateUpdatedTimestamp() == null) return false; if (other.getStateUpdatedTimestamp() != null && other.getStateUpdatedTimestamp().equals(this.getStateUpdatedTimestamp()) == 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.getStateTransitionedTimestamp() == null ^ this.getStateTransitionedTimestamp() == null) return false; if (other.getStateTransitionedTimestamp() != null && other.getStateTransitionedTimestamp().equals(this.getStateTransitionedTimestamp()) == false) return false; if (other.getActionsSuppressedBy() == null ^ this.getActionsSuppressedBy() == null) return false; if (other.getActionsSuppressedBy() != null && other.getActionsSuppressedBy().equals(this.getActionsSuppressedBy()) == false) return false; if (other.getActionsSuppressedReason() == null ^ this.getActionsSuppressedReason() == null) return false; if (other.getActionsSuppressedReason() != null && other.getActionsSuppressedReason().equals(this.getActionsSuppressedReason()) == false) return false; if (other.getActionsSuppressor() == null ^ this.getActionsSuppressor() == null) return false; if (other.getActionsSuppressor() != null && other.getActionsSuppressor().equals(this.getActionsSuppressor()) == false) return false; if (other.getActionsSuppressorWaitPeriod() == null ^ this.getActionsSuppressorWaitPeriod() == null) return false; if (other.getActionsSuppressorWaitPeriod() != null && other.getActionsSuppressorWaitPeriod().equals(this.getActionsSuppressorWaitPeriod()) == false) return false; if (other.getActionsSuppressorExtensionPeriod() == null ^ this.getActionsSuppressorExtensionPeriod() == null) return false; if (other.getActionsSuppressorExtensionPeriod() != null && other.getActionsSuppressorExtensionPeriod().equals(this.getActionsSuppressorExtensionPeriod()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActionsEnabled() == null) ? 0 : getActionsEnabled().hashCode()); hashCode = prime * hashCode + ((getAlarmActions() == null) ? 0 : getAlarmActions().hashCode()); hashCode = prime * hashCode + ((getAlarmArn() == null) ? 0 : getAlarmArn().hashCode()); hashCode = prime * hashCode + ((getAlarmConfigurationUpdatedTimestamp() == null) ? 0 : getAlarmConfigurationUpdatedTimestamp().hashCode()); hashCode = prime * hashCode + ((getAlarmDescription() == null) ? 0 : getAlarmDescription().hashCode()); hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode()); hashCode = prime * hashCode + ((getAlarmRule() == null) ? 0 : getAlarmRule().hashCode()); hashCode = prime * hashCode + ((getInsufficientDataActions() == null) ? 0 : getInsufficientDataActions().hashCode()); hashCode = prime * hashCode + ((getOKActions() == null) ? 0 : getOKActions().hashCode()); hashCode = prime * hashCode + ((getStateReason() == null) ? 0 : getStateReason().hashCode()); hashCode = prime * hashCode + ((getStateReasonData() == null) ? 0 : getStateReasonData().hashCode()); hashCode = prime * hashCode + ((getStateUpdatedTimestamp() == null) ? 0 : getStateUpdatedTimestamp().hashCode()); hashCode = prime * hashCode + ((getStateValue() == null) ? 0 : getStateValue().hashCode()); hashCode = prime * hashCode + ((getStateTransitionedTimestamp() == null) ? 0 : getStateTransitionedTimestamp().hashCode()); hashCode = prime * hashCode + ((getActionsSuppressedBy() == null) ? 0 : getActionsSuppressedBy().hashCode()); hashCode = prime * hashCode + ((getActionsSuppressedReason() == null) ? 0 : getActionsSuppressedReason().hashCode()); hashCode = prime * hashCode + ((getActionsSuppressor() == null) ? 0 : getActionsSuppressor().hashCode()); hashCode = prime * hashCode + ((getActionsSuppressorWaitPeriod() == null) ? 0 : getActionsSuppressorWaitPeriod().hashCode()); hashCode = prime * hashCode + ((getActionsSuppressorExtensionPeriod() == null) ? 0 : getActionsSuppressorExtensionPeriod().hashCode()); return hashCode; } @Override public CompositeAlarm clone() { try { return (CompositeAlarm) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy