Class PredictiveValue
java.lang.Object
com.azure.resourcemanager.monitor.models.PredictiveValue
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PredictiveValue>
public final class PredictiveValue
extends Object
implements com.azure.json.JsonSerializable<PredictiveValue>
Represents a predictive metric value in the given bucket.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PredictiveValue
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PredictiveValue from the JsonReader.Get the timestamp property: the timestamp for the metric value in ISO 8601 format.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.double
value()
Get the value property: Predictive value in this time bucket.withTimestamp
(OffsetDateTime timestamp) Set the timestamp property: the timestamp for the metric value in ISO 8601 format.withValue
(double value) Set the value property: Predictive value in this time bucket.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PredictiveValue
public PredictiveValue()Creates an instance of PredictiveValue class.
-
-
Method Details
-
timestamp
Get the timestamp property: the timestamp for the metric value in ISO 8601 format.- Returns:
- the timestamp value.
-
withTimestamp
Set the timestamp property: the timestamp for the metric value in ISO 8601 format.- Parameters:
timestamp
- the timestamp value to set.- Returns:
- the PredictiveValue object itself.
-
value
public double value()Get the value property: Predictive value in this time bucket.- Returns:
- the value value.
-
withValue
Set the value property: Predictive value in this time bucket.- Parameters:
value
- the value value to set.- Returns:
- the PredictiveValue object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<PredictiveValue>
- Throws:
IOException
-
fromJson
Reads an instance of PredictiveValue from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of PredictiveValue if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the PredictiveValue.
-