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 Summary
ConstructorsConstructorDescriptionCreates an instance of AutoscaleSettingsResource class. -
Method Summary
Modifier and TypeMethodDescriptionGet the autoUpgradePolicy property: Cosmos DB resource auto-upgrade policy.static AutoscaleSettingsResource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AutoscaleSettingsResource from the JsonReader.int
Get the maxThroughput property: Represents maximum throughput container can scale up to.Get the targetMaxThroughput property: Represents target maximum throughput container can scale up to once offer is no longer in pending state.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAutoUpgradePolicy
(AutoUpgradePolicyResource autoUpgradePolicy) Set the autoUpgradePolicy property: Cosmos DB resource auto-upgrade policy.withMaxThroughput
(int maxThroughput) Set the maxThroughput property: Represents maximum throughput container can scale up to.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
-
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
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
Get the autoUpgradePolicy property: Cosmos DB resource auto-upgrade policy.- Returns:
- the autoUpgradePolicy value.
-
withAutoUpgradePolicy
Set the autoUpgradePolicy property: Cosmos DB resource auto-upgrade policy.- Parameters:
autoUpgradePolicy
- the autoUpgradePolicy value to set.- Returns:
- the AutoscaleSettingsResource object itself.
-
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
- Specified by:
toJson
in interfacecom.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.
-