Skip to main content

nautobot_openapi/models/
patched_writable_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/// PatchedWritableInterfaceRequest : 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 PatchedWritableInterfaceRequest {
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(
25        rename = "speed",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub speed: Option<Option<i32>>,
31    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
32    pub name: Option<String>,
33    /// Physical label
34    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
35    pub label: Option<String>,
36    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
37    pub description: Option<String>,
38    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
39    pub enabled: Option<bool>,
40    #[serde(
41        rename = "mtu",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub mtu: Option<Option<i32>>,
47    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
48    pub mode: Option<Box<crate::models::PatchedWritableInterfaceRequestMode>>,
49    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
50    pub r#type: Option<crate::models::InterfaceTypeChoices>,
51    #[serde(rename = "port_type", skip_serializing_if = "Option::is_none")]
52    pub port_type: Option<Box<crate::models::PatchedWritableInterfaceRequestPortType>>,
53    /// This interface is used only for out-of-band management
54    #[serde(rename = "mgmt_only", skip_serializing_if = "Option::is_none")]
55    pub mgmt_only: Option<bool>,
56    #[serde(rename = "duplex", skip_serializing_if = "Option::is_none")]
57    pub duplex: Option<Box<crate::models::BulkWritableInterfaceTemplateRequestDuplex>>,
58    #[serde(
59        rename = "device",
60        default,
61        with = "::serde_with::rust::double_option",
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub device: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
65    #[serde(
66        rename = "module",
67        default,
68        with = "::serde_with::rust::double_option",
69        skip_serializing_if = "Option::is_none"
70    )]
71    pub module: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
72    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
73    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
74    #[serde(
75        rename = "role",
76        default,
77        with = "::serde_with::rust::double_option",
78        skip_serializing_if = "Option::is_none"
79    )]
80    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
81    #[serde(
82        rename = "parent_interface",
83        default,
84        with = "::serde_with::rust::double_option",
85        skip_serializing_if = "Option::is_none"
86    )]
87    pub parent_interface:
88        Option<Option<Box<crate::models::BulkWritableInterfaceRequestParentInterface>>>,
89    #[serde(
90        rename = "bridge",
91        default,
92        with = "::serde_with::rust::double_option",
93        skip_serializing_if = "Option::is_none"
94    )]
95    pub bridge: Option<Option<Box<crate::models::BridgeInterface>>>,
96    #[serde(
97        rename = "lag",
98        default,
99        with = "::serde_with::rust::double_option",
100        skip_serializing_if = "Option::is_none"
101    )]
102    pub lag: Option<Option<Box<crate::models::ParentLag>>>,
103    #[serde(
104        rename = "untagged_vlan",
105        default,
106        with = "::serde_with::rust::double_option",
107        skip_serializing_if = "Option::is_none"
108    )]
109    pub untagged_vlan: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
110    #[serde(
111        rename = "vrf",
112        default,
113        with = "::serde_with::rust::double_option",
114        skip_serializing_if = "Option::is_none"
115    )]
116    pub vrf: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
117    #[serde(rename = "tagged_vlans", skip_serializing_if = "Option::is_none")]
118    pub tagged_vlans: Option<Vec<crate::models::TaggedVlans>>,
119    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
120    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
121    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
122    pub relationships: Option<
123        ::std::collections::HashMap<
124            String,
125            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
126        >,
127    >,
128    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
129    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
130}
131
132impl PatchedWritableInterfaceRequest {
133    /// 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.
134    pub fn new() -> PatchedWritableInterfaceRequest {
135        PatchedWritableInterfaceRequest {
136            id: None,
137            mac_address: None,
138            speed: None,
139            name: None,
140            label: None,
141            description: None,
142            enabled: None,
143            mtu: None,
144            mode: None,
145            r#type: None,
146            port_type: None,
147            mgmt_only: None,
148            duplex: None,
149            device: None,
150            module: None,
151            status: None,
152            role: None,
153            parent_interface: None,
154            bridge: None,
155            lag: None,
156            untagged_vlan: None,
157            vrf: None,
158            tagged_vlans: None,
159            custom_fields: None,
160            relationships: None,
161            tags: None,
162        }
163    }
164}