wacht 0.1.0-beta.5

Official Rust SDK for the Wacht platform, providing type-safe API client and authentication middleware
Documentation
/*
 * Wacht Backend API
 *
 * Backend API for the Wacht platform console
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};
use serde_json::Value;

/// Custom signing key configuration
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CustomSigningKey {
    /// Whether the custom signing key is enabled
    pub enabled: bool,
    /// The key value
    pub key: String,
    /// The algorithm used for signing
    pub algorithm: String,
}

/// JWT template model
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JwtTemplate {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Token lifetime in seconds
    #[serde(rename = "token_lifetime", skip_serializing_if = "Option::is_none")]
    pub token_lifetime: Option<i64>,
    /// Allowed clock skew in seconds
    #[serde(rename = "allowed_clock_skew", skip_serializing_if = "Option::is_none")]
    pub allowed_clock_skew: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub custom_signing_key: Option<CustomSigningKey>,
    /// JWT template configuration
    #[serde(skip_serializing_if = "Option::is_none")]
    pub template: Option<Value>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
}

impl JwtTemplate {
    pub fn new() -> JwtTemplate {
        JwtTemplate {
            id: None,
            name: None,
            token_lifetime: None,
            allowed_clock_skew: None,
            custom_signing_key: None,
            template: None,
            created_at: None,
            updated_at: None,
        }
    }
}