Class SqlContainerResource
java.lang.Object
com.azure.resourcemanager.cosmos.models.SqlContainerResource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SqlContainerResource>
- Direct Known Subclasses:
RestorableSqlContainerPropertiesResourceContainer,SqlContainerGetPropertiesResource
public class SqlContainerResource
extends Object
implements com.azure.json.JsonSerializable<SqlContainerResource>
Cosmos DB SQL container resource object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the analyticalStorageTtl property: Analytical TTL.Get the clientEncryptionPolicy property: The client encryption policy for the container.Get the computedProperties property: List of computed properties.Get the conflictResolutionPolicy property: The conflict resolution policy for the container.Get the createMode property: Enum to indicate the mode of resource creation.Get the defaultTtl property: Default time to live.static SqlContainerResourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SqlContainerResource from the JsonReader.id()Get the id property: Name of the Cosmos DB SQL container.Get the indexingPolicy property: The configuration of the indexing policy.Get the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.Get the restoreParameters property: Parameters to indicate the information about the restore.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) 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.Get the vectorEmbeddingPolicy property: The vector embedding policy for the container.withAnalyticalStorageTtl(Long analyticalStorageTtl) Set the analyticalStorageTtl property: Analytical TTL.withClientEncryptionPolicy(ClientEncryptionPolicy clientEncryptionPolicy) Set the clientEncryptionPolicy property: The client encryption policy for the container.withComputedProperties(List<ComputedProperty> computedProperties) Set the computedProperties property: List of computed properties.withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) Set the conflictResolutionPolicy property: The conflict resolution policy for the container.withCreateMode(CreateMode createMode) Set the createMode property: Enum to indicate the mode of resource creation.withDefaultTtl(Integer defaultTtl) Set the defaultTtl property: Default time to live.Set the id property: Name of the Cosmos DB SQL container.withIndexingPolicy(IndexingPolicy indexingPolicy) Set the indexingPolicy property: The configuration of the indexing policy.withPartitionKey(ContainerPartitionKey partitionKey) Set the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.withRestoreParameters(ResourceRestoreParameters restoreParameters) Set the restoreParameters property: Parameters to indicate the information about the restore.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.withVectorEmbeddingPolicy(VectorEmbeddingPolicy vectorEmbeddingPolicy) Set the vectorEmbeddingPolicy property: The vector embedding policy for the container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SqlContainerResource
public SqlContainerResource()Creates an instance of SqlContainerResource class.
-
-
Method Details
-
id
Get the id property: Name of the Cosmos DB SQL container.- Returns:
- the id value.
-
withId
Set the id property: Name of the Cosmos DB SQL container.- Parameters:
id- the id value to set.- Returns:
- the SqlContainerResource object itself.
-
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
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
Get the partitionKey property: The configuration of the partition key to be used for partitioning data into multiple partitions.- Returns:
- the partitionKey value.
-
withPartitionKey
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
Get the defaultTtl property: Default time to live.- Returns:
- the defaultTtl value.
-
withDefaultTtl
Set the defaultTtl property: Default time to live.- Parameters:
defaultTtl- the defaultTtl value to set.- Returns:
- the SqlContainerResource object itself.
-
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
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
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.
-
clientEncryptionPolicy
Get the clientEncryptionPolicy property: The client encryption policy for the container.- Returns:
- the clientEncryptionPolicy value.
-
withClientEncryptionPolicy
public SqlContainerResource withClientEncryptionPolicy(ClientEncryptionPolicy clientEncryptionPolicy) Set the clientEncryptionPolicy property: The client encryption policy for the container.- Parameters:
clientEncryptionPolicy- the clientEncryptionPolicy value to set.- Returns:
- the SqlContainerResource object itself.
-
analyticalStorageTtl
Get the analyticalStorageTtl property: Analytical TTL.- Returns:
- the analyticalStorageTtl value.
-
withAnalyticalStorageTtl
Set the analyticalStorageTtl property: Analytical TTL.- Parameters:
analyticalStorageTtl- the analyticalStorageTtl value to set.- Returns:
- the SqlContainerResource object itself.
-
restoreParameters
Get the restoreParameters property: Parameters to indicate the information about the restore.- Returns:
- the restoreParameters value.
-
withRestoreParameters
Set the restoreParameters property: Parameters to indicate the information about the restore.- Parameters:
restoreParameters- the restoreParameters value to set.- Returns:
- the SqlContainerResource object itself.
-
createMode
Get the createMode property: Enum to indicate the mode of resource creation.- Returns:
- the createMode value.
-
withCreateMode
Set the createMode property: Enum to indicate the mode of resource creation.- Parameters:
createMode- the createMode value to set.- Returns:
- the SqlContainerResource object itself.
-
computedProperties
Get the computedProperties property: List of computed properties.- Returns:
- the computedProperties value.
-
withComputedProperties
Set the computedProperties property: List of computed properties.- Parameters:
computedProperties- the computedProperties value to set.- Returns:
- the SqlContainerResource object itself.
-
vectorEmbeddingPolicy
Get the vectorEmbeddingPolicy property: The vector embedding policy for the container.- Returns:
- the vectorEmbeddingPolicy value.
-
withVectorEmbeddingPolicy
Set the vectorEmbeddingPolicy property: The vector embedding policy for the container.- Parameters:
vectorEmbeddingPolicy- the vectorEmbeddingPolicy value to set.- Returns:
- the SqlContainerResource object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SqlContainerResource>- Throws:
IOException
-
fromJson
public static SqlContainerResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SqlContainerResource from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SqlContainerResource 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 SqlContainerResource.
-