appwrite_openapi 1.0.0

AUTO-GENERATED client for Appwrite. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
Documentation
/*
 * Appwrite
 *
 * Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
 *
 * The version of the OpenAPI document: 1.4.9
 * Contact: team@appwrite.io
 * Generated by: https://openapi-generator.tech
 */

/// User : User



#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct User {
    /// User ID.
    #[serde(rename = "$id")]
    pub dollar_id: String,
    /// User creation date in ISO 8601 format.
    #[serde(rename = "$createdAt")]
    pub dollar_created_at: String,
    /// User update date in ISO 8601 format.
    #[serde(rename = "$updatedAt")]
    pub dollar_updated_at: String,
    /// User name.
    #[serde(rename = "name")]
    pub name: String,
    /// Hashed user password.
    #[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub password: Option<Option<String>>,
    /// Password hashing algorithm.
    #[serde(rename = "hash", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub hash: Option<Option<String>>,
    /// Password hashing algorithm configuration.
    #[serde(rename = "hashOptions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub hash_options: Option<Option<serde_json::Value>>,
    /// User registration date in ISO 8601 format.
    #[serde(rename = "registration")]
    pub registration: String,
    /// User status. Pass `true` for enabled and `false` for disabled.
    #[serde(rename = "status")]
    pub status: bool,
    /// Labels for the user.
    #[serde(rename = "labels")]
    pub labels: Vec<String>,
    /// Password update time in ISO 8601 format.
    #[serde(rename = "passwordUpdate")]
    pub password_update: String,
    /// User email address.
    #[serde(rename = "email")]
    pub email: String,
    /// User phone number in E.164 format.
    #[serde(rename = "phone")]
    pub phone: String,
    /// Email verification status.
    #[serde(rename = "emailVerification")]
    pub email_verification: bool,
    /// Phone verification status.
    #[serde(rename = "phoneVerification")]
    pub phone_verification: bool,
    /// User preferences as a key-value object
    #[serde(rename = "prefs")]
    pub prefs: serde_json::Value,
    /// Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
    #[serde(rename = "accessedAt")]
    pub accessed_at: String,
}

impl User {
    /// User
    pub fn new(dollar_id: String, dollar_created_at: String, dollar_updated_at: String, name: String, registration: String, status: bool, labels: Vec<String>, password_update: String, email: String, phone: String, email_verification: bool, phone_verification: bool, prefs: serde_json::Value, accessed_at: String) -> User {
        User {
            dollar_id,
            dollar_created_at,
            dollar_updated_at,
            name,
            password: None,
            hash: None,
            hash_options: None,
            registration,
            status,
            labels,
            password_update,
            email,
            phone,
            email_verification,
            phone_verification,
            prefs,
            accessed_at,
        }
    }
}