public ListModelPackagesRequest withModelPackageType(ModelPackageType modelPackageType) {
        this.modelPackageType = modelPackageType.toString();
        return this;
    }
<p>
A filter that returns only the model packages of the specified type. This can be one of the following values.
</p>
<ul>
<li>
<p>
<code>UNVERSIONED</code> - List only unversioined models. This is the default value if no
<code>ModelPackageType</code> is specified.
</p>
</li>
<li>
<p>
<code>VERSIONED</code> - List only versioned models.
</p>
</li>
<li>
<p>
<code>BOTH</code> - List both versioned and unversioned models.
</p>
</li>
</ul>

@param modelPackageType
       A filter that returns only the model packages of the specified type. This can be one of the following
       values.</p>
       <ul>
       <li>
       <p>
       <code>UNVERSIONED</code> - List only unversioined models. This is the default value if no
       <code>ModelPackageType</code> is specified.
       </p>
       </li>
       <li>
       <p>
       <code>VERSIONED</code> - List only versioned models.
       </p>
       </li>
       <li>
       <p>
       <code>BOTH</code> - List both versioned and unversioned models.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
@see ModelPackageType
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/ListModelPackagesRequest.java