/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

/// BulkWritableCertificateProfileRequest : CertificateProfile Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BulkWritableCertificateProfileRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "certificate_type", skip_serializing_if = "Option::is_none")]
    pub certificate_type:
        Option<Box<crate::models::BulkWritableCertificateProfileRequestCertificateType>>,
    #[serde(
        rename = "certificate_file_path",
        skip_serializing_if = "Option::is_none"
    )]
    pub certificate_file_path: Option<String>,
    #[serde(rename = "chain_file_path", skip_serializing_if = "Option::is_none")]
    pub chain_file_path: Option<String>,
    #[serde(rename = "key_file_path", skip_serializing_if = "Option::is_none")]
    pub key_file_path: Option<String>,
    #[serde(
        rename = "expiration_date",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub expiration_date: Option<Option<String>>,
    #[serde(rename = "cipher", skip_serializing_if = "Option::is_none")]
    pub cipher: Option<String>,
    #[serde(
        rename = "tenant",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
    pub relationships: Option<
        ::std::collections::HashMap<
            String,
            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
        >,
    >,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
}

impl BulkWritableCertificateProfileRequest {
    /// CertificateProfile Serializer.
    pub fn new(id: uuid::Uuid, name: String) -> BulkWritableCertificateProfileRequest {
        BulkWritableCertificateProfileRequest {
            id,
            name,
            certificate_type: None,
            certificate_file_path: None,
            chain_file_path: None,
            key_file_path: None,
            expiration_date: None,
            cipher: None,
            tenant: None,
            custom_fields: None,
            relationships: None,
            tags: None,
        }
    }
}
