Skip to main content

nautobot_openapi/models/
module_bay_template.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/// ModuleBayTemplate : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ModuleBayTemplate {
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 = "notes_url", skip_serializing_if = "Option::is_none")]
27    pub notes_url: Option<String>,
28    #[serde(rename = "name")]
29    pub name: String,
30    /// The position of the module bay within the device or module
31    #[serde(rename = "position", skip_serializing_if = "Option::is_none")]
32    pub position: Option<String>,
33    /// Physical label
34    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
35    pub label: Option<String>,
36    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
37    pub description: Option<String>,
38    /// This bay will only accept modules from the same manufacturer as the parent device or module
39    #[serde(
40        rename = "requires_first_party_modules",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub requires_first_party_modules: Option<bool>,
44    #[serde(
45        rename = "device_type",
46        default,
47        with = "::serde_with::rust::double_option",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub device_type: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
51    #[serde(
52        rename = "module_type",
53        default,
54        with = "::serde_with::rust::double_option",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub module_type: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
58    #[serde(
59        rename = "module_family",
60        default,
61        with = "::serde_with::rust::double_option",
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub module_family:
65        Option<Option<Box<crate::models::BulkWritableModuleBayTemplateRequestModuleFamily>>>,
66    #[serde(
67        rename = "created",
68        default,
69        with = "::serde_with::rust::double_option",
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub created: Option<Option<String>>,
73    #[serde(
74        rename = "last_updated",
75        default,
76        with = "::serde_with::rust::double_option",
77        skip_serializing_if = "Option::is_none"
78    )]
79    pub last_updated: Option<Option<String>>,
80    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
81    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
82}
83
84impl ModuleBayTemplate {
85    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
86    pub fn new(name: String) -> ModuleBayTemplate {
87        ModuleBayTemplate {
88            id: None,
89            object_type: None,
90            display: None,
91            url: None,
92            natural_slug: None,
93            notes_url: None,
94            name,
95            position: None,
96            label: None,
97            description: None,
98            requires_first_party_modules: None,
99            device_type: None,
100            module_type: None,
101            module_family: None,
102            created: None,
103            last_updated: None,
104            custom_fields: None,
105        }
106    }
107}