MetricValue Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. MetricValue
- com.
Implements
public final class MetricValue
implements JsonSerializable<MetricValue>
Represents a metric value.
Constructor Summary
Constructor | Description |
---|---|
MetricValue() |
Creates an instance of Metric |
Method Summary
Modifier and Type | Method and Description |
---|---|
Double |
average()
Get the average property: the average value in the time range. |
Double |
count()
Get the count property: the number of samples in the time range. |
static
Metric |
fromJson(JsonReader jsonReader)
Reads an instance of Metric |
Double |
maximum()
Get the maximum property: the greatest value in the time range. |
Double |
minimum()
Get the minimum property: the least value in the time range. |
Offset |
timestamp()
Get the timestamp property: the timestamp for the metric value in ISO 8601 format. |
Json |
toJson(JsonWriter jsonWriter) |
Double |
total()
Get the total property: the sum of all of the values in the time range. |
void |
validate()
Validates the instance. |
Metric |
withAverage(Double average)
Set the average property: the average value in the time range. |
Metric |
withCount(Double count)
Set the count property: the number of samples in the time range. |
Metric |
withMaximum(Double maximum)
Set the maximum property: the greatest value in the time range. |
Metric |
withMinimum(Double minimum)
Set the minimum property: the least value in the time range. |
Metric |
withTimestamp(OffsetDateTime timestamp)
Set the timestamp property: the timestamp for the metric value in ISO 8601 format. |
Metric |
withTotal(Double total)
Set the total property: the sum of all of the values in the time range. |
Methods inherited from java.lang.Object
Constructor Details
MetricValue
public MetricValue()
Creates an instance of MetricValue class.
Method Details
average
public Double average()
Get the average property: the average value in the time range.
Returns:
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:
fromJson
public static MetricValue fromJson(JsonReader jsonReader)
Reads an instance of MetricValue from the JsonReader.
Parameters:
Returns:
Throws:
maximum
public Double maximum()
Get the maximum property: the greatest value in the time range.
Returns:
minimum
public Double minimum()
Get the minimum property: the least value in the time range.
Returns:
timestamp
public OffsetDateTime timestamp()
Get the timestamp property: the timestamp for the metric value in ISO 8601 format.
Returns:
toJson
total
public Double total()
Get the total property: the sum of all of the values in the time range.
Returns:
validate
public void validate()
Validates the instance.
withAverage
public MetricValue withAverage(Double average)
Set the average property: the average value in the time range.
Parameters:
Returns:
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:
Returns:
withMaximum
public MetricValue withMaximum(Double maximum)
Set the maximum property: the greatest value in the time range.
Parameters:
Returns:
withMinimum
public MetricValue withMinimum(Double minimum)
Set the minimum property: the least value in the time range.
Parameters:
Returns:
withTimestamp
public MetricValue withTimestamp(OffsetDateTime timestamp)
Set the timestamp property: the timestamp for the metric value in ISO 8601 format.
Parameters:
Returns:
withTotal
public MetricValue withTotal(Double total)
Set the total property: the sum of all of the values in the time range.
Parameters:
Returns:
Applies to
Azure SDK for Java