public Snapshot withNumNodeGroups(Integer numNodeGroups) {
        setNumNodeGroups(numNodeGroups);
        return this;
    }
<p>
The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of node groups
(shards) in the snapshot and in the restored replication group must be the same.
</p>

@param numNodeGroups
       The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of node
       groups (shards) in the snapshot and in the restored replication group must be the same.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/model/Snapshot.java