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
    Constructor
    Description
    Creates an instance of PredictiveValue class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    Validates the instance.
    double
    Get the value property: Predictive value in this time bucket.
    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

      public OffsetDateTime timestamp()
      Get the timestamp property: the timestamp for the metric value in ISO 8601 format.
      Returns:
      the timestamp value.
    • withTimestamp

      public PredictiveValue 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 PredictiveValue object itself.
    • value

      public double value()
      Get the value property: Predictive value in this time bucket.
      Returns:
      the value value.
    • withValue

      public PredictiveValue withValue(double value)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<PredictiveValue>
      Throws:
      IOException
    • fromJson

      public static PredictiveValue fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.