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

package dev.plexapi.sdk.models.operations;

import dev.plexapi.sdk.utils.Utils;
import java.lang.Double;
import java.lang.String;
import java.util.Optional;

public class UpdatePlaylistRequestBuilder {

    private Double playlistID;
    private Optional<String> title = Optional.empty();
    private Optional<String> summary = Optional.empty();
    private final SDKMethodInterfaces.MethodCallUpdatePlaylist sdk;

    public UpdatePlaylistRequestBuilder(SDKMethodInterfaces.MethodCallUpdatePlaylist sdk) {
        this.sdk = sdk;
    }

    public UpdatePlaylistRequestBuilder playlistID(double playlistID) {
        Utils.checkNotNull(playlistID, "playlistID");
        this.playlistID = playlistID;
        return this;
    }
                
    public UpdatePlaylistRequestBuilder title(String title) {
        Utils.checkNotNull(title, "title");
        this.title = Optional.of(title);
        return this;
    }

    public UpdatePlaylistRequestBuilder title(Optional<String> title) {
        Utils.checkNotNull(title, "title");
        this.title = title;
        return this;
    }
                
    public UpdatePlaylistRequestBuilder summary(String summary) {
        Utils.checkNotNull(summary, "summary");
        this.summary = Optional.of(summary);
        return this;
    }

    public UpdatePlaylistRequestBuilder summary(Optional<String> summary) {
        Utils.checkNotNull(summary, "summary");
        this.summary = summary;
        return this;
    }

    public UpdatePlaylistResponse call() throws Exception {

        return sdk.updatePlaylist(
            playlistID,
            title,
            summary);
    }
}
