#[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 {
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,
}
}
}