java.lang.Object
com.azure.resourcemanager.cosmos.fluent.models.UsageInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<UsageInner>
Direct Known Subclasses:
PartitionUsageInner

public class UsageInner extends Object implements com.azure.json.JsonSerializable<UsageInner>
The usage data for a usage request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of UsageInner class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the currentValue property: Current value for this metric.
    static UsageInner
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of UsageInner from the JsonReader.
    Get the limit property: Maximum value for this metric.
    Get the name property: The name information for the metric.
    Get the quotaPeriod property: The quota period used to summarize the usage values.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the unit property: The unit of the metric.
    void
    Validates the instance.

    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

    • UsageInner

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

    • unit

      public UnitType unit()
      Get the unit property: The unit of the metric.
      Returns:
      the unit value.
    • name

      public MetricName name()
      Get the name property: The name information for the metric.
      Returns:
      the name value.
    • quotaPeriod

      public String quotaPeriod()
      Get the quotaPeriod property: The quota period used to summarize the usage values.
      Returns:
      the quotaPeriod value.
    • limit

      public Long limit()
      Get the limit property: Maximum value for this metric.
      Returns:
      the limit value.
    • currentValue

      public Long currentValue()
      Get the currentValue property: Current value for this metric.
      Returns:
      the currentValue 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<UsageInner>
      Throws:
      IOException
    • fromJson

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