Class DiagnosticMetricSample

java.lang.Object
com.azure.resourcemanager.appservice.models.DiagnosticMetricSample
All Implemented Interfaces:
com.azure.json.JsonSerializable<DiagnosticMetricSample>

public final class DiagnosticMetricSample extends Object implements com.azure.json.JsonSerializable<DiagnosticMetricSample>
Class representing Diagnostic Metric.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of DiagnosticMetricSample from the JsonReader.
    Get the isAggregated property: Whether the values are aggregates across all workers or not.
    Get the maximum property: Maximum of the metric sampled during the time period.
    Get the minimum property: Minimum of the metric sampled during the time period.
    Get the roleInstance property: Role Instance.
    Get the timestamp property: Time at which metric is measured.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the total property: Total value of the metric.
    void
    Validates the instance.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • timestamp

      public OffsetDateTime timestamp()
      Get the timestamp property: Time at which metric is measured.
      Returns:
      the timestamp value.
    • roleInstance

      public String roleInstance()
      Get the roleInstance property: Role Instance. Null if this counter is not per instance This is returned and should be whichever instance name we desire to be returned i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis.
      Returns:
      the roleInstance value.
    • total

      public Double total()
      Get the total property: Total value of the metric. If multiple measurements are made this will have sum of all.
      Returns:
      the total value.
    • maximum

      public Double maximum()
      Get the maximum property: Maximum of the metric sampled during the time period.
      Returns:
      the maximum value.
    • minimum

      public Double minimum()
      Get the minimum property: Minimum of the metric sampled during the time period.
      Returns:
      the minimum value.
    • isAggregated

      public Boolean isAggregated()
      Get the isAggregated property: Whether the values are aggregates across all workers or not.
      Returns:
      the isAggregated value.
    • 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<DiagnosticMetricSample>
      Throws:
      IOException
    • fromJson

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