java.lang.Object
com.azure.resourcemanager.cosmos.models.Indexes
All Implemented Interfaces:
com.azure.json.JsonSerializable<Indexes>

public final class Indexes extends Object implements com.azure.json.JsonSerializable<Indexes>
The indexes for the path.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Indexes class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the dataType property: The datatype for which the indexing behavior is applied to.
    static Indexes
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Indexes from the JsonReader.
    Get the kind property: Indicates the type of index.
    Get the precision property: The precision of the index. -1 is maximum precision.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the dataType property: The datatype for which the indexing behavior is applied to.
    Set the kind property: Indicates the type of index.
    Set the precision property: The precision of the index. -1 is maximum precision.

    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

    • Indexes

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

    • dataType

      public DataType dataType()
      Get the dataType property: The datatype for which the indexing behavior is applied to.
      Returns:
      the dataType value.
    • withDataType

      public Indexes withDataType(DataType dataType)
      Set the dataType property: The datatype for which the indexing behavior is applied to.
      Parameters:
      dataType - the dataType value to set.
      Returns:
      the Indexes object itself.
    • precision

      public Integer precision()
      Get the precision property: The precision of the index. -1 is maximum precision.
      Returns:
      the precision value.
    • withPrecision

      public Indexes withPrecision(Integer precision)
      Set the precision property: The precision of the index. -1 is maximum precision.
      Parameters:
      precision - the precision value to set.
      Returns:
      the Indexes object itself.
    • kind

      public IndexKind kind()
      Get the kind property: Indicates the type of index.
      Returns:
      the kind value.
    • withKind

      public Indexes withKind(IndexKind kind)
      Set the kind property: Indicates the type of index.
      Parameters:
      kind - the kind value to set.
      Returns:
      the Indexes 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<Indexes>
      Throws:
      IOException
    • fromJson

      public static Indexes fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Indexes from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Indexes 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 Indexes.