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

/// VpnProfileRequest : VPNProfile Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct VpnProfileRequest {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "keepalive_enabled", skip_serializing_if = "Option::is_none")]
    pub keepalive_enabled: Option<bool>,
    #[serde(
        rename = "keepalive_interval",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub keepalive_interval: Option<Option<i32>>,
    #[serde(
        rename = "keepalive_retries",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub keepalive_retries: Option<Option<i32>>,
    #[serde(rename = "nat_traversal", skip_serializing_if = "Option::is_none")]
    pub nat_traversal: Option<bool>,
    /// Additional options specific to the VPN technology and/or implementation
    #[serde(
        rename = "extra_options",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub extra_options: Option<Option<serde_json::Value>>,
    #[serde(
        rename = "role",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(
        rename = "secrets_group",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub secrets_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[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 VpnProfileRequest {
    /// VPNProfile Serializer.
    pub fn new(name: String) -> VpnProfileRequest {
        VpnProfileRequest {
            id: None,
            name,
            description: None,
            keepalive_enabled: None,
            keepalive_interval: None,
            keepalive_retries: None,
            nat_traversal: None,
            extra_options: None,
            role: None,
            secrets_group: None,
            tenant: None,
            custom_fields: None,
            relationships: None,
            tags: None,
        }
    }
}
