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

com.amazonaws.services.applicationautoscaling.model.TargetTrackingMetricDataQuery Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Application Auto Scaling module holds the client classes that are used for communicating with AWS Application Auto Scaling service.

There is a newer version: 1.12.780
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.applicationautoscaling.model;

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

/**
 * 

* The metric data to return. Also defines whether this call is returning data for one metric only, or whether it is * performing a math expression on the values of returned metric statistics to create a new time series. A time series * is a series of data points, each of which is associated with a timestamp. *

*

* For more information and examples, see Create a target tracking scaling policy for Application Auto Scaling using metric math in the Application * Auto Scaling User Guide. *

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

* The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use the * Id of other expressions to use the result of those expressions. *

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. *

*/ private String expression; /** *

* A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the mathematical * expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase * letter. *

*/ private String id; /** *

* A human-readable label for this metric or expression. This is especially useful if this is a math expression, so * that you know what the value represents. *

*/ private String label; /** *

* Information about the metric data to return. *

*

* Conditional: Within each MetricDataQuery object, you must specify either Expression or * MetricStat, but not both. *

*/ private TargetTrackingMetricStat metricStat; /** *

* Indicates whether to return the timestamps and raw data values of this metric. *

*

* If you use any math expressions, specify true for this value for only the final math expression that * the metric specification is based on. You must specify false for ReturnData for all the * other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). *

*/ private Boolean returnData; /** *

* The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use the * Id of other expressions to use the result of those expressions. *

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. *

* * @param expression * The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use * the Id of other expressions to use the result of those expressions.

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. */ public void setExpression(String expression) { this.expression = expression; } /** *

* The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use the * Id of other expressions to use the result of those expressions. *

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. *

* * @return The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use * the Id of other expressions to use the result of those expressions.

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. */ public String getExpression() { return this.expression; } /** *

* The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use the * Id of other expressions to use the result of those expressions. *

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. *

* * @param expression * The math expression to perform on the returned data, if this object is performing a math expression. This * expression can use the Id of the other metrics to refer to those metrics, and can also use * the Id of other expressions to use the result of those expressions.

*

* Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either * Expression or MetricStat, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingMetricDataQuery withExpression(String expression) { setExpression(expression); return this; } /** *

* A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the mathematical * expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase * letter. *

* * @param id * A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the * mathematical expression. The valid characters are letters, numbers, and underscores. The first character * must be a lowercase letter. */ public void setId(String id) { this.id = id; } /** *

* A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the mathematical * expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase * letter. *

* * @return A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the * mathematical expression. The valid characters are letters, numbers, and underscores. The first character * must be a lowercase letter. */ public String getId() { return this.id; } /** *

* A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the mathematical * expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase * letter. *

* * @param id * A short name that identifies the object's results in the response. This name must be unique among all * MetricDataQuery objects specified for a single scaling policy. If you are performing math * expressions on this set of data, this name represents that data and can serve as a variable in the * mathematical expression. The valid characters are letters, numbers, and underscores. The first character * must be a lowercase letter. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingMetricDataQuery withId(String id) { setId(id); return this; } /** *

* A human-readable label for this metric or expression. This is especially useful if this is a math expression, so * that you know what the value represents. *

* * @param label * A human-readable label for this metric or expression. This is especially useful if this is a math * expression, so that you know what the value represents. */ public void setLabel(String label) { this.label = label; } /** *

* A human-readable label for this metric or expression. This is especially useful if this is a math expression, so * that you know what the value represents. *

* * @return A human-readable label for this metric or expression. This is especially useful if this is a math * expression, so that you know what the value represents. */ public String getLabel() { return this.label; } /** *

* A human-readable label for this metric or expression. This is especially useful if this is a math expression, so * that you know what the value represents. *

* * @param label * A human-readable label for this metric or expression. This is especially useful if this is a math * expression, so that you know what the value represents. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingMetricDataQuery withLabel(String label) { setLabel(label); return this; } /** *

* Information about the metric data to return. *

*

* Conditional: Within each MetricDataQuery object, you must specify either Expression or * MetricStat, but not both. *

* * @param metricStat * Information about the metric data to return.

*

* Conditional: Within each MetricDataQuery object, you must specify either * Expression or MetricStat, but not both. */ public void setMetricStat(TargetTrackingMetricStat metricStat) { this.metricStat = metricStat; } /** *

* Information about the metric data to return. *

*

* Conditional: Within each MetricDataQuery object, you must specify either Expression or * MetricStat, but not both. *

* * @return Information about the metric data to return.

*

* Conditional: Within each MetricDataQuery object, you must specify either * Expression or MetricStat, but not both. */ public TargetTrackingMetricStat getMetricStat() { return this.metricStat; } /** *

* Information about the metric data to return. *

*

* Conditional: Within each MetricDataQuery object, you must specify either Expression or * MetricStat, but not both. *

* * @param metricStat * Information about the metric data to return.

*

* Conditional: Within each MetricDataQuery object, you must specify either * Expression or MetricStat, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingMetricDataQuery withMetricStat(TargetTrackingMetricStat metricStat) { setMetricStat(metricStat); return this; } /** *

* Indicates whether to return the timestamps and raw data values of this metric. *

*

* If you use any math expressions, specify true for this value for only the final math expression that * the metric specification is based on. You must specify false for ReturnData for all the * other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). *

* * @param returnData * Indicates whether to return the timestamps and raw data values of this metric.

*

* If you use any math expressions, specify true for this value for only the final math * expression that the metric specification is based on. You must specify false for * ReturnData for all the other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). */ public void setReturnData(Boolean returnData) { this.returnData = returnData; } /** *

* Indicates whether to return the timestamps and raw data values of this metric. *

*

* If you use any math expressions, specify true for this value for only the final math expression that * the metric specification is based on. You must specify false for ReturnData for all the * other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). *

* * @return Indicates whether to return the timestamps and raw data values of this metric.

*

* If you use any math expressions, specify true for this value for only the final math * expression that the metric specification is based on. You must specify false for * ReturnData for all the other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). */ public Boolean getReturnData() { return this.returnData; } /** *

* Indicates whether to return the timestamps and raw data values of this metric. *

*

* If you use any math expressions, specify true for this value for only the final math expression that * the metric specification is based on. You must specify false for ReturnData for all the * other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). *

* * @param returnData * Indicates whether to return the timestamps and raw data values of this metric.

*

* If you use any math expressions, specify true for this value for only the final math * expression that the metric specification is based on. You must specify false for * ReturnData for all the other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingMetricDataQuery withReturnData(Boolean returnData) { setReturnData(returnData); return this; } /** *

* Indicates whether to return the timestamps and raw data values of this metric. *

*

* If you use any math expressions, specify true for this value for only the final math expression that * the metric specification is based on. You must specify false for ReturnData for all the * other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). *

* * @return Indicates whether to return the timestamps and raw data values of this metric.

*

* If you use any math expressions, specify true for this value for only the final math * expression that the metric specification is based on. You must specify false for * ReturnData for all the other metrics and expressions used in the metric specification. *

*

* If you are only retrieving metrics and not performing any math expressions, do not specify anything for * ReturnData. This sets it to its default (true). */ public Boolean isReturnData() { return this.returnData; } /** * 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 (getExpression() != null) sb.append("Expression: ").append(getExpression()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getLabel() != null) sb.append("Label: ").append(getLabel()).append(","); if (getMetricStat() != null) sb.append("MetricStat: ").append(getMetricStat()).append(","); if (getReturnData() != null) sb.append("ReturnData: ").append(getReturnData()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TargetTrackingMetricDataQuery == false) return false; TargetTrackingMetricDataQuery other = (TargetTrackingMetricDataQuery) obj; if (other.getExpression() == null ^ this.getExpression() == null) return false; if (other.getExpression() != null && other.getExpression().equals(this.getExpression()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; if (other.getMetricStat() == null ^ this.getMetricStat() == null) return false; if (other.getMetricStat() != null && other.getMetricStat().equals(this.getMetricStat()) == false) return false; if (other.getReturnData() == null ^ this.getReturnData() == null) return false; if (other.getReturnData() != null && other.getReturnData().equals(this.getReturnData()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getExpression() == null) ? 0 : getExpression().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); hashCode = prime * hashCode + ((getMetricStat() == null) ? 0 : getMetricStat().hashCode()); hashCode = prime * hashCode + ((getReturnData() == null) ? 0 : getReturnData().hashCode()); return hashCode; } @Override public TargetTrackingMetricDataQuery clone() { try { return (TargetTrackingMetricDataQuery) 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.applicationautoscaling.model.transform.TargetTrackingMetricDataQueryMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy