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 SystemConfigOAuthDto {
    #[serde(rename = "autoLaunch")]
    pub auto_launch: bool,
    #[serde(rename = "autoRegister")]
    pub auto_register: bool,
    #[serde(rename = "buttonText")]
    pub button_text: String,
    #[serde(rename = "clientId")]
    pub client_id: String,
    #[serde(rename = "clientSecret")]
    pub client_secret: String,
    #[serde(rename = "defaultStorageQuota", deserialize_with = "Option::deserialize")]
    pub default_storage_quota: Option<u64>,
    #[serde(rename = "enabled")]
    pub enabled: bool,
    #[serde(rename = "issuerUrl")]
    pub issuer_url: String,
    #[serde(rename = "mobileOverrideEnabled")]
    pub mobile_override_enabled: bool,
    #[serde(rename = "mobileRedirectUri")]
    pub mobile_redirect_uri: String,
    #[serde(rename = "profileSigningAlgorithm")]
    pub profile_signing_algorithm: String,
    #[serde(rename = "roleClaim")]
    pub role_claim: String,
    #[serde(rename = "scope")]
    pub scope: String,
    #[serde(rename = "signingAlgorithm")]
    pub signing_algorithm: String,
    #[serde(rename = "storageLabelClaim")]
    pub storage_label_claim: String,
    #[serde(rename = "storageQuotaClaim")]
    pub storage_quota_claim: String,
    #[serde(rename = "timeout")]
    pub timeout: u32,
    #[serde(rename = "tokenEndpointAuthMethod")]
    pub token_endpoint_auth_method: models::OAuthTokenEndpointAuthMethod,
}

impl SystemConfigOAuthDto {
    pub fn new(auto_launch: bool, auto_register: bool, button_text: String, client_id: String, client_secret: String, default_storage_quota: Option<u64>, enabled: bool, issuer_url: String, mobile_override_enabled: bool, mobile_redirect_uri: String, profile_signing_algorithm: String, role_claim: String, scope: String, signing_algorithm: String, storage_label_claim: String, storage_quota_claim: String, timeout: u32, token_endpoint_auth_method: models::OAuthTokenEndpointAuthMethod) -> SystemConfigOAuthDto {
        SystemConfigOAuthDto {
            auto_launch,
            auto_register,
            button_text,
            client_id,
            client_secret,
            default_storage_quota,
            enabled,
            issuer_url,
            mobile_override_enabled,
            mobile_redirect_uri,
            profile_signing_algorithm,
            role_claim,
            scope,
            signing_algorithm,
            storage_label_claim,
            storage_quota_claim,
            timeout,
            token_endpoint_auth_method,
        }
    }
}