/* 
 * 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 AddPlaylistContentsRequestBuilder {

    private Double playlistID;
    private String uri;
    private Optional<Double> playQueueID = Optional.empty();
    private final SDKMethodInterfaces.MethodCallAddPlaylistContents sdk;

    public AddPlaylistContentsRequestBuilder(SDKMethodInterfaces.MethodCallAddPlaylistContents sdk) {
        this.sdk = sdk;
    }

    public AddPlaylistContentsRequestBuilder playlistID(double playlistID) {
        Utils.checkNotNull(playlistID, "playlistID");
        this.playlistID = playlistID;
        return this;
    }

    public AddPlaylistContentsRequestBuilder uri(String uri) {
        Utils.checkNotNull(uri, "uri");
        this.uri = uri;
        return this;
    }
                
    public AddPlaylistContentsRequestBuilder playQueueID(double playQueueID) {
        Utils.checkNotNull(playQueueID, "playQueueID");
        this.playQueueID = Optional.of(playQueueID);
        return this;
    }

    public AddPlaylistContentsRequestBuilder playQueueID(Optional<Double> playQueueID) {
        Utils.checkNotNull(playQueueID, "playQueueID");
        this.playQueueID = playQueueID;
        return this;
    }

    public AddPlaylistContentsResponse call() throws Exception {

        return sdk.addPlaylistContents(
            playlistID,
            uri,
            playQueueID);
    }
}
