nautobot-openapi 0.3.1

low level nautobot bindings (generated by openapi-generator)
Documentation
/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 2.4.27 (2.4)
 *
 * 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::BulkWritableCableRequestStatus>,
    #[serde(rename = "interface")]
    pub interface: Box<crate::models::BulkWritableCableRequestStatus>,
    #[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::BulkWritableCableRequestStatus,
        interface: crate::models::BulkWritableCableRequestStatus,
    ) -> 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,
        }
    }
}