Partager via


Indexes Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.Indexes

Implements

public final class Indexes
implements JsonSerializable<Indexes>

The indexes for the path.

Constructor Summary

Constructor Description
Indexes()

Creates an instance of Indexes class.

Method Summary

Modifier and Type Method and Description
DataType dataType()

Get the dataType property: The datatype for which the indexing behavior is applied to.

static Indexes fromJson(JsonReader jsonReader)

Reads an instance of Indexes from the JsonReader.

IndexKind kind()

Get the kind property: Indicates the type of index.

Integer precision()

Get the precision property: The precision of the index.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Indexes withDataType(DataType dataType)

Set the dataType property: The datatype for which the indexing behavior is applied to.

Indexes withKind(IndexKind kind)

Set the kind property: Indicates the type of index.

Indexes withPrecision(Integer precision)

Set the precision property: The precision of the index.

Methods inherited from java.lang.Object

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.

fromJson

public static Indexes fromJson(JsonReader jsonReader)

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.

kind

public IndexKind kind()

Get the kind property: Indicates the type of index.

Returns:

the kind value.

precision

public Integer precision()

Get the precision property: The precision of the index. -1 is maximum precision.

Returns:

the precision value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

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.

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.

Applies to