Class AutoscaleSettingsResource

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

public final class AutoscaleSettingsResource extends Object implements com.azure.json.JsonSerializable<AutoscaleSettingsResource>
Cosmos DB provisioned throughput settings object.
  • Constructor Details

    • AutoscaleSettingsResource

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

    • maxThroughput

      public int maxThroughput()
      Get the maxThroughput property: Represents maximum throughput container can scale up to.
      Returns:
      the maxThroughput value.
    • withMaxThroughput

      public AutoscaleSettingsResource withMaxThroughput(int maxThroughput)
      Set the maxThroughput property: Represents maximum throughput container can scale up to.
      Parameters:
      maxThroughput - the maxThroughput value to set.
      Returns:
      the AutoscaleSettingsResource object itself.
    • autoUpgradePolicy

      public AutoUpgradePolicyResource autoUpgradePolicy()
      Get the autoUpgradePolicy property: Cosmos DB resource auto-upgrade policy.
      Returns:
      the autoUpgradePolicy value.
    • withAutoUpgradePolicy

      public AutoscaleSettingsResource withAutoUpgradePolicy(AutoUpgradePolicyResource autoUpgradePolicy)
      Set the autoUpgradePolicy property: Cosmos DB resource auto-upgrade policy.
      Parameters:
      autoUpgradePolicy - the autoUpgradePolicy value to set.
      Returns:
      the AutoscaleSettingsResource object itself.
    • targetMaxThroughput

      public Integer targetMaxThroughput()
      Get the targetMaxThroughput property: Represents target maximum throughput container can scale up to once offer is no longer in pending state.
      Returns:
      the targetMaxThroughput 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<AutoscaleSettingsResource>
      Throws:
      IOException
    • fromJson

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