code: public ListInstancesRequest withInstanceStates(InstanceState... instanceStates) {
          com.amazonaws.internal.SdkInternalList<String> instanceStatesCopy = new com.amazonaws.internal.SdkInternalList<String>(instanceStates.length);
          for (InstanceState value : instanceStates) {
              instanceStatesCopy.add(value.toString());
          }
          if (getInstanceStates() == null) {
              setInstanceStates(instanceStatesCopy);
          } else {
              getInstanceStates().addAll(instanceStatesCopy);
          }
          return this;
      }
docs: <p>
  A list of instance states that will filter the instances returned with this request.
  </p>
  
  @param instanceStates
  A list of instance states that will filter the instances returned with this request.
  @return Returns a reference to this object so that method calls can be chained together.
  @see InstanceState