Class IndexingPolicy
java.lang.Object
com.azure.resourcemanager.cosmos.models.IndexingPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<IndexingPolicy>
public final class IndexingPolicy
extends Object
implements com.azure.json.JsonSerializable<IndexingPolicy>
Cosmos DB indexing policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the automatic property: Indicates if the indexing policy is automatic.Get the compositeIndexes property: List of composite path list.Get the excludedPaths property: List of paths to exclude from indexing.static IndexingPolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of IndexingPolicy from the JsonReader.Get the includedPaths property: List of paths to include in the indexing.Get the indexingMode property: Indicates the indexing mode.Get the spatialIndexes property: List of spatial specifics.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Get the vectorIndexes property: List of paths to include in the vector indexing.withAutomatic
(Boolean automatic) Set the automatic property: Indicates if the indexing policy is automatic.withCompositeIndexes
(List<List<CompositePath>> compositeIndexes) Set the compositeIndexes property: List of composite path list.withExcludedPaths
(List<ExcludedPath> excludedPaths) Set the excludedPaths property: List of paths to exclude from indexing.withIncludedPaths
(List<IncludedPath> includedPaths) Set the includedPaths property: List of paths to include in the indexing.withIndexingMode
(IndexingMode indexingMode) Set the indexingMode property: Indicates the indexing mode.withSpatialIndexes
(List<SpatialSpec> spatialIndexes) Set the spatialIndexes property: List of spatial specifics.withVectorIndexes
(List<VectorIndex> vectorIndexes) Set the vectorIndexes property: List of paths to include in the vector indexing.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
-
IndexingPolicy
public IndexingPolicy()Creates an instance of IndexingPolicy class.
-
-
Method Details
-
automatic
Get the automatic property: Indicates if the indexing policy is automatic.- Returns:
- the automatic value.
-
withAutomatic
Set the automatic property: Indicates if the indexing policy is automatic.- Parameters:
automatic
- the automatic value to set.- Returns:
- the IndexingPolicy object itself.
-
indexingMode
Get the indexingMode property: Indicates the indexing mode.- Returns:
- the indexingMode value.
-
withIndexingMode
Set the indexingMode property: Indicates the indexing mode.- Parameters:
indexingMode
- the indexingMode value to set.- Returns:
- the IndexingPolicy object itself.
-
includedPaths
Get the includedPaths property: List of paths to include in the indexing.- Returns:
- the includedPaths value.
-
withIncludedPaths
Set the includedPaths property: List of paths to include in the indexing.- Parameters:
includedPaths
- the includedPaths value to set.- Returns:
- the IndexingPolicy object itself.
-
excludedPaths
Get the excludedPaths property: List of paths to exclude from indexing.- Returns:
- the excludedPaths value.
-
withExcludedPaths
Set the excludedPaths property: List of paths to exclude from indexing.- Parameters:
excludedPaths
- the excludedPaths value to set.- Returns:
- the IndexingPolicy object itself.
-
compositeIndexes
Get the compositeIndexes property: List of composite path list.- Returns:
- the compositeIndexes value.
-
withCompositeIndexes
Set the compositeIndexes property: List of composite path list.- Parameters:
compositeIndexes
- the compositeIndexes value to set.- Returns:
- the IndexingPolicy object itself.
-
spatialIndexes
Get the spatialIndexes property: List of spatial specifics.- Returns:
- the spatialIndexes value.
-
withSpatialIndexes
Set the spatialIndexes property: List of spatial specifics.- Parameters:
spatialIndexes
- the spatialIndexes value to set.- Returns:
- the IndexingPolicy object itself.
-
vectorIndexes
Get the vectorIndexes property: List of paths to include in the vector indexing.- Returns:
- the vectorIndexes value.
-
withVectorIndexes
Set the vectorIndexes property: List of paths to include in the vector indexing.- Parameters:
vectorIndexes
- the vectorIndexes value to set.- Returns:
- the IndexingPolicy 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<IndexingPolicy>
- Throws:
IOException
-
fromJson
Reads an instance of IndexingPolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of IndexingPolicy 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 IndexingPolicy.
-