code: public ModifyReplicationGroupShardConfigurationRequest withNodeGroupsToRemove(String... nodeGroupsToRemove) {
          if (this.nodeGroupsToRemove == null) {
              setNodeGroupsToRemove(new com.amazonaws.internal.SdkInternalList<String>(nodeGroupsToRemove.length));
          }
          for (String ele : nodeGroupsToRemove) {
              this.nodeGroupsToRemove.add(ele);
          }
          return this;
      }
docs: <p>
  If the value of <code>NodeGroupCount</code> is less than the current number of node groups (shards), the
  <code>NodeGroupsToRemove</code> or <code>NodeGroupsToRetain</code> is a required list of node group ids to remove
  from or retain in the cluster.
  </p>
  <p>
  ElastiCache for Redis will attempt to remove all node groups listed by <code>NodeGroupsToRemove</code> from the
  cluster.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setNodeGroupsToRemove(java.util.Collection)} or {@link #withNodeGroupsToRemove(java.util.Collection)} if
  you want to override the existing values.
  </p>
  
  @param nodeGroupsToRemove
  If the value of <code>NodeGroupCount</code> is less than the current number of node groups (shards), the
  <code>NodeGroupsToRemove</code> or <code>NodeGroupsToRetain</code> is a required list of node group ids to
  remove from or retain in the cluster.</p>
  <p>
  ElastiCache for Redis will attempt to remove all node groups listed by <code>NodeGroupsToRemove</code>
  from the cluster.
  @return Returns a reference to this object so that method calls can be chained together.