Class Capacity

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

public final class Capacity extends Object implements com.azure.json.JsonSerializable<Capacity>
The object that represents all properties related to capacity enforcement on an account.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    static Capacity
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Capacity from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the totalThroughputLimit property: The total throughput limit imposed on the account.
    void
    Validates the instance.
    withTotalThroughputLimit(Integer totalThroughputLimit)
    Set the totalThroughputLimit property: The total throughput limit imposed on the account.

    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

    • Capacity

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

    • totalThroughputLimit

      public Integer totalThroughputLimit()
      Get the totalThroughputLimit property: The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput.
      Returns:
      the totalThroughputLimit value.
    • withTotalThroughputLimit

      public Capacity withTotalThroughputLimit(Integer totalThroughputLimit)
      Set the totalThroughputLimit property: The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput.
      Parameters:
      totalThroughputLimit - the totalThroughputLimit value to set.
      Returns:
      the Capacity 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<Capacity>
      Throws:
      IOException
    • fromJson

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