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 Details

    • IndexingPolicy

      public IndexingPolicy()
      Creates an instance of IndexingPolicy class.
  • Method Details

    • automatic

      public Boolean automatic()
      Get the automatic property: Indicates if the indexing policy is automatic.
      Returns:
      the automatic value.
    • withAutomatic

      public IndexingPolicy withAutomatic(Boolean automatic)
      Set the automatic property: Indicates if the indexing policy is automatic.
      Parameters:
      automatic - the automatic value to set.
      Returns:
      the IndexingPolicy object itself.
    • indexingMode

      public IndexingMode indexingMode()
      Get the indexingMode property: Indicates the indexing mode.
      Returns:
      the indexingMode value.
    • withIndexingMode

      public IndexingPolicy withIndexingMode(IndexingMode indexingMode)
      Set the indexingMode property: Indicates the indexing mode.
      Parameters:
      indexingMode - the indexingMode value to set.
      Returns:
      the IndexingPolicy object itself.
    • includedPaths

      public List<IncludedPath> includedPaths()
      Get the includedPaths property: List of paths to include in the indexing.
      Returns:
      the includedPaths value.
    • withIncludedPaths

      public IndexingPolicy withIncludedPaths(List<IncludedPath> includedPaths)
      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

      public List<ExcludedPath> excludedPaths()
      Get the excludedPaths property: List of paths to exclude from indexing.
      Returns:
      the excludedPaths value.
    • withExcludedPaths

      public IndexingPolicy withExcludedPaths(List<ExcludedPath> excludedPaths)
      Set the excludedPaths property: List of paths to exclude from indexing.
      Parameters:
      excludedPaths - the excludedPaths value to set.
      Returns:
      the IndexingPolicy object itself.
    • compositeIndexes

      public List<List<CompositePath>> compositeIndexes()
      Get the compositeIndexes property: List of composite path list.
      Returns:
      the compositeIndexes value.
    • withCompositeIndexes

      public IndexingPolicy withCompositeIndexes(List<List<CompositePath>> compositeIndexes)
      Set the compositeIndexes property: List of composite path list.
      Parameters:
      compositeIndexes - the compositeIndexes value to set.
      Returns:
      the IndexingPolicy object itself.
    • spatialIndexes

      public List<SpatialSpec> spatialIndexes()
      Get the spatialIndexes property: List of spatial specifics.
      Returns:
      the spatialIndexes value.
    • withSpatialIndexes

      public IndexingPolicy withSpatialIndexes(List<SpatialSpec> spatialIndexes)
      Set the spatialIndexes property: List of spatial specifics.
      Parameters:
      spatialIndexes - the spatialIndexes value to set.
      Returns:
      the IndexingPolicy object itself.
    • vectorIndexes

      public List<VectorIndex> vectorIndexes()
      Get the vectorIndexes property: List of paths to include in the vector indexing.
      Returns:
      the vectorIndexes value.
    • withVectorIndexes

      public IndexingPolicy withVectorIndexes(List<VectorIndex> vectorIndexes)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<IndexingPolicy>
      Throws:
      IOException
    • fromJson

      public static IndexingPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.