MongoIndex Class

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

public final class MongoIndex

Cosmos DB MongoDB collection index key.

Constructor Summary

Constructor Description
MongoIndex()

Creates an instance of MongoIndex class.

Method Summary

Modifier and Type Method and Description
MongoIndexKeys key()

Get the key property: Cosmos DB MongoDB collection index keys.

MongoIndexOptions options()

Get the options property: Cosmos DB MongoDB collection index key options.

void validate()

Validates the instance.

MongoIndex withKey(MongoIndexKeys key)

Set the key property: Cosmos DB MongoDB collection index keys.

MongoIndex withOptions(MongoIndexOptions options)

Set the options property: Cosmos DB MongoDB collection index key options.

Methods inherited from java.lang.Object

Constructor Details

MongoIndex

public MongoIndex()

Creates an instance of MongoIndex class.

Method Details

key

public MongoIndexKeys key()

Get the key property: Cosmos DB MongoDB collection index keys.

Returns:

the key value.

options

public MongoIndexOptions options()

Get the options property: Cosmos DB MongoDB collection index key options.

Returns:

the options value.

validate

public void validate()

Validates the instance.

withKey

public MongoIndex withKey(MongoIndexKeys key)

Set the key property: Cosmos DB MongoDB collection index keys.

Parameters:

key - the key value to set.

Returns:

the MongoIndex object itself.

withOptions

public MongoIndex withOptions(MongoIndexOptions options)

Set the options property: Cosmos DB MongoDB collection index key options.

Parameters:

options - the options value to set.

Returns:

the MongoIndex object itself.

Applies to