Class MetricValue
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.MetricValue
-
public final class MetricValue extends Object
Represents a metric value.
-
-
Constructor Summary
Constructors Constructor Description MetricValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Doubleaverage()Get the average property: the average value in the time range.Doublecount()Get the count property: the number of samples in the time range.Doublemaximum()Get the maximum property: the greatest value in the time range.Doubleminimum()Get the minimum property: the least value in the time range.OffsetDateTimetimestamp()Get the timestamp property: the timestamp for the metric value in ISO 8601 format.Doubletotal()Get the total property: the sum of all of the values in the time range.voidvalidate()Validates the instance.MetricValuewithAverage(Double average)Set the average property: the average value in the time range.MetricValuewithCount(Double count)Set the count property: the number of samples in the time range.MetricValuewithMaximum(Double maximum)Set the maximum property: the greatest value in the time range.MetricValuewithMinimum(Double minimum)Set the minimum property: the least value in the time range.MetricValuewithTimestamp(OffsetDateTime timestamp)Set the timestamp property: the timestamp for the metric value in ISO 8601 format.MetricValuewithTotal(Double total)Set the total property: the sum of all of the values in the time range.
-
-
-
Method Detail
-
timestamp
public OffsetDateTime timestamp()
Get the timestamp property: the timestamp for the metric value in ISO 8601 format.- Returns:
- the timestamp value.
-
withTimestamp
public MetricValue withTimestamp(OffsetDateTime timestamp)
Set the timestamp property: the timestamp for the metric value in ISO 8601 format.- Parameters:
timestamp- the timestamp value to set.- Returns:
- the MetricValue object itself.
-
average
public Double average()
Get the average property: the average value in the time range.- Returns:
- the average value.
-
withAverage
public MetricValue withAverage(Double average)
Set the average property: the average value in the time range.- Parameters:
average- the average value to set.- Returns:
- the MetricValue object itself.
-
minimum
public Double minimum()
Get the minimum property: the least value in the time range.- Returns:
- the minimum value.
-
withMinimum
public MetricValue withMinimum(Double minimum)
Set the minimum property: the least value in the time range.- Parameters:
minimum- the minimum value to set.- Returns:
- the MetricValue object itself.
-
maximum
public Double maximum()
Get the maximum property: the greatest value in the time range.- Returns:
- the maximum value.
-
withMaximum
public MetricValue withMaximum(Double maximum)
Set the maximum property: the greatest value in the time range.- Parameters:
maximum- the maximum value to set.- Returns:
- the MetricValue object itself.
-
total
public Double total()
Get the total property: the sum of all of the values in the time range.- Returns:
- the total value.
-
withTotal
public MetricValue withTotal(Double total)
Set the total property: the sum of all of the values in the time range.- Parameters:
total- the total value to set.- Returns:
- the MetricValue object itself.
-
count
public Double count()
Get the count property: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.- Returns:
- the count value.
-
withCount
public MetricValue withCount(Double count)
Set the count property: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value.- Parameters:
count- the count value to set.- Returns:
- the MetricValue object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-