Class SqlContainerResource
- java.lang.Object
-
- com.azure.resourcemanager.cosmos.models.SqlContainerResource
-
- Direct Known Subclasses:
RestorableSqlContainerPropertiesResourceContainer,SqlContainerGetPropertiesResource
public class SqlContainerResource extends Object
Cosmos DB SQL container resource object.
-
-
Constructor Summary
Constructors Constructor Description SqlContainerResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonganalyticalStorageTtl()Get the analyticalStorageTtl property: Analytical TTL.ConflictResolutionPolicyconflictResolutionPolicy()Get the conflictResolutionPolicy property: The conflict resolution policy for the container.IntegerdefaultTtl()Get the defaultTtl property: Default time to live.Stringid()Get the id property: Name of the Cosmos DB SQL container.IndexingPolicyindexingPolicy()Get the indexingPolicy property: The configuration of the indexing policy.ContainerPartitionKeypartitionKey()Get the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.UniqueKeyPolicyuniqueKeyPolicy()Get the uniqueKeyPolicy property: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.voidvalidate()Validates the instance.SqlContainerResourcewithAnalyticalStorageTtl(Long analyticalStorageTtl)Set the analyticalStorageTtl property: Analytical TTL.SqlContainerResourcewithConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy)Set the conflictResolutionPolicy property: The conflict resolution policy for the container.SqlContainerResourcewithDefaultTtl(Integer defaultTtl)Set the defaultTtl property: Default time to live.SqlContainerResourcewithId(String id)Set the id property: Name of the Cosmos DB SQL container.SqlContainerResourcewithIndexingPolicy(IndexingPolicy indexingPolicy)Set the indexingPolicy property: The configuration of the indexing policy.SqlContainerResourcewithPartitionKey(ContainerPartitionKey partitionKey)Set the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.SqlContainerResourcewithUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)Set the uniqueKeyPolicy property: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
-
-
-
Method Detail
-
id
public String id()
Get the id property: Name of the Cosmos DB SQL container.- Returns:
- the id value.
-
withId
public SqlContainerResource withId(String id)
Set the id property: Name of the Cosmos DB SQL container.- Parameters:
id- the id value to set.- Returns:
- the SqlContainerResource object itself.
-
indexingPolicy
public IndexingPolicy indexingPolicy()
Get the indexingPolicy property: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container.- Returns:
- the indexingPolicy value.
-
withIndexingPolicy
public SqlContainerResource withIndexingPolicy(IndexingPolicy indexingPolicy)
Set the indexingPolicy property: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container.- Parameters:
indexingPolicy- the indexingPolicy value to set.- Returns:
- the SqlContainerResource object itself.
-
partitionKey
public ContainerPartitionKey partitionKey()
Get the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.- Returns:
- the partitionKey value.
-
withPartitionKey
public SqlContainerResource withPartitionKey(ContainerPartitionKey partitionKey)
Set the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.- Parameters:
partitionKey- the partitionKey value to set.- Returns:
- the SqlContainerResource object itself.
-
defaultTtl
public Integer defaultTtl()
Get the defaultTtl property: Default time to live.- Returns:
- the defaultTtl value.
-
withDefaultTtl
public SqlContainerResource withDefaultTtl(Integer defaultTtl)
Set the defaultTtl property: Default time to live.- Parameters:
defaultTtl- the defaultTtl value to set.- Returns:
- the SqlContainerResource object itself.
-
uniqueKeyPolicy
public UniqueKeyPolicy uniqueKeyPolicy()
Get the uniqueKeyPolicy property: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.- Returns:
- the uniqueKeyPolicy value.
-
withUniqueKeyPolicy
public SqlContainerResource withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)
Set the uniqueKeyPolicy property: The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.- Parameters:
uniqueKeyPolicy- the uniqueKeyPolicy value to set.- Returns:
- the SqlContainerResource object itself.
-
conflictResolutionPolicy
public ConflictResolutionPolicy conflictResolutionPolicy()
Get the conflictResolutionPolicy property: The conflict resolution policy for the container.- Returns:
- the conflictResolutionPolicy value.
-
withConflictResolutionPolicy
public SqlContainerResource withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy)
Set the conflictResolutionPolicy property: The conflict resolution policy for the container.- Parameters:
conflictResolutionPolicy- the conflictResolutionPolicy value to set.- Returns:
- the SqlContainerResource object itself.
-
analyticalStorageTtl
public Long analyticalStorageTtl()
Get the analyticalStorageTtl property: Analytical TTL.- Returns:
- the analyticalStorageTtl value.
-
withAnalyticalStorageTtl
public SqlContainerResource withAnalyticalStorageTtl(Long analyticalStorageTtl)
Set the analyticalStorageTtl property: Analytical TTL.- Parameters:
analyticalStorageTtl- the analyticalStorageTtl value to set.- Returns:
- the SqlContainerResource object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-