ContainerPartitionKey Class
- java.
lang. Object - com.
azure. resourcemanager. cosmos. models. ContainerPartitionKey
- com.
Implements
public final class ContainerPartitionKey
implements JsonSerializable<ContainerPartitionKey>
The configuration of the partition key to be used for partitioning data into multiple partitions.
Constructor Summary
Constructor | Description |
---|---|
ContainerPartitionKey() |
Creates an instance of Container |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Container |
fromJson(JsonReader jsonReader)
Reads an instance of Container |
Partition |
kind()
Get the kind property: Indicates the kind of algorithm used for partitioning. |
List<String> |
paths()
Get the paths property: List of paths using which data within the container can be partitioned. |
Boolean |
systemKey()
Get the system |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Integer |
version()
Get the version property: Indicates the version of the partition key definition. |
Container |
withKind(PartitionKind kind)
Set the kind property: Indicates the kind of algorithm used for partitioning. |
Container |
withPaths(List<String> paths)
Set the paths property: List of paths using which data within the container can be partitioned. |
Container |
withVersion(Integer version)
Set the version property: Indicates the version of the partition key definition. |
Methods inherited from java.lang.Object
Constructor Details
ContainerPartitionKey
public ContainerPartitionKey()
Creates an instance of ContainerPartitionKey class.
Method Details
fromJson
public static ContainerPartitionKey fromJson(JsonReader jsonReader)
Reads an instance of ContainerPartitionKey from the JsonReader.
Parameters:
Returns:
Throws:
kind
public PartitionKind kind()
Get the kind property: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create.
Returns:
paths
public List
Get the paths property: List of paths using which data within the container can be partitioned.
Returns:
systemKey
public Boolean systemKey()
Get the systemKey property: Indicates if the container is using a system generated partition key.
Returns:
toJson
validate
public void validate()
Validates the instance.
version
public Integer version()
Get the version property: Indicates the version of the partition key definition.
Returns:
withKind
public ContainerPartitionKey withKind(PartitionKind kind)
Set the kind property: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create.
Parameters:
Returns:
withPaths
public ContainerPartitionKey withPaths(List
Set the paths property: List of paths using which data within the container can be partitioned.
Parameters:
Returns:
withVersion
public ContainerPartitionKey withVersion(Integer version)
Set the version property: Indicates the version of the partition key definition.
Parameters:
Returns:
Applies to
Azure SDK for Java