Class MetricBaselinesProperties

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

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

    • MetricBaselinesProperties

      public MetricBaselinesProperties()
      Creates an instance of MetricBaselinesProperties 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 MetricBaselinesProperties 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 MetricBaselinesProperties 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 MetricBaselinesProperties 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 MetricBaselinesProperties object itself.
    • namespace

      public String namespace()
      Get the namespace property: The namespace of the metrics been queried.
      Returns:
      the namespace value.
    • withNamespace

      public MetricBaselinesProperties withNamespace(String namespace)
      Set the namespace property: The namespace of the metrics been queried.
      Parameters:
      namespace - the namespace value to set.
      Returns:
      the MetricBaselinesProperties object itself.
    • baselines

      public List<TimeSeriesBaseline> baselines()
      Get the baselines property: The baseline for each time series that was queried.
      Returns:
      the baselines value.
    • withBaselines

      public MetricBaselinesProperties withBaselines(List<TimeSeriesBaseline> baselines)
      Set the baselines property: The baseline for each time series that was queried.
      Parameters:
      baselines - the baselines value to set.
      Returns:
      the MetricBaselinesProperties 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<MetricBaselinesProperties>
      Throws:
      IOException
    • fromJson

      public static MetricBaselinesProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MetricBaselinesProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MetricBaselinesProperties 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 MetricBaselinesProperties.