CreateShardKey constructor

CreateShardKey({
  1. ShardKey? shardKey,
  2. int? shardsNumber,
  3. int? replicationFactor,
  4. Iterable<Int64>? placement,
})

Implementation

factory CreateShardKey({
  ShardKey? shardKey,
  $core.int? shardsNumber,
  $core.int? replicationFactor,
  $core.Iterable<$fixnum.Int64>? placement,
}) {
  final $result = create();
  if (shardKey != null) {
    $result.shardKey = shardKey;
  }
  if (shardsNumber != null) {
    $result.shardsNumber = shardsNumber;
  }
  if (replicationFactor != null) {
    $result.replicationFactor = replicationFactor;
  }
  if (placement != null) {
    $result.placement.addAll(placement);
  }
  return $result;
}