public ListPoliciesForTargetRequest withFilter(PolicyType filter) {
        this.filter = filter.toString();
        return this;
    }
<p>
The type of policy that you want to include in the returned list. You must specify one of the following values:
</p>
<ul>
<li>
<p>
<a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">
AISERVICES_OPT_OUT_POLICY</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">
BACKUP_POLICY</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">
SERVICE_CONTROL_POLICY</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">
TAG_POLICY</a>
</p>
</li>
</ul>

@param filter
       The type of policy that you want to include in the returned list. You must specify one of the following
       values:</p>
       <ul>
       <li>
       <p>
       <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">
       AISERVICES_OPT_OUT_POLICY</a>
       </p>
       </li>
       <li>
       <p>
       <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">
       BACKUP_POLICY</a>
       </p>
       </li>
       <li>
       <p>
       <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">
       SERVICE_CONTROL_POLICY</a>
       </p>
       </li>
       <li>
       <p>
       <a
       href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html"
       >TAG_POLICY</a>
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
@see PolicyType
aws-java-sdk-organizations/src/main/java/com/amazonaws/services/organizations/model/ListPoliciesForTargetRequest.java