Skip to main content

nautobot_openapi/models/
patched_module_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/// PatchedModuleRequest : 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 PatchedModuleRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(
18        rename = "serial",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub serial: Option<Option<String>>,
24    /// A unique tag used to identify this module
25    #[serde(
26        rename = "asset_tag",
27        default,
28        with = "::serde_with::rust::double_option",
29        skip_serializing_if = "Option::is_none"
30    )]
31    pub asset_tag: Option<Option<String>>,
32    #[serde(rename = "module_type", skip_serializing_if = "Option::is_none")]
33    pub module_type: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
34    #[serde(
35        rename = "parent_module_bay",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub parent_module_bay: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
41    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
42    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
43    #[serde(
44        rename = "role",
45        default,
46        with = "::serde_with::rust::double_option",
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
50    #[serde(
51        rename = "tenant",
52        default,
53        with = "::serde_with::rust::double_option",
54        skip_serializing_if = "Option::is_none"
55    )]
56    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
57    #[serde(
58        rename = "location",
59        default,
60        with = "::serde_with::rust::double_option",
61        skip_serializing_if = "Option::is_none"
62    )]
63    pub location: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
64    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
65    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
66    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
67    pub relationships: Option<
68        ::std::collections::HashMap<
69            String,
70            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
71        >,
72    >,
73    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
74    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
75}
76
77impl PatchedModuleRequest {
78    /// 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.
79    pub fn new() -> PatchedModuleRequest {
80        PatchedModuleRequest {
81            id: None,
82            serial: None,
83            asset_tag: None,
84            module_type: None,
85            parent_module_bay: None,
86            status: None,
87            role: None,
88            tenant: None,
89            location: None,
90            custom_fields: None,
91            relationships: None,
92            tags: None,
93        }
94    }
95}