Skip to main content

nautobot_openapi/models/
module_bay.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/// ModuleBay : 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 ModuleBay {
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    /// This bay will only accept modules from the same manufacturer as the parent device or module
27    #[serde(
28        rename = "requires_first_party_modules",
29        skip_serializing_if = "Option::is_none"
30    )]
31    pub requires_first_party_modules: Option<bool>,
32    #[serde(rename = "name")]
33    pub name: String,
34    /// The position of the module bay within the parent device/module
35    #[serde(rename = "position", skip_serializing_if = "Option::is_none")]
36    pub position: Option<String>,
37    /// Physical label
38    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
39    pub label: Option<String>,
40    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
41    pub description: Option<String>,
42    #[serde(
43        rename = "parent_device",
44        default,
45        with = "::serde_with::rust::double_option",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub parent_device: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
49    #[serde(
50        rename = "parent_module",
51        default,
52        with = "::serde_with::rust::double_option",
53        skip_serializing_if = "Option::is_none"
54    )]
55    pub parent_module: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
56    #[serde(
57        rename = "module_family",
58        default,
59        with = "::serde_with::rust::double_option",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub module_family: Option<Option<Box<crate::models::BulkWritableModuleBayRequestModuleFamily>>>,
63    #[serde(
64        rename = "created",
65        default,
66        with = "::serde_with::rust::double_option",
67        skip_serializing_if = "Option::is_none"
68    )]
69    pub created: Option<Option<String>>,
70    #[serde(
71        rename = "last_updated",
72        default,
73        with = "::serde_with::rust::double_option",
74        skip_serializing_if = "Option::is_none"
75    )]
76    pub last_updated: Option<Option<String>>,
77    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
78    pub notes_url: Option<String>,
79    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
80    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
81    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
82    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
83}
84
85impl ModuleBay {
86    /// 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.
87    pub fn new(name: String) -> ModuleBay {
88        ModuleBay {
89            id: None,
90            object_type: None,
91            display: None,
92            url: None,
93            natural_slug: None,
94            requires_first_party_modules: None,
95            name,
96            position: None,
97            label: None,
98            description: None,
99            parent_device: None,
100            parent_module: None,
101            module_family: None,
102            created: None,
103            last_updated: None,
104            notes_url: None,
105            custom_fields: None,
106            tags: None,
107        }
108    }
109}