/*
 * 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
 */

/// PatchedBulkWritableVpnPhase1PolicyRequest : VPNPhase1Policy Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedBulkWritableVpnPhase1PolicyRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(
        rename = "encryption_algorithm",
        skip_serializing_if = "Option::is_none"
    )]
    pub encryption_algorithm: Option<Vec<crate::models::EncryptionAlgorithmEnum>>,
    #[serde(
        rename = "integrity_algorithm",
        skip_serializing_if = "Option::is_none"
    )]
    pub integrity_algorithm: Option<Vec<crate::models::IntegrityAlgorithmEnum>>,
    #[serde(rename = "dh_group", skip_serializing_if = "Option::is_none")]
    pub dh_group: Option<Vec<crate::models::VpnPhase2PolicyChoices>>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "ike_version", skip_serializing_if = "Option::is_none")]
    pub ike_version: Option<Box<crate::models::BulkWritableVpnPhase1PolicyRequestIkeVersion>>,
    /// Only applicable to IKEv1
    #[serde(rename = "aggressive_mode", skip_serializing_if = "Option::is_none")]
    pub aggressive_mode: Option<bool>,
    #[serde(
        rename = "lifetime_seconds",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub lifetime_seconds: Option<Option<i32>>,
    #[serde(
        rename = "lifetime_kb",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub lifetime_kb: Option<Option<i32>>,
    #[serde(
        rename = "authentication_method",
        skip_serializing_if = "Option::is_none"
    )]
    pub authentication_method:
        Option<Box<crate::models::BulkWritableVpnPhase1PolicyRequestAuthenticationMethod>>,
    #[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 PatchedBulkWritableVpnPhase1PolicyRequest {
    /// VPNPhase1Policy Serializer.
    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableVpnPhase1PolicyRequest {
        PatchedBulkWritableVpnPhase1PolicyRequest {
            id,
            encryption_algorithm: None,
            integrity_algorithm: None,
            dh_group: None,
            name: None,
            description: None,
            ike_version: None,
            aggressive_mode: None,
            lifetime_seconds: None,
            lifetime_kb: None,
            authentication_method: None,
            tenant: None,
            custom_fields: None,
            relationships: None,
            tags: None,
        }
    }
}
