MongoDbCollectionSettings Class

  • java.lang.Object
    • com.azure.resourcemanager.datamigration.models.MongoDbCollectionSettings

Implements

public final class MongoDbCollectionSettings
implements JsonSerializable<MongoDbCollectionSettings>

Describes how an individual MongoDB collection should be migrated.

Constructor Summary

Constructor Description
MongoDbCollectionSettings()

Creates an instance of MongoDbCollectionSettings class.

Method Summary

Modifier and Type Method and Description
Boolean canDelete()

Get the canDelete property: Whether the migrator is allowed to drop the target collection in the course of performing a migration.

static MongoDbCollectionSettings fromJson(JsonReader jsonReader)

Reads an instance of MongoDbCollectionSettings from the JsonReader.

MongoDbShardKeySetting shardKey()

Get the shardKey property: Describes a MongoDB shard key.

Integer targetRUs()

Get the targetRUs property: The RUs that should be configured on a CosmosDB target, or null to use the default.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MongoDbCollectionSettings withCanDelete(Boolean canDelete)

Set the canDelete property: Whether the migrator is allowed to drop the target collection in the course of performing a migration.

MongoDbCollectionSettings withShardKey(MongoDbShardKeySetting shardKey)

Set the shardKey property: Describes a MongoDB shard key.

MongoDbCollectionSettings withTargetRUs(Integer targetRUs)

Set the targetRUs property: The RUs that should be configured on a CosmosDB target, or null to use the default.

Methods inherited from java.lang.Object

Constructor Details

MongoDbCollectionSettings

public MongoDbCollectionSettings()

Creates an instance of MongoDbCollectionSettings class.

Method Details

canDelete

public Boolean canDelete()

Get the canDelete property: Whether the migrator is allowed to drop the target collection in the course of performing a migration. The default is true.

Returns:

the canDelete value.

fromJson

public static MongoDbCollectionSettings fromJson(JsonReader jsonReader)

Reads an instance of MongoDbCollectionSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

shardKey

public MongoDbShardKeySetting shardKey()

Get the shardKey property: Describes a MongoDB shard key.

Returns:

the shardKey value.

targetRUs

public Integer targetRUs()

Get the targetRUs property: The RUs that should be configured on a CosmosDB target, or null to use the default. This has no effect on non-CosmosDB targets.

Returns:

the targetRUs value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCanDelete

public MongoDbCollectionSettings withCanDelete(Boolean canDelete)

Set the canDelete property: Whether the migrator is allowed to drop the target collection in the course of performing a migration. The default is true.

Parameters:

canDelete - the canDelete value to set.

Returns:

the MongoDbCollectionSettings object itself.

withShardKey

public MongoDbCollectionSettings withShardKey(MongoDbShardKeySetting shardKey)

Set the shardKey property: Describes a MongoDB shard key.

Parameters:

shardKey - the shardKey value to set.

Returns:

the MongoDbCollectionSettings object itself.

withTargetRUs

public MongoDbCollectionSettings withTargetRUs(Integer targetRUs)

Set the targetRUs property: The RUs that should be configured on a CosmosDB target, or null to use the default. This has no effect on non-CosmosDB targets.

Parameters:

targetRUs - the targetRUs value to set.

Returns:

the MongoDbCollectionSettings object itself.

Applies to