/*
 * doqium - service-auth REST API
 *
 * doqium - service-auth REST API
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::doqium_auth_client::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RefreshTokenRequest {
    /// Browser name and version (e.g., \"Chrome 120.0\")
    #[serde(rename = "sessionName", skip_serializing_if = "Option::is_none")]
    pub session_name: Option<String>,
    /// Type of token to create based on device
    #[serde(rename = "tokenType", skip_serializing_if = "Option::is_none")]
    pub token_type: Option<TokenType>,
}

impl RefreshTokenRequest {
    pub fn new() -> RefreshTokenRequest {
        RefreshTokenRequest {
            session_name: None,
            token_type: None,
        }
    }
}
/// Type of token to create based on device
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TokenType {
    #[serde(rename = "web")]
    Web,
    #[serde(rename = "mobile")]
    Mobile,
    #[serde(rename = "cli")]
    Cli,
}

impl Default for TokenType {
    fn default() -> TokenType {
        Self::Web
    }
}
