Skip to main content

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