public PutRecommendationPreferencesRequest withPreferredResources(PreferredResource... preferredResources) {
        if (this.preferredResources == null) {
            setPreferredResources(new java.util.ArrayList<PreferredResource>(preferredResources.length));
        }
        for (PreferredResource ele : preferredResources) {
            this.preferredResources.add(ele);
        }
        return this;
    }
<p>
The preference to control which resource type values are considered when generating rightsizing recommendations.
You can specify this preference as a combination of include and exclude lists. You must specify either an
<code>includeList</code> or <code>excludeList</code>. If the preference is an empty set of resource type values,
an error occurs.
</p>
<note>
<p>
You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.
</p>
</note>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setPreferredResources(java.util.Collection)} or {@link #withPreferredResources(java.util.Collection)} if
you want to override the existing values.
</p>

@param preferredResources
       The preference to control which resource type values are considered when generating rightsizing
       recommendations. You can specify this preference as a combination of include and exclude lists. You must
       specify either an <code>includeList</code> or <code>excludeList</code>. If the preference is an empty set
       of resource type values, an error occurs. </p> <note>
       <p>
       You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-computeoptimizer/src/main/java/com/amazonaws/services/computeoptimizer/model/PutRecommendationPreferencesRequest.java