Skip to main content

nautobot_openapi/models/
patched_module_bay_request.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/// PatchedModuleBayRequest : 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 PatchedModuleBayRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    /// This bay will only accept modules from the same manufacturer as the parent device or module
18    #[serde(
19        rename = "requires_first_party_modules",
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub requires_first_party_modules: Option<bool>,
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    /// The position of the module bay within the parent device/module
26    #[serde(rename = "position", skip_serializing_if = "Option::is_none")]
27    pub position: Option<String>,
28    /// Physical label
29    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
30    pub label: Option<String>,
31    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
32    pub description: Option<String>,
33    #[serde(
34        rename = "parent_device",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub parent_device: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
40    #[serde(
41        rename = "parent_module",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub parent_module: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
47    #[serde(
48        rename = "module_family",
49        default,
50        with = "::serde_with::rust::double_option",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub module_family: Option<Option<Box<crate::models::BulkWritableModuleBayRequestModuleFamily>>>,
54    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
55    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
56    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
57    pub relationships: Option<
58        ::std::collections::HashMap<
59            String,
60            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
61        >,
62    >,
63    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
64    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
65}
66
67impl PatchedModuleBayRequest {
68    /// 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.
69    pub fn new() -> PatchedModuleBayRequest {
70        PatchedModuleBayRequest {
71            id: None,
72            requires_first_party_modules: None,
73            name: None,
74            position: None,
75            label: None,
76            description: None,
77            parent_device: None,
78            parent_module: None,
79            module_family: None,
80            custom_fields: None,
81            relationships: None,
82            tags: None,
83        }
84    }
85}