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 SyncUserV1 {
    #[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 = "name")]
    pub name: String,
    #[serde(rename = "profileChangedAt")]
    pub profile_changed_at: String,
}

impl SyncUserV1 {
    pub fn new(avatar_color: Option<models::UserAvatarColor>, deleted_at: Option<String>, email: String, has_profile_image: bool, id: String, name: String, profile_changed_at: String) -> SyncUserV1 {
        SyncUserV1 {
            avatar_color,
            deleted_at,
            email,
            has_profile_image,
            id,
            name,
            profile_changed_at,
        }
    }
}