Skip to main content

nautobot_openapi/models/
patched_writable_vm_interface_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/// PatchedWritableVmInterfaceRequest : 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 PatchedWritableVmInterfaceRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(
18        rename = "mac_address",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub mac_address: Option<Option<String>>,
24    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
25    pub enabled: Option<bool>,
26    #[serde(
27        rename = "mtu",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub mtu: Option<Option<i32>>,
33    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
34    pub mode: Option<Box<crate::models::PatchedWritableInterfaceRequestMode>>,
35    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
36    pub name: Option<String>,
37    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
38    pub description: Option<String>,
39    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
40    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
41    #[serde(
42        rename = "role",
43        default,
44        with = "::serde_with::rust::double_option",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
48    #[serde(
49        rename = "parent_interface",
50        default,
51        with = "::serde_with::rust::double_option",
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub parent_interface:
55        Option<Option<Box<crate::models::BulkWritableInterfaceRequestParentInterface>>>,
56    #[serde(
57        rename = "bridge",
58        default,
59        with = "::serde_with::rust::double_option",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub bridge: Option<Option<Box<crate::models::BridgeInterface>>>,
63    #[serde(rename = "virtual_machine", skip_serializing_if = "Option::is_none")]
64    pub virtual_machine:
65        Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
66    #[serde(
67        rename = "untagged_vlan",
68        default,
69        with = "::serde_with::rust::double_option",
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub untagged_vlan: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
73    #[serde(
74        rename = "vrf",
75        default,
76        with = "::serde_with::rust::double_option",
77        skip_serializing_if = "Option::is_none"
78    )]
79    pub vrf: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
80    #[serde(rename = "tagged_vlans", skip_serializing_if = "Option::is_none")]
81    pub tagged_vlans: Option<Vec<crate::models::TaggedVlans>>,
82    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
83    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
84    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
85    pub relationships: Option<
86        ::std::collections::HashMap<
87            String,
88            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
89        >,
90    >,
91    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
92    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
93}
94
95impl PatchedWritableVmInterfaceRequest {
96    /// 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.
97    pub fn new() -> PatchedWritableVmInterfaceRequest {
98        PatchedWritableVmInterfaceRequest {
99            id: None,
100            mac_address: None,
101            enabled: None,
102            mtu: None,
103            mode: None,
104            name: None,
105            description: None,
106            status: None,
107            role: None,
108            parent_interface: None,
109            bridge: None,
110            virtual_machine: None,
111            untagged_vlan: None,
112            vrf: None,
113            tagged_vlans: None,
114            custom_fields: None,
115            relationships: None,
116            tags: None,
117        }
118    }
119}