/*
 * Pescheck API
 *
 * Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
 *
 * The version of the OpenAPI document: 2.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// JwtGeneration : Serializer for JWT token generation for API users
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JwtGeneration {
    /// Email address of the API user
    #[serde(rename = "email")]
    pub email: String,
    /// Password for the API user
    #[serde(rename = "password")]
    pub password: String,
    /// Organization ID to generate token for
    #[serde(rename = "organisation_id", skip_serializing_if = "Option::is_none")]
    pub organisation_id: Option<uuid::Uuid>,
    /// Division ID to generate token for (optional)
    #[serde(rename = "division_id", skip_serializing_if = "Option::is_none")]
    pub division_id: Option<uuid::Uuid>,
}

impl JwtGeneration {
    /// Serializer for JWT token generation for API users
    pub fn new(email: String, password: String) -> JwtGeneration {
        JwtGeneration {
            email,
            password,
            organisation_id: None,
            division_id: None,
        }
    }
}

