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

package dev.plexapi.sdk.models.operations;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import dev.plexapi.sdk.utils.SpeakeasyMetadata;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;


public class GetUsersRequest {

    /**
     * An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Client-Identifier")
    private String clientID;

    /**
     * The name of the client application. (Plex Web, Plex Media Server, etc.)
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Product")
    private Optional<String> clientName;

    /**
     * A relatively friendly name for the client device
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device")
    private Optional<String> deviceNickname;

    /**
     * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Name")
    private Optional<String> deviceName;

    /**
     * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Device-Screen-Resolution")
    private Optional<String> deviceScreenResolution;

    /**
     * The version of the client application.
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Version")
    private Optional<String> clientVersion;

    /**
     * The platform of the client application.
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform")
    private Optional<String> platform;

    /**
     * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Features")
    private Optional<String> clientFeatures;

    /**
     * A potentially less friendly identifier for the device model
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Model")
    private Optional<String> model;

    /**
     * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Session-Id")
    private Optional<String> xPlexSessionId;

    /**
     * The language of the client application.
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Language")
    private Optional<String> xPlexLanguage;

    /**
     * The version of the platform
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Platform-Version")
    private Optional<String> platformVersion;

    /**
     * An authentication token, obtained from plex.tv
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token")
    private String xPlexToken;

    @JsonCreator
    public GetUsersRequest(
            String clientID,
            Optional<String> clientName,
            Optional<String> deviceNickname,
            Optional<String> deviceName,
            Optional<String> deviceScreenResolution,
            Optional<String> clientVersion,
            Optional<String> platform,
            Optional<String> clientFeatures,
            Optional<String> model,
            Optional<String> xPlexSessionId,
            Optional<String> xPlexLanguage,
            Optional<String> platformVersion,
            String xPlexToken) {
        Utils.checkNotNull(clientID, "clientID");
        Utils.checkNotNull(clientName, "clientName");
        Utils.checkNotNull(deviceNickname, "deviceNickname");
        Utils.checkNotNull(deviceName, "deviceName");
        Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution");
        Utils.checkNotNull(clientVersion, "clientVersion");
        Utils.checkNotNull(platform, "platform");
        Utils.checkNotNull(clientFeatures, "clientFeatures");
        Utils.checkNotNull(model, "model");
        Utils.checkNotNull(xPlexSessionId, "xPlexSessionId");
        Utils.checkNotNull(xPlexLanguage, "xPlexLanguage");
        Utils.checkNotNull(platformVersion, "platformVersion");
        Utils.checkNotNull(xPlexToken, "xPlexToken");
        this.clientID = clientID;
        this.clientName = clientName;
        this.deviceNickname = deviceNickname;
        this.deviceName = deviceName;
        this.deviceScreenResolution = deviceScreenResolution;
        this.clientVersion = clientVersion;
        this.platform = platform;
        this.clientFeatures = clientFeatures;
        this.model = model;
        this.xPlexSessionId = xPlexSessionId;
        this.xPlexLanguage = xPlexLanguage;
        this.platformVersion = platformVersion;
        this.xPlexToken = xPlexToken;
    }
    
    public GetUsersRequest(
            String clientID,
            String xPlexToken) {
        this(clientID, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), xPlexToken);
    }

    /**
     * An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
     */
    @JsonIgnore
    public String clientID() {
        return clientID;
    }

    /**
     * The name of the client application. (Plex Web, Plex Media Server, etc.)
     */
    @JsonIgnore
    public Optional<String> clientName() {
        return clientName;
    }

    /**
     * A relatively friendly name for the client device
     */
    @JsonIgnore
    public Optional<String> deviceNickname() {
        return deviceNickname;
    }

    /**
     * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
     */
    @JsonIgnore
    public Optional<String> deviceName() {
        return deviceName;
    }

    /**
     * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
     */
    @JsonIgnore
    public Optional<String> deviceScreenResolution() {
        return deviceScreenResolution;
    }

    /**
     * The version of the client application.
     */
    @JsonIgnore
    public Optional<String> clientVersion() {
        return clientVersion;
    }

    /**
     * The platform of the client application.
     */
    @JsonIgnore
    public Optional<String> platform() {
        return platform;
    }

    /**
     * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
     */
    @JsonIgnore
    public Optional<String> clientFeatures() {
        return clientFeatures;
    }

    /**
     * A potentially less friendly identifier for the device model
     */
    @JsonIgnore
    public Optional<String> model() {
        return model;
    }

    /**
     * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
     */
    @JsonIgnore
    public Optional<String> xPlexSessionId() {
        return xPlexSessionId;
    }

    /**
     * The language of the client application.
     */
    @JsonIgnore
    public Optional<String> xPlexLanguage() {
        return xPlexLanguage;
    }

    /**
     * The version of the platform
     */
    @JsonIgnore
    public Optional<String> platformVersion() {
        return platformVersion;
    }

    /**
     * An authentication token, obtained from plex.tv
     */
    @JsonIgnore
    public String xPlexToken() {
        return xPlexToken;
    }

    public final static Builder builder() {
        return new Builder();
    }

    /**
     * An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
     */
    public GetUsersRequest withClientID(String clientID) {
        Utils.checkNotNull(clientID, "clientID");
        this.clientID = clientID;
        return this;
    }

    /**
     * The name of the client application. (Plex Web, Plex Media Server, etc.)
     */
    public GetUsersRequest withClientName(String clientName) {
        Utils.checkNotNull(clientName, "clientName");
        this.clientName = Optional.ofNullable(clientName);
        return this;
    }

    /**
     * The name of the client application. (Plex Web, Plex Media Server, etc.)
     */
    public GetUsersRequest withClientName(Optional<String> clientName) {
        Utils.checkNotNull(clientName, "clientName");
        this.clientName = clientName;
        return this;
    }

    /**
     * A relatively friendly name for the client device
     */
    public GetUsersRequest withDeviceNickname(String deviceNickname) {
        Utils.checkNotNull(deviceNickname, "deviceNickname");
        this.deviceNickname = Optional.ofNullable(deviceNickname);
        return this;
    }

    /**
     * A relatively friendly name for the client device
     */
    public GetUsersRequest withDeviceNickname(Optional<String> deviceNickname) {
        Utils.checkNotNull(deviceNickname, "deviceNickname");
        this.deviceNickname = deviceNickname;
        return this;
    }

    /**
     * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
     */
    public GetUsersRequest withDeviceName(String deviceName) {
        Utils.checkNotNull(deviceName, "deviceName");
        this.deviceName = Optional.ofNullable(deviceName);
        return this;
    }

    /**
     * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
     */
    public GetUsersRequest withDeviceName(Optional<String> deviceName) {
        Utils.checkNotNull(deviceName, "deviceName");
        this.deviceName = deviceName;
        return this;
    }

    /**
     * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
     */
    public GetUsersRequest withDeviceScreenResolution(String deviceScreenResolution) {
        Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution");
        this.deviceScreenResolution = Optional.ofNullable(deviceScreenResolution);
        return this;
    }

    /**
     * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
     */
    public GetUsersRequest withDeviceScreenResolution(Optional<String> deviceScreenResolution) {
        Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution");
        this.deviceScreenResolution = deviceScreenResolution;
        return this;
    }

    /**
     * The version of the client application.
     */
    public GetUsersRequest withClientVersion(String clientVersion) {
        Utils.checkNotNull(clientVersion, "clientVersion");
        this.clientVersion = Optional.ofNullable(clientVersion);
        return this;
    }

    /**
     * The version of the client application.
     */
    public GetUsersRequest withClientVersion(Optional<String> clientVersion) {
        Utils.checkNotNull(clientVersion, "clientVersion");
        this.clientVersion = clientVersion;
        return this;
    }

    /**
     * The platform of the client application.
     */
    public GetUsersRequest withPlatform(String platform) {
        Utils.checkNotNull(platform, "platform");
        this.platform = Optional.ofNullable(platform);
        return this;
    }

    /**
     * The platform of the client application.
     */
    public GetUsersRequest withPlatform(Optional<String> platform) {
        Utils.checkNotNull(platform, "platform");
        this.platform = platform;
        return this;
    }

    /**
     * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
     */
    public GetUsersRequest withClientFeatures(String clientFeatures) {
        Utils.checkNotNull(clientFeatures, "clientFeatures");
        this.clientFeatures = Optional.ofNullable(clientFeatures);
        return this;
    }

    /**
     * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
     */
    public GetUsersRequest withClientFeatures(Optional<String> clientFeatures) {
        Utils.checkNotNull(clientFeatures, "clientFeatures");
        this.clientFeatures = clientFeatures;
        return this;
    }

    /**
     * A potentially less friendly identifier for the device model
     */
    public GetUsersRequest withModel(String model) {
        Utils.checkNotNull(model, "model");
        this.model = Optional.ofNullable(model);
        return this;
    }

    /**
     * A potentially less friendly identifier for the device model
     */
    public GetUsersRequest withModel(Optional<String> model) {
        Utils.checkNotNull(model, "model");
        this.model = model;
        return this;
    }

    /**
     * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
     */
    public GetUsersRequest withXPlexSessionId(String xPlexSessionId) {
        Utils.checkNotNull(xPlexSessionId, "xPlexSessionId");
        this.xPlexSessionId = Optional.ofNullable(xPlexSessionId);
        return this;
    }

    /**
     * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
     */
    public GetUsersRequest withXPlexSessionId(Optional<String> xPlexSessionId) {
        Utils.checkNotNull(xPlexSessionId, "xPlexSessionId");
        this.xPlexSessionId = xPlexSessionId;
        return this;
    }

    /**
     * The language of the client application.
     */
    public GetUsersRequest withXPlexLanguage(String xPlexLanguage) {
        Utils.checkNotNull(xPlexLanguage, "xPlexLanguage");
        this.xPlexLanguage = Optional.ofNullable(xPlexLanguage);
        return this;
    }

    /**
     * The language of the client application.
     */
    public GetUsersRequest withXPlexLanguage(Optional<String> xPlexLanguage) {
        Utils.checkNotNull(xPlexLanguage, "xPlexLanguage");
        this.xPlexLanguage = xPlexLanguage;
        return this;
    }

    /**
     * The version of the platform
     */
    public GetUsersRequest withPlatformVersion(String platformVersion) {
        Utils.checkNotNull(platformVersion, "platformVersion");
        this.platformVersion = Optional.ofNullable(platformVersion);
        return this;
    }

    /**
     * The version of the platform
     */
    public GetUsersRequest withPlatformVersion(Optional<String> platformVersion) {
        Utils.checkNotNull(platformVersion, "platformVersion");
        this.platformVersion = platformVersion;
        return this;
    }

    /**
     * An authentication token, obtained from plex.tv
     */
    public GetUsersRequest withXPlexToken(String xPlexToken) {
        Utils.checkNotNull(xPlexToken, "xPlexToken");
        this.xPlexToken = xPlexToken;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetUsersRequest other = (GetUsersRequest) o;
        return 
            Objects.deepEquals(this.clientID, other.clientID) &&
            Objects.deepEquals(this.clientName, other.clientName) &&
            Objects.deepEquals(this.deviceNickname, other.deviceNickname) &&
            Objects.deepEquals(this.deviceName, other.deviceName) &&
            Objects.deepEquals(this.deviceScreenResolution, other.deviceScreenResolution) &&
            Objects.deepEquals(this.clientVersion, other.clientVersion) &&
            Objects.deepEquals(this.platform, other.platform) &&
            Objects.deepEquals(this.clientFeatures, other.clientFeatures) &&
            Objects.deepEquals(this.model, other.model) &&
            Objects.deepEquals(this.xPlexSessionId, other.xPlexSessionId) &&
            Objects.deepEquals(this.xPlexLanguage, other.xPlexLanguage) &&
            Objects.deepEquals(this.platformVersion, other.platformVersion) &&
            Objects.deepEquals(this.xPlexToken, other.xPlexToken);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            clientID,
            clientName,
            deviceNickname,
            deviceName,
            deviceScreenResolution,
            clientVersion,
            platform,
            clientFeatures,
            model,
            xPlexSessionId,
            xPlexLanguage,
            platformVersion,
            xPlexToken);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetUsersRequest.class,
                "clientID", clientID,
                "clientName", clientName,
                "deviceNickname", deviceNickname,
                "deviceName", deviceName,
                "deviceScreenResolution", deviceScreenResolution,
                "clientVersion", clientVersion,
                "platform", platform,
                "clientFeatures", clientFeatures,
                "model", model,
                "xPlexSessionId", xPlexSessionId,
                "xPlexLanguage", xPlexLanguage,
                "platformVersion", platformVersion,
                "xPlexToken", xPlexToken);
    }
    
    public final static class Builder {
 
        private String clientID;
 
        private Optional<String> clientName = Optional.empty();
 
        private Optional<String> deviceNickname = Optional.empty();
 
        private Optional<String> deviceName = Optional.empty();
 
        private Optional<String> deviceScreenResolution = Optional.empty();
 
        private Optional<String> clientVersion = Optional.empty();
 
        private Optional<String> platform = Optional.empty();
 
        private Optional<String> clientFeatures = Optional.empty();
 
        private Optional<String> model = Optional.empty();
 
        private Optional<String> xPlexSessionId = Optional.empty();
 
        private Optional<String> xPlexLanguage = Optional.empty();
 
        private Optional<String> platformVersion = Optional.empty();
 
        private String xPlexToken;  
        
        private Builder() {
          // force use of static builder() method
        }

        /**
         * An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
         */
        public Builder clientID(String clientID) {
            Utils.checkNotNull(clientID, "clientID");
            this.clientID = clientID;
            return this;
        }

        /**
         * The name of the client application. (Plex Web, Plex Media Server, etc.)
         */
        public Builder clientName(String clientName) {
            Utils.checkNotNull(clientName, "clientName");
            this.clientName = Optional.ofNullable(clientName);
            return this;
        }

        /**
         * The name of the client application. (Plex Web, Plex Media Server, etc.)
         */
        public Builder clientName(Optional<String> clientName) {
            Utils.checkNotNull(clientName, "clientName");
            this.clientName = clientName;
            return this;
        }

        /**
         * A relatively friendly name for the client device
         */
        public Builder deviceNickname(String deviceNickname) {
            Utils.checkNotNull(deviceNickname, "deviceNickname");
            this.deviceNickname = Optional.ofNullable(deviceNickname);
            return this;
        }

        /**
         * A relatively friendly name for the client device
         */
        public Builder deviceNickname(Optional<String> deviceNickname) {
            Utils.checkNotNull(deviceNickname, "deviceNickname");
            this.deviceNickname = deviceNickname;
            return this;
        }

        /**
         * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
         */
        public Builder deviceName(String deviceName) {
            Utils.checkNotNull(deviceName, "deviceName");
            this.deviceName = Optional.ofNullable(deviceName);
            return this;
        }

        /**
         * The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.)
         */
        public Builder deviceName(Optional<String> deviceName) {
            Utils.checkNotNull(deviceName, "deviceName");
            this.deviceName = deviceName;
            return this;
        }

        /**
         * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
         */
        public Builder deviceScreenResolution(String deviceScreenResolution) {
            Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution");
            this.deviceScreenResolution = Optional.ofNullable(deviceScreenResolution);
            return this;
        }

        /**
         * The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440)
         */
        public Builder deviceScreenResolution(Optional<String> deviceScreenResolution) {
            Utils.checkNotNull(deviceScreenResolution, "deviceScreenResolution");
            this.deviceScreenResolution = deviceScreenResolution;
            return this;
        }

        /**
         * The version of the client application.
         */
        public Builder clientVersion(String clientVersion) {
            Utils.checkNotNull(clientVersion, "clientVersion");
            this.clientVersion = Optional.ofNullable(clientVersion);
            return this;
        }

        /**
         * The version of the client application.
         */
        public Builder clientVersion(Optional<String> clientVersion) {
            Utils.checkNotNull(clientVersion, "clientVersion");
            this.clientVersion = clientVersion;
            return this;
        }

        /**
         * The platform of the client application.
         */
        public Builder platform(String platform) {
            Utils.checkNotNull(platform, "platform");
            this.platform = Optional.ofNullable(platform);
            return this;
        }

        /**
         * The platform of the client application.
         */
        public Builder platform(Optional<String> platform) {
            Utils.checkNotNull(platform, "platform");
            this.platform = platform;
            return this;
        }

        /**
         * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
         */
        public Builder clientFeatures(String clientFeatures) {
            Utils.checkNotNull(clientFeatures, "clientFeatures");
            this.clientFeatures = Optional.ofNullable(clientFeatures);
            return this;
        }

        /**
         * The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list)
         */
        public Builder clientFeatures(Optional<String> clientFeatures) {
            Utils.checkNotNull(clientFeatures, "clientFeatures");
            this.clientFeatures = clientFeatures;
            return this;
        }

        /**
         * A potentially less friendly identifier for the device model
         */
        public Builder model(String model) {
            Utils.checkNotNull(model, "model");
            this.model = Optional.ofNullable(model);
            return this;
        }

        /**
         * A potentially less friendly identifier for the device model
         */
        public Builder model(Optional<String> model) {
            Utils.checkNotNull(model, "model");
            this.model = model;
            return this;
        }

        /**
         * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
         */
        public Builder xPlexSessionId(String xPlexSessionId) {
            Utils.checkNotNull(xPlexSessionId, "xPlexSessionId");
            this.xPlexSessionId = Optional.ofNullable(xPlexSessionId);
            return this;
        }

        /**
         * The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca)
         */
        public Builder xPlexSessionId(Optional<String> xPlexSessionId) {
            Utils.checkNotNull(xPlexSessionId, "xPlexSessionId");
            this.xPlexSessionId = xPlexSessionId;
            return this;
        }

        /**
         * The language of the client application.
         */
        public Builder xPlexLanguage(String xPlexLanguage) {
            Utils.checkNotNull(xPlexLanguage, "xPlexLanguage");
            this.xPlexLanguage = Optional.ofNullable(xPlexLanguage);
            return this;
        }

        /**
         * The language of the client application.
         */
        public Builder xPlexLanguage(Optional<String> xPlexLanguage) {
            Utils.checkNotNull(xPlexLanguage, "xPlexLanguage");
            this.xPlexLanguage = xPlexLanguage;
            return this;
        }

        /**
         * The version of the platform
         */
        public Builder platformVersion(String platformVersion) {
            Utils.checkNotNull(platformVersion, "platformVersion");
            this.platformVersion = Optional.ofNullable(platformVersion);
            return this;
        }

        /**
         * The version of the platform
         */
        public Builder platformVersion(Optional<String> platformVersion) {
            Utils.checkNotNull(platformVersion, "platformVersion");
            this.platformVersion = platformVersion;
            return this;
        }

        /**
         * An authentication token, obtained from plex.tv
         */
        public Builder xPlexToken(String xPlexToken) {
            Utils.checkNotNull(xPlexToken, "xPlexToken");
            this.xPlexToken = xPlexToken;
            return this;
        }
        
        public GetUsersRequest build() {
            return new GetUsersRequest(
                clientID,
                clientName,
                deviceNickname,
                deviceName,
                deviceScreenResolution,
                clientVersion,
                platform,
                clientFeatures,
                model,
                xPlexSessionId,
                xPlexLanguage,
                platformVersion,
                xPlexToken);
        }
    }
}

