/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateKeyPayload {
    #[serde(rename = "algorithm", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub algorithm: Option<Option<String>>,
    #[serde(rename = "key_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub key_type: Option<Option<String>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "repository_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub repository_id: Option<Option<uuid::Uuid>>,
    #[serde(rename = "uid_email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub uid_email: Option<Option<String>>,
    #[serde(rename = "uid_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub uid_name: Option<Option<String>>,
}

impl CreateKeyPayload {
    pub fn new(name: String) -> CreateKeyPayload {
        CreateKeyPayload {
            algorithm: None,
            key_type: None,
            name,
            repository_id: None,
            uid_email: None,
            uid_name: None,
        }
    }
}

