vrchatapi 1.20.8-nightly.15

VRChat API Client for Rust
Documentation
use crate::models;
use serde::{Deserialize, Serialize};

/// UserExists : Status object representing if a queried user by username or userId exists or not. This model is primarily used by the `/auth/exists` endpoint, which in turn is used during registration. Please see the documentation on that endpoint for more information on usage.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserExists {
    /// Is the username valid?
    #[serde(rename = "nameOk", skip_serializing_if = "Option::is_none")]
    pub name_ok: Option<bool>,
    /// Status if a user exist with that username or userId.
    #[serde(rename = "userExists")]
    pub user_exists: bool,
}

impl UserExists {
    /// Status object representing if a queried user by username or userId exists or not. This model is primarily used by the `/auth/exists` endpoint, which in turn is used during registration. Please see the documentation on that endpoint for more information on usage.
    pub fn new(user_exists: bool) -> UserExists {
        UserExists {
            name_ok: None,
            user_exists,
        }
    }
}