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

    private Optional<String> xPlexClientIdentifier = Optional.empty();
    private Optional<? extends PostUsersSignInDataRequestBody> requestBody = Optional.empty();
    private Optional<String> serverURL = Optional.empty();
    private final SDKMethodInterfaces.MethodCallPostUsersSignInData sdk;

    public PostUsersSignInDataRequestBuilder(SDKMethodInterfaces.MethodCallPostUsersSignInData sdk) {
        this.sdk = sdk;
    }
                
    public PostUsersSignInDataRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) {
        Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier");
        this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier);
        return this;
    }

    public PostUsersSignInDataRequestBuilder xPlexClientIdentifier(java.util.Optional<java.lang.String> xPlexClientIdentifier) {
        Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier");
        this.xPlexClientIdentifier = xPlexClientIdentifier;
        return this;
    }
                
    public PostUsersSignInDataRequestBuilder requestBody(dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody requestBody) {
        Utils.checkNotNull(requestBody, "requestBody");
        this.requestBody = Optional.of(requestBody);
        return this;
    }

    public PostUsersSignInDataRequestBuilder requestBody(java.util.Optional<? extends dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody> requestBody) {
        Utils.checkNotNull(requestBody, "requestBody");
        this.requestBody = requestBody;
        return this;
    }
                
    public PostUsersSignInDataRequestBuilder serverURL(java.lang.String serverURL) {
        Utils.checkNotNull(serverURL, "serverURL");
        this.serverURL = Optional.of(serverURL);
        return this;
    }

    public PostUsersSignInDataRequestBuilder serverURL(java.util.Optional<java.lang.String> serverURL) {
        Utils.checkNotNull(serverURL, "serverURL");
        this.serverURL = serverURL;
        return this;
    }

    public PostUsersSignInDataResponse call() throws Exception {

        return sdk.postUsersSignInData(
            xPlexClientIdentifier,
            requestBody,
            serverURL);
    }
}
