/* 
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

package dev.plexapi.sdk.models.operations;

import dev.plexapi.sdk.utils.Utils;
import java.util.Optional;

public class GetPlaylistsRequestBuilder {

    private Optional<? extends PlaylistType> playlistType = Optional.empty();
    private Optional<? extends QueryParamSmart> smart = Optional.empty();
    private final SDKMethodInterfaces.MethodCallGetPlaylists sdk;

    public GetPlaylistsRequestBuilder(SDKMethodInterfaces.MethodCallGetPlaylists sdk) {
        this.sdk = sdk;
    }
                
    public GetPlaylistsRequestBuilder playlistType(PlaylistType playlistType) {
        Utils.checkNotNull(playlistType, "playlistType");
        this.playlistType = Optional.of(playlistType);
        return this;
    }

    public GetPlaylistsRequestBuilder playlistType(Optional<? extends PlaylistType> playlistType) {
        Utils.checkNotNull(playlistType, "playlistType");
        this.playlistType = playlistType;
        return this;
    }
                
    public GetPlaylistsRequestBuilder smart(QueryParamSmart smart) {
        Utils.checkNotNull(smart, "smart");
        this.smart = Optional.of(smart);
        return this;
    }

    public GetPlaylistsRequestBuilder smart(Optional<? extends QueryParamSmart> smart) {
        Utils.checkNotNull(smart, "smart");
        this.smart = smart;
        return this;
    }

    public GetPlaylistsResponse call() throws Exception {

        return sdk.getPlaylists(
            playlistType,
            smart);
    }
}
