Share via


MongoIndexKeys Class

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

Implements

public final class MongoIndexKeys
implements JsonSerializable<MongoIndexKeys>

Cosmos DB MongoDB collection resource object.

Constructor Summary

Constructor Description
MongoIndexKeys()

Creates an instance of MongoIndexKeys class.

Method Summary

Modifier and Type Method and Description
static MongoIndexKeys fromJson(JsonReader jsonReader)

Reads an instance of MongoIndexKeys from the JsonReader.

List<String> keys()

Get the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MongoIndexKeys withKeys(List<String> keys)

Set the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.

Methods inherited from java.lang.Object

Constructor Details

MongoIndexKeys

public MongoIndexKeys()

Creates an instance of MongoIndexKeys class.

Method Details

fromJson

public static MongoIndexKeys fromJson(JsonReader jsonReader)

Reads an instance of MongoIndexKeys from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MongoIndexKeys 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 MongoIndexKeys.

keys

public List<String> keys()

Get the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.

Returns:

the keys value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withKeys

public MongoIndexKeys withKeys(List<String> keys)

Set the keys property: List of keys for each MongoDB collection in the Azure Cosmos DB service.

Parameters:

keys - the keys value to set.

Returns:

the MongoIndexKeys object itself.

Applies to