Class CreateUpdateOptions
java.lang.Object
com.azure.resourcemanager.cosmos.models.CreateUpdateOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CreateUpdateOptions>
public final class CreateUpdateOptions
extends Object
implements com.azure.json.JsonSerializable<CreateUpdateOptions>
CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match",
"If-None-Match", "Session-Token" and "Throughput".
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the autoscaleSettings property: Specifies the Autoscale settings.static CreateUpdateOptions
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CreateUpdateOptions from the JsonReader.Get the throughput property: Request Units per second.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAutoscaleSettings
(AutoscaleSettings autoscaleSettings) Set the autoscaleSettings property: Specifies the Autoscale settings.withThroughput
(Integer throughput) Set the throughput property: Request Units per second.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
-
CreateUpdateOptions
public CreateUpdateOptions()Creates an instance of CreateUpdateOptions class.
-
-
Method Details
-
throughput
Get the throughput property: Request Units per second. For example, "throughput": 10000.- Returns:
- the throughput value.
-
withThroughput
Set the throughput property: Request Units per second. For example, "throughput": 10000.- Parameters:
throughput
- the throughput value to set.- Returns:
- the CreateUpdateOptions object itself.
-
autoscaleSettings
Get the autoscaleSettings property: Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both.- Returns:
- the autoscaleSettings value.
-
withAutoscaleSettings
Set the autoscaleSettings property: Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both.- Parameters:
autoscaleSettings
- the autoscaleSettings value to set.- Returns:
- the CreateUpdateOptions 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<CreateUpdateOptions>
- Throws:
IOException
-
fromJson
Reads an instance of CreateUpdateOptions from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of CreateUpdateOptions 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 CreateUpdateOptions.
-