/* 
 * 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.String;
import java.util.Optional;

public class GetWatchListRequestBuilder {

    private GetWatchListRequest request;
    private Optional<String> serverURL = Optional.empty();
    private final SDKMethodInterfaces.MethodCallGetWatchList sdk;

    public GetWatchListRequestBuilder(SDKMethodInterfaces.MethodCallGetWatchList sdk) {
        this.sdk = sdk;
    }

    public GetWatchListRequestBuilder request(GetWatchListRequest request) {
        Utils.checkNotNull(request, "request");
        this.request = request;
        return this;
    }
                
    public GetWatchListRequestBuilder serverURL(String serverURL) {
        Utils.checkNotNull(serverURL, "serverURL");
        this.serverURL = Optional.of(serverURL);
        return this;
    }

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

    public GetWatchListResponse call() throws Exception {

        return sdk.getWatchList(
            request,
            serverURL);
    }
}
