code: public ListInstancesRequest withInstanceGroupTypes(InstanceGroupType... instanceGroupTypes) {
          com.amazonaws.internal.SdkInternalList<String> instanceGroupTypesCopy = new com.amazonaws.internal.SdkInternalList<String>(instanceGroupTypes.length);
          for (InstanceGroupType value : instanceGroupTypes) {
              instanceGroupTypesCopy.add(value.toString());
          }
          if (getInstanceGroupTypes() == null) {
              setInstanceGroupTypes(instanceGroupTypesCopy);
          } else {
              getInstanceGroupTypes().addAll(instanceGroupTypesCopy);
          }
          return this;
      }
docs: <p>
  The type of instance group for which to list the instances.
  </p>
  
  @param instanceGroupTypes
  The type of instance group for which to list the instances.
  @return Returns a reference to this object so that method calls can be chained together.
  @see InstanceGroupType