mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
33 lines
1.2 KiB
Rust
33 lines
1.2 KiB
Rust
/*
|
|
* VRChat API Documentation
|
|
*
|
|
*
|
|
* Contact: vrchatapi.lpv0t@aries.fyi
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
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 {
|
|
/// Status if a user exist with that username or userId.
|
|
#[serde(rename = "userExists")]
|
|
pub user_exists: bool,
|
|
/// Is the username valid?
|
|
#[serde(rename = "nameOk")]
|
|
pub name_ok: 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, name_ok: bool) -> UserExists {
|
|
UserExists {
|
|
user_exists,
|
|
name_ok,
|
|
}
|
|
}
|
|
}
|
|
|