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

/// InterfaceRedundancyGroupAssociation : InterfaceRedundancyGroupAssociation Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InterfaceRedundancyGroupAssociation {
    #[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 = "priority")]
    pub priority: i32,
    #[serde(rename = "interface_redundancy_group")]
    pub interface_redundancy_group:
        Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
    #[serde(rename = "interface")]
    pub interface: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
    #[serde(
        rename = "created",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub created: Option<Option<String>>,
    #[serde(
        rename = "last_updated",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_updated: Option<Option<String>>,
}

impl InterfaceRedundancyGroupAssociation {
    /// InterfaceRedundancyGroupAssociation Serializer.
    pub fn new(
        priority: i32,
        interface_redundancy_group: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
        interface: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
    ) -> InterfaceRedundancyGroupAssociation {
        InterfaceRedundancyGroupAssociation {
            id: None,
            object_type: None,
            display: None,
            url: None,
            natural_slug: None,
            priority,
            interface_redundancy_group: Box::new(interface_redundancy_group),
            interface: Box::new(interface),
            created: None,
            last_updated: None,
        }
    }
}
