immich_api_rs 1.137.3

Immich API
Documentation
/*
 * Immich
 *
 * Immich API
 *
 * The version of the OpenAPI document: 1.137.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SyncAuthUserV1 {
    #[serde(rename = "avatarColor", deserialize_with = "Option::deserialize")]
    pub avatar_color: Option<models::UserAvatarColor>,
    #[serde(rename = "deletedAt", deserialize_with = "Option::deserialize")]
    pub deleted_at: Option<String>,
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "hasProfileImage")]
    pub has_profile_image: bool,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "isAdmin")]
    pub is_admin: bool,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "oauthId")]
    pub oauth_id: String,
    #[serde(rename = "pinCode", deserialize_with = "Option::deserialize")]
    pub pin_code: Option<String>,
    #[serde(rename = "profileChangedAt")]
    pub profile_changed_at: String,
    #[serde(rename = "quotaSizeInBytes", deserialize_with = "Option::deserialize")]
    pub quota_size_in_bytes: Option<i32>,
    #[serde(rename = "quotaUsageInBytes")]
    pub quota_usage_in_bytes: i32,
    #[serde(rename = "storageLabel", deserialize_with = "Option::deserialize")]
    pub storage_label: Option<String>,
}

impl SyncAuthUserV1 {
    pub fn new(avatar_color: Option<models::UserAvatarColor>, deleted_at: Option<String>, email: String, has_profile_image: bool, id: String, is_admin: bool, name: String, oauth_id: String, pin_code: Option<String>, profile_changed_at: String, quota_size_in_bytes: Option<i32>, quota_usage_in_bytes: i32, storage_label: Option<String>) -> SyncAuthUserV1 {
        SyncAuthUserV1 {
            avatar_color,
            deleted_at,
            email,
            has_profile_image,
            id,
            is_admin,
            name,
            oauth_id,
            pin_code,
            profile_changed_at,
            quota_size_in_bytes,
            quota_usage_in_bytes,
            storage_label,
        }
    }
}