public JobFlowInstancesConfig withInstanceFleets(InstanceFleetConfig... instanceFleets) {
        if (this.instanceFleets == null) {
            setInstanceFleets(new com.amazonaws.internal.SdkInternalList<InstanceFleetConfig>(instanceFleets.length));
        }
        for (InstanceFleetConfig ele : instanceFleets) {
            this.instanceFleets.add(ele);
        }
        return this;
    }
public JobFlowInstancesConfig withInstanceFleets ( InstanceFleetConfig ... instanceFleets ) { if ( this . instanceFleets == null ) { setInstanceFleets ( new com . amazonaws . internal . SdkInternalList < InstanceFleetConfig > ( instanceFleets . length ) ) ; } for ( InstanceFleetConfig ele : instanceFleets ) { this . instanceFleets . add ( ele ) ; } return this ; }
<note>
<p>
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x
versions.
</p>
</note>
<p>
Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setInstanceFleets(java.util.Collection)} or {@link #withInstanceFleets(java.util.Collection)} if you want
to override the existing values.
</p>

@param instanceFleets
<p>
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x
versions.
</p>
</note>
<p>
Describes the EC2 instances and instance configurations for clusters that use the instance fleet
configuration.
@return Returns a reference to this object so that method calls can be chained together.