public Cluster withShards(java.util.Collection<Shard> shards) {
        setShards(shards);
        return this;
    }
<p>
The total number of shards in the cluster.
</p>

@param shards
       The total number of shards in the cluster.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-docdbelastic/src/main/java/com/amazonaws/services/docdbelastic/model/Cluster.java