MongoDbShardKeySetting Class
- java.
lang. Object - com.
azure. resourcemanager. datamigration. models. MongoDbShardKeySetting
- com.
Implements
public final class MongoDbShardKeySetting
implements JsonSerializable<MongoDbShardKeySetting>
Describes a MongoDB shard key.
Constructor Summary
| Constructor | Description |
|---|---|
| MongoDbShardKeySetting() |
Creates an instance of Mongo |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
List<Mongo |
fields()
Get the fields property: The fields within the shard key. |
|
static
Mongo |
fromJson(JsonReader jsonReader)
Reads an instance of Mongo |
| Boolean |
isUnique()
Get the is |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Mongo |
withFields(List<MongoDbShardKeyField> fields)
Set the fields property: The fields within the shard key. |
|
Mongo |
withIsUnique(Boolean isUnique)
Set the is |
Methods inherited from java.lang.Object
Constructor Details
MongoDbShardKeySetting
public MongoDbShardKeySetting()
Creates an instance of MongoDbShardKeySetting class.
Method Details
fields
public List<MongoDbShardKeyField> fields()
Get the fields property: The fields within the shard key.
Returns:
fromJson
public static MongoDbShardKeySetting fromJson(JsonReader jsonReader)
Reads an instance of MongoDbShardKeySetting from the JsonReader.
Parameters:
Returns:
Throws:
isUnique
public Boolean isUnique()
Get the isUnique property: Whether the shard key is unique.
Returns:
toJson
validate
public void validate()
Validates the instance.
withFields
public MongoDbShardKeySetting withFields(List<MongoDbShardKeyField> fields)
Set the fields property: The fields within the shard key.
Parameters:
Returns:
withIsUnique
public MongoDbShardKeySetting withIsUnique(Boolean isUnique)
Set the isUnique property: Whether the shard key is unique.
Parameters:
Returns: