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 AuthStatusResponseDto {
    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
    pub expires_at: Option<String>,
    #[serde(rename = "isElevated")]
    pub is_elevated: bool,
    #[serde(rename = "password")]
    pub password: bool,
    #[serde(rename = "pinCode")]
    pub pin_code: bool,
    #[serde(rename = "pinExpiresAt", skip_serializing_if = "Option::is_none")]
    pub pin_expires_at: Option<String>,
}

impl AuthStatusResponseDto {
    pub fn new(is_elevated: bool, password: bool, pin_code: bool) -> AuthStatusResponseDto {
        AuthStatusResponseDto {
            expires_at: None,
            is_elevated,
            password,
            pin_code,
            pin_expires_at: None,
        }
    }
}