nautobot-openapi 0.4.0

low level nautobot bindings (generated by openapi-generator)
Documentation
/*
 * 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
 */

/// BulkWritableVpnProfilePhase2PolicyAssignmentRequest : Serializer for `VPNProfilePhase2PolicyAssignment` objects.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BulkWritableVpnProfilePhase2PolicyAssignmentRequest {
    #[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_phase2_policy")]
    pub vpn_phase2_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 BulkWritableVpnProfilePhase2PolicyAssignmentRequest {
    /// Serializer for `VPNProfilePhase2PolicyAssignment` objects.
    pub fn new(
        id: uuid::Uuid,
        vpn_profile: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
        vpn_phase2_policy: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
    ) -> BulkWritableVpnProfilePhase2PolicyAssignmentRequest {
        BulkWritableVpnProfilePhase2PolicyAssignmentRequest {
            id,
            weight: None,
            vpn_profile: Box::new(vpn_profile),
            vpn_phase2_policy: Box::new(vpn_phase2_policy),
            custom_fields: None,
            relationships: None,
        }
    }
}