/* * Copyright 2018-2023 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.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* The response to a DataQuery
.
*
* The ID passed in the DataQuery
.
*
* The Region or Availability Zone that's the source for the data query. For example, us-east-1
.
*
* The Region or Availability Zone that's the destination for the data query. For example, eu-west-1
.
*
* The metric used for the network performance request. Only aggregate-latency
is supported, which
* shows network latency during a specified period.
*
* The statistic used for the network performance request. *
*/ private String statistic; /** ** The period used for the network performance request. *
*/ private String period; /** *
* A list of MetricPoint
objects.
*
* The ID passed in the DataQuery
.
*
DataQuery
.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID passed in the DataQuery
.
*
DataQuery
.
*/
public String getId() {
return this.id;
}
/**
*
* The ID passed in the DataQuery
.
*
DataQuery
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataResponse withId(String id) {
setId(id);
return this;
}
/**
*
* The Region or Availability Zone that's the source for the data query. For example, us-east-1
.
*
us-east-1
.
*/
public void setSource(String source) {
this.source = source;
}
/**
*
* The Region or Availability Zone that's the source for the data query. For example, us-east-1
.
*
us-east-1
* .
*/
public String getSource() {
return this.source;
}
/**
*
* The Region or Availability Zone that's the source for the data query. For example, us-east-1
.
*
us-east-1
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataResponse withSource(String source) {
setSource(source);
return this;
}
/**
*
* The Region or Availability Zone that's the destination for the data query. For example, eu-west-1
.
*
eu-west-1
.
*/
public void setDestination(String destination) {
this.destination = destination;
}
/**
*
* The Region or Availability Zone that's the destination for the data query. For example, eu-west-1
.
*
eu-west-1
.
*/
public String getDestination() {
return this.destination;
}
/**
*
* The Region or Availability Zone that's the destination for the data query. For example, eu-west-1
.
*
eu-west-1
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataResponse withDestination(String destination) {
setDestination(destination);
return this;
}
/**
*
* The metric used for the network performance request. Only aggregate-latency
is supported, which
* shows network latency during a specified period.
*
aggregate-latency
is supported,
* which shows network latency during a specified period.
* @see MetricType
*/
public void setMetric(String metric) {
this.metric = metric;
}
/**
*
* The metric used for the network performance request. Only aggregate-latency
is supported, which
* shows network latency during a specified period.
*
aggregate-latency
is supported,
* which shows network latency during a specified period.
* @see MetricType
*/
public String getMetric() {
return this.metric;
}
/**
*
* The metric used for the network performance request. Only aggregate-latency
is supported, which
* shows network latency during a specified period.
*
aggregate-latency
is supported,
* which shows network latency during a specified period.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricType
*/
public DataResponse withMetric(String metric) {
setMetric(metric);
return this;
}
/**
*
* The metric used for the network performance request. Only aggregate-latency
is supported, which
* shows network latency during a specified period.
*
aggregate-latency
is supported,
* which shows network latency during a specified period.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricType
*/
public DataResponse withMetric(MetricType metric) {
this.metric = metric.toString();
return this;
}
/**
* * The statistic used for the network performance request. *
* * @param statistic * The statistic used for the network performance request. * @see StatisticType */ public void setStatistic(String statistic) { this.statistic = statistic; } /** ** The statistic used for the network performance request. *
* * @return The statistic used for the network performance request. * @see StatisticType */ public String getStatistic() { return this.statistic; } /** ** The statistic used for the network performance request. *
* * @param statistic * The statistic used for the network performance request. * @return Returns a reference to this object so that method calls can be chained together. * @see StatisticType */ public DataResponse withStatistic(String statistic) { setStatistic(statistic); return this; } /** ** The statistic used for the network performance request. *
* * @param statistic * The statistic used for the network performance request. * @return Returns a reference to this object so that method calls can be chained together. * @see StatisticType */ public DataResponse withStatistic(StatisticType statistic) { this.statistic = statistic.toString(); return this; } /** ** The period used for the network performance request. *
* * @param period * The period used for the network performance request. * @see PeriodType */ public void setPeriod(String period) { this.period = period; } /** ** The period used for the network performance request. *
* * @return The period used for the network performance request. * @see PeriodType */ public String getPeriod() { return this.period; } /** ** The period used for the network performance request. *
* * @param period * The period used for the network performance request. * @return Returns a reference to this object so that method calls can be chained together. * @see PeriodType */ public DataResponse withPeriod(String period) { setPeriod(period); return this; } /** ** The period used for the network performance request. *
* * @param period * The period used for the network performance request. * @return Returns a reference to this object so that method calls can be chained together. * @see PeriodType */ public DataResponse withPeriod(PeriodType period) { this.period = period.toString(); return this; } /** *
* A list of MetricPoint
objects.
*
MetricPoint
objects.
*/
public java.util.List
* A list of MetricPoint
objects.
*
MetricPoint
objects.
*/
public void setMetricPoints(java.util.Collection
* A list of MetricPoint
objects.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricPoints(java.util.Collection)} or {@link #withMetricPoints(java.util.Collection)} if you want to * override the existing values. *
* * @param metricPoints * A list ofMetricPoint
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataResponse withMetricPoints(MetricPoint... metricPoints) {
if (this.metricPoints == null) {
setMetricPoints(new com.amazonaws.internal.SdkInternalList
* A list of MetricPoint
objects.
*
MetricPoint
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataResponse withMetricPoints(java.util.Collection