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

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

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct VpnProfilePhase2PolicyAssignment {
    #[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_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>>,
}

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