code: public void setNodeGroups(java.util.Collection<NodeGroup> nodeGroups) {
          if (nodeGroups == null) {
              this.nodeGroups = null;
              return;
          }
  
          this.nodeGroups = new com.amazonaws.internal.SdkInternalList<NodeGroup>(nodeGroups);
      }
docs: <p>
  A list of node groups in this replication group. For Redis (cluster mode disabled) replication groups, this is a
  single-element list. For Redis (cluster mode enabled) replication groups, the list contains an entry for each
  node group (shard).
  </p>
  
  @param nodeGroups
  A list of node groups in this replication group. For Redis (cluster mode disabled) replication groups,
  this is a single-element list. For Redis (cluster mode enabled) replication groups, the list contains an
  entry for each node group (shard).