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

com.amazonaws.services.arczonalshift.model.ControlCondition Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS ARC - Zonal Shift module holds the client classes that are used for communicating with AWS ARC - Zonal Shift 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.arczonalshift.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A control condition is an alarm that you specify for a practice run. When you configure practice runs with zonal * autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch to use with the * practice run. The alarms that you specify are an outcome alarm, to monitor application health during practice * runs and, optionally, a blocking alarm, to block practice runs from starting or to interrupt a practice run in * progress. *

*

* Control condition alarms do not apply for autoshifts. *

*

* For more information, see Considerations when * you configure zonal autoshift in the Amazon Route 53 Application Recovery Controller Developer Guide. *

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

* The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a * practice run. *

*/ private String alarmIdentifier; /** *

* The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, * so the only valid value is CLOUDWATCH. *

*/ private String type; /** *

* The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a * practice run. *

* * @param alarmIdentifier * The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for * a practice run. */ public void setAlarmIdentifier(String alarmIdentifier) { this.alarmIdentifier = alarmIdentifier; } /** *

* The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a * practice run. *

* * @return The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for * a practice run. */ public String getAlarmIdentifier() { return this.alarmIdentifier; } /** *

* The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a * practice run. *

* * @param alarmIdentifier * The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for * a practice run. * @return Returns a reference to this object so that method calls can be chained together. */ public ControlCondition withAlarmIdentifier(String alarmIdentifier) { setAlarmIdentifier(alarmIdentifier); return this; } /** *

* The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, * so the only valid value is CLOUDWATCH. *

* * @param type * The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice * runs, so the only valid value is CLOUDWATCH. * @see ControlConditionType */ public void setType(String type) { this.type = type; } /** *

* The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, * so the only valid value is CLOUDWATCH. *

* * @return The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for * practice runs, so the only valid value is CLOUDWATCH. * @see ControlConditionType */ public String getType() { return this.type; } /** *

* The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, * so the only valid value is CLOUDWATCH. *

* * @param type * The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice * runs, so the only valid value is CLOUDWATCH. * @return Returns a reference to this object so that method calls can be chained together. * @see ControlConditionType */ public ControlCondition withType(String type) { setType(type); return this; } /** *

* The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, * so the only valid value is CLOUDWATCH. *

* * @param type * The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice * runs, so the only valid value is CLOUDWATCH. * @return Returns a reference to this object so that method calls can be chained together. * @see ControlConditionType */ public ControlCondition withType(ControlConditionType type) { this.type = type.toString(); 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 (getAlarmIdentifier() != null) sb.append("AlarmIdentifier: ").append(getAlarmIdentifier()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ControlCondition == false) return false; ControlCondition other = (ControlCondition) obj; if (other.getAlarmIdentifier() == null ^ this.getAlarmIdentifier() == null) return false; if (other.getAlarmIdentifier() != null && other.getAlarmIdentifier().equals(this.getAlarmIdentifier()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAlarmIdentifier() == null) ? 0 : getAlarmIdentifier().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public ControlCondition clone() { try { return (ControlCondition) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.arczonalshift.model.transform.ControlConditionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy