public CreateDataSourceRequest withType(String type) {
        setType(type);
        return this;
    }
<p>
The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.
</p>
<p>
Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.
</p>

@param type
       The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.</p>
       <p>
       Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.
@return Returns a reference to this object so that method calls can be chained together.
@see DataSourceType
aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/CreateDataSourceRequest.java