code: public ListInstancesRequest withInstanceGroupTypes(String... instanceGroupTypes) {
          if (this.instanceGroupTypes == null) {
              setInstanceGroupTypes(new com.amazonaws.internal.SdkInternalList<String>(instanceGroupTypes.length));
          }
          for (String ele : instanceGroupTypes) {
              this.instanceGroupTypes.add(ele);
          }
          return this;
      }
docs: <p>
  The type of instance group for which to list the instances.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setInstanceGroupTypes(java.util.Collection)} or {@link #withInstanceGroupTypes(java.util.Collection)} if
  you want to override the existing values.
  </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