Class PredictiveResponseInner

java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.PredictiveResponseInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<PredictiveResponseInner>

public final class PredictiveResponseInner extends Object implements com.azure.json.JsonSerializable<PredictiveResponseInner>
The response to a metrics query.
  • Constructor Details

    • PredictiveResponseInner

      public PredictiveResponseInner()
      Creates an instance of PredictiveResponseInner class.
  • Method Details

    • timespan

      public String timespan()
      Get the timespan property: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
      Returns:
      the timespan value.
    • withTimespan

      public PredictiveResponseInner withTimespan(String timespan)
      Set the timespan property: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
      Parameters:
      timespan - the timespan value to set.
      Returns:
      the PredictiveResponseInner object itself.
    • interval

      public Duration interval()
      Get the interval property: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
      Returns:
      the interval value.
    • withInterval

      public PredictiveResponseInner withInterval(Duration interval)
      Set the interval property: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
      Parameters:
      interval - the interval value to set.
      Returns:
      the PredictiveResponseInner object itself.
    • metricName

      public String metricName()
      Get the metricName property: The metrics being queried.
      Returns:
      the metricName value.
    • withMetricName

      public PredictiveResponseInner withMetricName(String metricName)
      Set the metricName property: The metrics being queried.
      Parameters:
      metricName - the metricName value to set.
      Returns:
      the PredictiveResponseInner object itself.
    • targetResourceId

      public String targetResourceId()
      Get the targetResourceId property: resource of the predictive metric.
      Returns:
      the targetResourceId value.
    • withTargetResourceId

      public PredictiveResponseInner withTargetResourceId(String targetResourceId)
      Set the targetResourceId property: resource of the predictive metric.
      Parameters:
      targetResourceId - the targetResourceId value to set.
      Returns:
      the PredictiveResponseInner object itself.
    • data

      public List<PredictiveValue> data()
      Get the data property: the value of the collection.
      Returns:
      the data value.
    • withData

      public PredictiveResponseInner withData(List<PredictiveValue> data)
      Set the data property: the value of the collection.
      Parameters:
      data - the data value to set.
      Returns:
      the PredictiveResponseInner 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<PredictiveResponseInner>
      Throws:
      IOException
    • fromJson

      public static PredictiveResponseInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PredictiveResponseInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PredictiveResponseInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the PredictiveResponseInner.