netbox_openapi/models/
generic_object.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct GenericObject {
15 #[serde(rename = "object_type")]
16 pub object_type: String,
17 #[serde(rename = "object_id")]
18 pub object_id: i32,
19 #[serde(
20 rename = "object",
21 default,
22 with = "::serde_with::rust::double_option",
23 skip_serializing_if = "Option::is_none"
24 )]
25 pub object: Option<Option<serde_json::Value>>,
26}
27
28impl GenericObject {
29 pub fn new(object_type: String, object_id: i32) -> GenericObject {
31 GenericObject {
32 object_type,
33 object_id,
34 object: None,
35 }
36 }
37}