Skip to main content

nautobot_openapi/models/
module_family.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// ModuleFamily : API serializer for ModuleFamily objects.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ModuleFamily {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
18    pub object_type: Option<String>,
19    /// Human friendly display value
20    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
21    pub display: Option<String>,
22    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
23    pub url: Option<String>,
24    #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
25    pub natural_slug: Option<String>,
26    #[serde(rename = "module_type_count", skip_serializing_if = "Option::is_none")]
27    pub module_type_count: Option<i32>,
28    #[serde(rename = "module_bay_count", skip_serializing_if = "Option::is_none")]
29    pub module_bay_count: Option<i32>,
30    #[serde(rename = "name")]
31    pub name: String,
32    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
33    pub description: Option<String>,
34    #[serde(
35        rename = "created",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub created: Option<Option<String>>,
41    #[serde(
42        rename = "last_updated",
43        default,
44        with = "::serde_with::rust::double_option",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub last_updated: Option<Option<String>>,
48    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
49    pub notes_url: Option<String>,
50    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
51    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
52}
53
54impl ModuleFamily {
55    /// API serializer for ModuleFamily objects.
56    pub fn new(name: String) -> ModuleFamily {
57        ModuleFamily {
58            id: None,
59            object_type: None,
60            display: None,
61            url: None,
62            natural_slug: None,
63            module_type_count: None,
64            module_bay_count: None,
65            name,
66            description: None,
67            created: None,
68            last_updated: None,
69            notes_url: None,
70            custom_fields: None,
71        }
72    }
73}