MongoDBCollectionCreateUpdateProperties Class

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

Implements

public final class MongoDBCollectionCreateUpdateProperties
implements JsonSerializable<MongoDBCollectionCreateUpdateProperties>

Properties to create and update Azure Cosmos DB MongoDB collection.

Constructor Summary

Constructor Description
MongoDBCollectionCreateUpdateProperties()

Creates an instance of MongoDBCollectionCreateUpdateProperties class.

Method Summary

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

Reads an instance of MongoDBCollectionCreateUpdateProperties from the JsonReader.

CreateUpdateOptions options()

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

MongoDBCollectionResource resource()

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

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MongoDBCollectionCreateUpdateProperties withOptions(CreateUpdateOptions options)

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

MongoDBCollectionCreateUpdateProperties withResource(MongoDBCollectionResource resource)

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

Methods inherited from java.lang.Object

Constructor Details

MongoDBCollectionCreateUpdateProperties

public MongoDBCollectionCreateUpdateProperties()

Creates an instance of MongoDBCollectionCreateUpdateProperties class.

Method Details

fromJson

public static MongoDBCollectionCreateUpdateProperties fromJson(JsonReader jsonReader)

Reads an instance of MongoDBCollectionCreateUpdateProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MongoDBCollectionCreateUpdateProperties 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 MongoDBCollectionResource resource()

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

Returns:

the resource value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withOptions

public MongoDBCollectionCreateUpdateProperties 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 MongoDBCollectionCreateUpdateProperties object itself.

withResource

public MongoDBCollectionCreateUpdateProperties withResource(MongoDBCollectionResource resource)

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

Parameters:

resource - the resource value to set.

Returns:

the MongoDBCollectionCreateUpdateProperties object itself.

Applies to