MongoDbCollectionSettings Class
- java.
lang. Object - com.
azure. resourcemanager. datamigration. models. MongoDbCollectionSettings
- com.
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 Mongo |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Boolean |
canDelete()
Get the can |
|
static
Mongo |
fromJson(JsonReader jsonReader)
Reads an instance of Mongo |
|
Mongo |
shardKey()
Get the shard |
| Integer |
targetRUs()
Get the target |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Mongo |
withCanDelete(Boolean canDelete)
Set the can |
|
Mongo |
withShardKey(MongoDbShardKeySetting shardKey)
Set the shard |
|
Mongo |
withTargetRUs(Integer targetRUs)
Set the target |
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:
fromJson
public static MongoDbCollectionSettings fromJson(JsonReader jsonReader)
Reads an instance of MongoDbCollectionSettings from the JsonReader.
Parameters:
Returns:
Throws:
shardKey
public MongoDbShardKeySetting shardKey()
Get the shardKey property: Describes a MongoDB shard key.
Returns:
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:
toJson
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:
Returns:
withShardKey
public MongoDbCollectionSettings withShardKey(MongoDbShardKeySetting shardKey)
Set the shardKey property: Describes a MongoDB shard key.
Parameters:
Returns:
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:
Returns: