
com.amazonaws.services.costexplorer.model.UpdateAnomalySubscriptionRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-costexplorer Show documentation
/*
* Copyright 2020-2025 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.costexplorer.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 UpdateAnomalySubscriptionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A cost anomaly subscription Amazon Resource Name (ARN).
*
*/
private String subscriptionArn;
/**
*
* (deprecated)
*
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will
* be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*/
@Deprecated
private Double threshold;
/**
*
* The update to the frequency value that subscribers receive notifications.
*
*/
private String frequency;
/**
*
* A list of cost anomaly monitor ARNs.
*
*/
private java.util.List monitorArnList;
/**
*
* The update to the subscriber list.
*
*/
private java.util.List subscribers;
/**
*
* The new name of the subscription.
*
*/
private String subscriptionName;
/**
*
* The update to the Expression
* object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested
* expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE
and
* ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and
* TotalImpactPercentage, respectively (see Impact for more
* details). The supported nested expression types are AND
and OR
. The match option
* GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string
* format.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
*
*/
private Expression thresholdExpression;
/**
*
* A cost anomaly subscription Amazon Resource Name (ARN).
*
*
* @param subscriptionArn
* A cost anomaly subscription Amazon Resource Name (ARN).
*/
public void setSubscriptionArn(String subscriptionArn) {
this.subscriptionArn = subscriptionArn;
}
/**
*
* A cost anomaly subscription Amazon Resource Name (ARN).
*
*
* @return A cost anomaly subscription Amazon Resource Name (ARN).
*/
public String getSubscriptionArn() {
return this.subscriptionArn;
}
/**
*
* A cost anomaly subscription Amazon Resource Name (ARN).
*
*
* @param subscriptionArn
* A cost anomaly subscription Amazon Resource Name (ARN).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withSubscriptionArn(String subscriptionArn) {
setSubscriptionArn(subscriptionArn);
return this;
}
/**
*
* (deprecated)
*
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will
* be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* @param threshold
* (deprecated)
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold
* will be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*/
@Deprecated
public void setThreshold(Double threshold) {
this.threshold = threshold;
}
/**
*
* (deprecated)
*
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will
* be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* @return (deprecated)
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of
* Threshold will be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*/
@Deprecated
public Double getThreshold() {
return this.threshold;
}
/**
*
* (deprecated)
*
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will
* be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* @param threshold
* (deprecated)
*
* The update to the threshold value for receiving notifications.
*
*
* This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold
* will be treated as shorthand syntax for a ThresholdExpression.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public UpdateAnomalySubscriptionRequest withThreshold(Double threshold) {
setThreshold(threshold);
return this;
}
/**
*
* The update to the frequency value that subscribers receive notifications.
*
*
* @param frequency
* The update to the frequency value that subscribers receive notifications.
* @see AnomalySubscriptionFrequency
*/
public void setFrequency(String frequency) {
this.frequency = frequency;
}
/**
*
* The update to the frequency value that subscribers receive notifications.
*
*
* @return The update to the frequency value that subscribers receive notifications.
* @see AnomalySubscriptionFrequency
*/
public String getFrequency() {
return this.frequency;
}
/**
*
* The update to the frequency value that subscribers receive notifications.
*
*
* @param frequency
* The update to the frequency value that subscribers receive notifications.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnomalySubscriptionFrequency
*/
public UpdateAnomalySubscriptionRequest withFrequency(String frequency) {
setFrequency(frequency);
return this;
}
/**
*
* The update to the frequency value that subscribers receive notifications.
*
*
* @param frequency
* The update to the frequency value that subscribers receive notifications.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnomalySubscriptionFrequency
*/
public UpdateAnomalySubscriptionRequest withFrequency(AnomalySubscriptionFrequency frequency) {
this.frequency = frequency.toString();
return this;
}
/**
*
* A list of cost anomaly monitor ARNs.
*
*
* @return A list of cost anomaly monitor ARNs.
*/
public java.util.List getMonitorArnList() {
return monitorArnList;
}
/**
*
* A list of cost anomaly monitor ARNs.
*
*
* @param monitorArnList
* A list of cost anomaly monitor ARNs.
*/
public void setMonitorArnList(java.util.Collection monitorArnList) {
if (monitorArnList == null) {
this.monitorArnList = null;
return;
}
this.monitorArnList = new java.util.ArrayList(monitorArnList);
}
/**
*
* A list of cost anomaly monitor ARNs.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setMonitorArnList(java.util.Collection)} or {@link #withMonitorArnList(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param monitorArnList
* A list of cost anomaly monitor ARNs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withMonitorArnList(String... monitorArnList) {
if (this.monitorArnList == null) {
setMonitorArnList(new java.util.ArrayList(monitorArnList.length));
}
for (String ele : monitorArnList) {
this.monitorArnList.add(ele);
}
return this;
}
/**
*
* A list of cost anomaly monitor ARNs.
*
*
* @param monitorArnList
* A list of cost anomaly monitor ARNs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withMonitorArnList(java.util.Collection monitorArnList) {
setMonitorArnList(monitorArnList);
return this;
}
/**
*
* The update to the subscriber list.
*
*
* @return The update to the subscriber list.
*/
public java.util.List getSubscribers() {
return subscribers;
}
/**
*
* The update to the subscriber list.
*
*
* @param subscribers
* The update to the subscriber list.
*/
public void setSubscribers(java.util.Collection subscribers) {
if (subscribers == null) {
this.subscribers = null;
return;
}
this.subscribers = new java.util.ArrayList(subscribers);
}
/**
*
* The update to the subscriber list.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubscribers(java.util.Collection)} or {@link #withSubscribers(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param subscribers
* The update to the subscriber list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withSubscribers(Subscriber... subscribers) {
if (this.subscribers == null) {
setSubscribers(new java.util.ArrayList(subscribers.length));
}
for (Subscriber ele : subscribers) {
this.subscribers.add(ele);
}
return this;
}
/**
*
* The update to the subscriber list.
*
*
* @param subscribers
* The update to the subscriber list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withSubscribers(java.util.Collection subscribers) {
setSubscribers(subscribers);
return this;
}
/**
*
* The new name of the subscription.
*
*
* @param subscriptionName
* The new name of the subscription.
*/
public void setSubscriptionName(String subscriptionName) {
this.subscriptionName = subscriptionName;
}
/**
*
* The new name of the subscription.
*
*
* @return The new name of the subscription.
*/
public String getSubscriptionName() {
return this.subscriptionName;
}
/**
*
* The new name of the subscription.
*
*
* @param subscriptionName
* The new name of the subscription.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withSubscriptionName(String subscriptionName) {
setSubscriptionName(subscriptionName);
return this;
}
/**
*
* The update to the Expression
* object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested
* expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE
and
* ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and
* TotalImpactPercentage, respectively (see Impact for more
* details). The supported nested expression types are AND
and OR
. The match option
* GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string
* format.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
*
*
* @param thresholdExpression
* The update to the Expression object used to specify the anomalies that you want to generate alerts for. This supports
* dimensions and nested expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE
* and ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and
* TotalImpactPercentage, respectively (see Impact for
* more details). The supported nested expression types are AND
and OR
. The match
* option GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000
* in string format.
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
*/
public void setThresholdExpression(Expression thresholdExpression) {
this.thresholdExpression = thresholdExpression;
}
/**
*
* The update to the Expression
* object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested
* expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE
and
* ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and
* TotalImpactPercentage, respectively (see Impact for more
* details). The supported nested expression types are AND
and OR
. The match option
* GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string
* format.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
*
*
* @return The update to the Expression object used to specify the anomalies that you want to generate alerts for. This supports
* dimensions and nested expressions. The supported dimensions are
* ANOMALY_TOTAL_IMPACT_ABSOLUTE
and ANOMALY_TOTAL_IMPACT_PERCENTAGE
,
* corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for
* more details). The supported nested expression types are AND
and OR
. The match
* option GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and
* 10,000,000,000 in string format.
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
*/
public Expression getThresholdExpression() {
return this.thresholdExpression;
}
/**
*
* The update to the Expression
* object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested
* expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE
and
* ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and
* TotalImpactPercentage, respectively (see Impact for more
* details). The supported nested expression types are AND
and OR
. The match option
* GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string
* format.
*
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
*
*
* @param thresholdExpression
* The update to the Expression object used to specify the anomalies that you want to generate alerts for. This supports
* dimensions and nested expressions. The supported dimensions are ANOMALY_TOTAL_IMPACT_ABSOLUTE
* and ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and
* TotalImpactPercentage, respectively (see Impact for
* more details). The supported nested expression types are AND
and OR
. The match
* option GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000
* in string format.
*
* You can specify either Threshold or ThresholdExpression, but not both.
*
*
* The following are examples of valid ThresholdExpressions:
*
*
* -
*
* Absolute threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* Percentage threshold:
* { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
*
*
* -
*
* AND
two thresholds together:
* { "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* -
*
* OR
two thresholds together:
* { "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAnomalySubscriptionRequest withThresholdExpression(Expression thresholdExpression) {
setThresholdExpression(thresholdExpression);
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 (getSubscriptionArn() != null)
sb.append("SubscriptionArn: ").append(getSubscriptionArn()).append(",");
if (getThreshold() != null)
sb.append("Threshold: ").append(getThreshold()).append(",");
if (getFrequency() != null)
sb.append("Frequency: ").append(getFrequency()).append(",");
if (getMonitorArnList() != null)
sb.append("MonitorArnList: ").append(getMonitorArnList()).append(",");
if (getSubscribers() != null)
sb.append("Subscribers: ").append(getSubscribers()).append(",");
if (getSubscriptionName() != null)
sb.append("SubscriptionName: ").append(getSubscriptionName()).append(",");
if (getThresholdExpression() != null)
sb.append("ThresholdExpression: ").append(getThresholdExpression());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateAnomalySubscriptionRequest == false)
return false;
UpdateAnomalySubscriptionRequest other = (UpdateAnomalySubscriptionRequest) obj;
if (other.getSubscriptionArn() == null ^ this.getSubscriptionArn() == null)
return false;
if (other.getSubscriptionArn() != null && other.getSubscriptionArn().equals(this.getSubscriptionArn()) == false)
return false;
if (other.getThreshold() == null ^ this.getThreshold() == null)
return false;
if (other.getThreshold() != null && other.getThreshold().equals(this.getThreshold()) == false)
return false;
if (other.getFrequency() == null ^ this.getFrequency() == null)
return false;
if (other.getFrequency() != null && other.getFrequency().equals(this.getFrequency()) == false)
return false;
if (other.getMonitorArnList() == null ^ this.getMonitorArnList() == null)
return false;
if (other.getMonitorArnList() != null && other.getMonitorArnList().equals(this.getMonitorArnList()) == false)
return false;
if (other.getSubscribers() == null ^ this.getSubscribers() == null)
return false;
if (other.getSubscribers() != null && other.getSubscribers().equals(this.getSubscribers()) == false)
return false;
if (other.getSubscriptionName() == null ^ this.getSubscriptionName() == null)
return false;
if (other.getSubscriptionName() != null && other.getSubscriptionName().equals(this.getSubscriptionName()) == false)
return false;
if (other.getThresholdExpression() == null ^ this.getThresholdExpression() == null)
return false;
if (other.getThresholdExpression() != null && other.getThresholdExpression().equals(this.getThresholdExpression()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode());
hashCode = prime * hashCode + ((getThreshold() == null) ? 0 : getThreshold().hashCode());
hashCode = prime * hashCode + ((getFrequency() == null) ? 0 : getFrequency().hashCode());
hashCode = prime * hashCode + ((getMonitorArnList() == null) ? 0 : getMonitorArnList().hashCode());
hashCode = prime * hashCode + ((getSubscribers() == null) ? 0 : getSubscribers().hashCode());
hashCode = prime * hashCode + ((getSubscriptionName() == null) ? 0 : getSubscriptionName().hashCode());
hashCode = prime * hashCode + ((getThresholdExpression() == null) ? 0 : getThresholdExpression().hashCode());
return hashCode;
}
@Override
public UpdateAnomalySubscriptionRequest clone() {
return (UpdateAnomalySubscriptionRequest) super.clone();
}
}