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

/// VpnProfilePhase1PolicyAssignment : Serializer for `VPNProfilePhase1PolicyAssignment` objects.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct VpnProfilePhase1PolicyAssignment {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
    pub object_type: Option<String>,
    /// Human friendly display value
    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
    pub display: Option<String>,
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
    pub natural_slug: Option<String>,
    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
    pub notes_url: Option<String>,
    /// Higher weights appear later in the list
    #[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
    pub weight: Option<i32>,
    #[serde(rename = "vpn_profile")]
    pub vpn_profile: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
    #[serde(rename = "vpn_phase1_policy")]
    pub vpn_phase1_policy: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
}

impl VpnProfilePhase1PolicyAssignment {
    /// Serializer for `VPNProfilePhase1PolicyAssignment` objects.
    pub fn new(
        vpn_profile: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
        vpn_phase1_policy: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
    ) -> VpnProfilePhase1PolicyAssignment {
        VpnProfilePhase1PolicyAssignment {
            id: None,
            object_type: None,
            display: None,
            url: None,
            natural_slug: None,
            notes_url: None,
            weight: None,
            vpn_profile: Box::new(vpn_profile),
            vpn_phase1_policy: Box::new(vpn_phase1_policy),
            custom_fields: None,
        }
    }
}
