<p>
Filters the results by the specified instance types.
</p>

@param instanceTypes
Filters the results by the specified instance types.
@see InstanceType
183161
public void setInstanceTypes(java.util.Collection<String> instanceTypes) {
        if (instanceTypes == null) {
            this.instanceTypes = null;
            return;
        }

        this.instanceTypes = new com.amazonaws.internal.SdkInternalList<String>(instanceTypes);
    }
412880
public void setFindingTypes(java.util.Collection<String> findingTypes) {
        if (findingTypes == null) {
            this.findingTypes = null;
            return;
        }

        this.findingTypes = new java.util.ArrayList<String>(findingTypes);
    }
16136
public void setInstanceSnapshots(java.util.Collection<InstanceSnapshot> instanceSnapshots) {
        if (instanceSnapshots == null) {
            this.instanceSnapshots = null;
            return;
        }

        this.instanceSnapshots = new java.util.ArrayList<InstanceSnapshot>(instanceSnapshots);
    }
414975
public void addSubtypes(NamedType... subtypes) {

    if (this.subtypeList == null) {
      this.subtypeList = new ArrayList<>();
    }
    this.subtypeList.addAll(Arrays.asList(subtypes));
  }
1256884
public List<InstanceStateChangeType> stopInstances(final Set<String> instanceIDs) {

        List<InstanceStateChangeType> ret = new ArrayList<InstanceStateChangeType>();

        Collection<AbstractMockEc2Instance> instances = getInstances(instanceIDs);
        for (AbstractMockEc2Instance instance : instances) {
            if (null != instance) {
                InstanceStateChangeType stateChange = new InstanceStateChangeType();
                stateChange.setInstanceId(instance.getInstanceID());

                InstanceStateType previousState = new InstanceStateType();
                previousState.setCode(instance.getInstanceState().getCode());
                previousState.setName(instance.getInstanceState().getName());
                stateChange.setPreviousState(previousState);

                instance.stop();

                InstanceStateType newState = new InstanceStateType();
                newState.setCode(instance.getInstanceState().getCode());
                newState.setName(instance.getInstanceState().getName());
                stateChange.setCurrentState(newState);

                ret.add(stateChange);
            }
        }

        return ret;

    }
429647
public void setInstanceProfiles(java.util.Collection<InstanceProfile> instanceProfiles) {
        if (instanceProfiles == null) {
            this.instanceProfiles = null;
            return;
        }

        this.instanceProfiles = new com.amazonaws.internal.SdkInternalList<InstanceProfile>(instanceProfiles);
    }
1095264
public void setTypes(@NonNull String[] types) {
      this.types = Arrays.stream(types)
                         .map(Types::from)
                         .toArray(AnnotatableType[]::new);
   }
379597
public void setInstanceStatuses(java.util.Collection<InstanceStatus> instanceStatuses) {
        if (instanceStatuses == null) {
            this.instanceStatuses = null;
            return;
        }

        this.instanceStatuses = new com.amazonaws.internal.SdkInternalList<InstanceStatus>(instanceStatuses);
    }
1364705
public java.util.List<String> getInstanceGroupTypes() {
        if (instanceGroupTypes == null) {
            instanceGroupTypes = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instanceGroupTypes;
    }
359519
public void setInstanceNames(java.util.Collection<String> instanceNames) {
        if (instanceNames == null) {
            this.instanceNames = null;
            return;
        }

        this.instanceNames = new com.amazonaws.internal.SdkInternalList<String>(instanceNames);
    }
181396
public java.util.List<InstanceTypeConfig> getInstanceTypeConfigs() {
        if (instanceTypeConfigs == null) {
            instanceTypeConfigs = new com.amazonaws.internal.SdkInternalList<InstanceTypeConfig>();
        }
        return instanceTypeConfigs;
    }
847975
private Collection<AbstractMockEc2Instance> getInstances(final Set<String> instanceIDs) {
        Collection<AbstractMockEc2Instance> ret = new ArrayList<AbstractMockEc2Instance>();
        for (String instanceID : instanceIDs) {
            ret.add(getMockEc2Instance(instanceID));
        }
        return ret;
    }
875215
public void setSupportedTrainingInstanceTypes(java.util.Collection<String> supportedTrainingInstanceTypes) {
        if (supportedTrainingInstanceTypes == null) {
            this.supportedTrainingInstanceTypes = null;
            return;
        }

        this.supportedTrainingInstanceTypes = new java.util.ArrayList<String>(supportedTrainingInstanceTypes);
    }
371154
public void setFilters(java.util.Collection<Filter> filters) {
        if (filters == null) {
            this.filters = null;
            return;
        }

        this.filters = new java.util.ArrayList<Filter>(filters);
    }
748846
public void setInstanceProfileList(java.util.Collection<InstanceProfile> instanceProfileList) {
        if (instanceProfileList == null) {
            this.instanceProfileList = null;
            return;
        }

        this.instanceProfileList = new com.amazonaws.internal.SdkInternalList<InstanceProfile>(instanceProfileList);
    }
39140
public void setSubscriptionFilters(java.util.Collection<SubscriptionFilter> subscriptionFilters) {
        if (subscriptionFilters == null) {
            this.subscriptionFilters = null;
            return;
        }

        this.subscriptionFilters = new com.amazonaws.internal.SdkInternalList<SubscriptionFilter>(subscriptionFilters);
    }
1082147
public void setStoppingInstances(java.util.Collection<InstanceStateChange> stoppingInstances) {
        if (stoppingInstances == null) {
            this.stoppingInstances = null;
            return;
        }

        this.stoppingInstances = new com.amazonaws.internal.SdkInternalList<InstanceStateChange>(stoppingInstances);
    }