Class ThroughputPolicyResource
java.lang.Object
com.azure.resourcemanager.cosmos.models.ThroughputPolicyResource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ThroughputPolicyResource>
public final class ThroughputPolicyResource
extends Object
implements com.azure.json.JsonSerializable<ThroughputPolicyResource>
Cosmos DB resource throughput policy.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ThroughputPolicyResource class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ThroughputPolicyResource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ThroughputPolicyResource from the JsonReader.Get the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.Get the isEnabled property: Determines whether the ThroughputPolicy is active or not.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withIncrementPercent
(Integer incrementPercent) Set the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.withIsEnabled
(Boolean isEnabled) Set the isEnabled property: Determines whether the ThroughputPolicy is active or not.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
-
ThroughputPolicyResource
public ThroughputPolicyResource()Creates an instance of ThroughputPolicyResource class.
-
-
Method Details
-
isEnabled
Get the isEnabled property: Determines whether the ThroughputPolicy is active or not.- Returns:
- the isEnabled value.
-
withIsEnabled
Set the isEnabled property: Determines whether the ThroughputPolicy is active or not.- Parameters:
isEnabled
- the isEnabled value to set.- Returns:
- the ThroughputPolicyResource object itself.
-
incrementPercent
Get the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.- Returns:
- the incrementPercent value.
-
withIncrementPercent
Set the incrementPercent property: Represents the percentage by which throughput can increase every time throughput policy kicks in.- Parameters:
incrementPercent
- the incrementPercent value to set.- Returns:
- the ThroughputPolicyResource object itself.
-
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<ThroughputPolicyResource>
- Throws:
IOException
-
fromJson
public static ThroughputPolicyResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ThroughputPolicyResource from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ThroughputPolicyResource 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 ThroughputPolicyResource.
-