netbox-openapi 0.6.0

low level netbox bindings (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * NetBox REST API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 4.6.2 (4.6)
 *
 * Generated by: https://openapi-generator.tech
 */

/// FhrpGroupAssignment : Adds support for custom fields and tags.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FhrpGroupAssignment {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
    pub display: Option<String>,
    #[serde(rename = "group")]
    pub group: Box<crate::models::BriefFhrpGroup>,
    #[serde(rename = "interface_type")]
    pub interface_type: String,
    #[serde(rename = "interface_id")]
    pub interface_id: i64,
    #[serde(
        rename = "interface",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub interface: Option<Option<serde_json::Value>>,
    #[serde(rename = "priority")]
    pub priority: i32,
    #[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 FhrpGroupAssignment {
    /// Adds support for custom fields and tags.
    pub fn new(
        group: crate::models::BriefFhrpGroup,
        interface_type: String,
        interface_id: i64,
        priority: i32,
    ) -> FhrpGroupAssignment {
        FhrpGroupAssignment {
            id: None,
            url: None,
            display: None,
            group: Box::new(group),
            interface_type,
            interface_id,
            interface: None,
            priority,
            created: None,
            last_updated: None,
        }
    }
}