MongoDBDatabaseCreateUpdateProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.fluent.models.MongoDBDatabaseCreateUpdateProperties

Implements

public final class MongoDBDatabaseCreateUpdateProperties
implements JsonSerializable<MongoDBDatabaseCreateUpdateProperties>

Properties to create and update Azure Cosmos DB MongoDB database.

Constructor Summary

Constructor Description
MongoDBDatabaseCreateUpdateProperties()

Creates an instance of MongoDBDatabaseCreateUpdateProperties class.

Method Summary

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

Reads an instance of MongoDBDatabaseCreateUpdateProperties from the JsonReader.

CreateUpdateOptions options()

Get the options property: A key-value pair of options to be applied for the request.

MongoDBDatabaseResource resource()

Get the resource property: The standard JSON format of a MongoDB database.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MongoDBDatabaseCreateUpdateProperties withOptions(CreateUpdateOptions options)

Set the options property: A key-value pair of options to be applied for the request.

MongoDBDatabaseCreateUpdateProperties withResource(MongoDBDatabaseResource resource)

Set the resource property: The standard JSON format of a MongoDB database.

Methods inherited from java.lang.Object

Constructor Details

MongoDBDatabaseCreateUpdateProperties

public MongoDBDatabaseCreateUpdateProperties()

Creates an instance of MongoDBDatabaseCreateUpdateProperties class.

Method Details

fromJson

public static MongoDBDatabaseCreateUpdateProperties fromJson(JsonReader jsonReader)

Reads an instance of MongoDBDatabaseCreateUpdateProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MongoDBDatabaseCreateUpdateProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

options

public CreateUpdateOptions options()

Get the options property: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

Returns:

the options value.

resource

public MongoDBDatabaseResource resource()

Get the resource property: The standard JSON format of a MongoDB database.

Returns:

the resource value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withOptions

public MongoDBDatabaseCreateUpdateProperties withOptions(CreateUpdateOptions options)

Set the options property: A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

Parameters:

options - the options value to set.

Returns:

the MongoDBDatabaseCreateUpdateProperties object itself.

withResource

public MongoDBDatabaseCreateUpdateProperties withResource(MongoDBDatabaseResource resource)

Set the resource property: The standard JSON format of a MongoDB database.

Parameters:

resource - the resource value to set.

Returns:

the MongoDBDatabaseCreateUpdateProperties object itself.

Applies to