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

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

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BulkWritableVpnProfilePhase1PolicyAssignmentRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// 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>>,
    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
    pub relationships: Option<
        ::std::collections::HashMap<
            String,
            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
        >,
    >,
}

impl BulkWritableVpnProfilePhase1PolicyAssignmentRequest {
    /// Serializer for `VPNProfilePhase1PolicyAssignment` objects.
    pub fn new(
        id: uuid::Uuid,
        vpn_profile: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
        vpn_phase1_policy: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
    ) -> BulkWritableVpnProfilePhase1PolicyAssignmentRequest {
        BulkWritableVpnProfilePhase1PolicyAssignmentRequest {
            id,
            weight: None,
            vpn_profile: Box::new(vpn_profile),
            vpn_phase1_policy: Box::new(vpn_phase1_policy),
            custom_fields: None,
            relationships: None,
        }
    }
}
