Skip to main content

nautobot_openapi/models/
patched_writable_device_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/// PatchedWritableDeviceRequest : 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 PatchedWritableDeviceRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(
18        rename = "local_config_context_data",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub local_config_context_data: Option<Option<serde_json::Value>>,
24    #[serde(
25        rename = "local_config_context_data_owner_object_id",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub local_config_context_data_owner_object_id: Option<Option<uuid::Uuid>>,
31    #[serde(
32        rename = "name",
33        default,
34        with = "::serde_with::rust::double_option",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub name: Option<Option<String>>,
38    #[serde(rename = "serial", skip_serializing_if = "Option::is_none")]
39    pub serial: Option<String>,
40    /// A unique tag used to identify this device
41    #[serde(
42        rename = "asset_tag",
43        default,
44        with = "::serde_with::rust::double_option",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub asset_tag: Option<Option<String>>,
48    /// The lowest-numbered unit occupied by the device
49    #[serde(
50        rename = "position",
51        default,
52        with = "::serde_with::rust::double_option",
53        skip_serializing_if = "Option::is_none"
54    )]
55    pub position: Option<Option<i32>>,
56    #[serde(rename = "face", skip_serializing_if = "Option::is_none")]
57    pub face: Option<Box<crate::models::RackFace>>,
58    /// The priority the device has in the device redundancy group.
59    #[serde(
60        rename = "device_redundancy_group_priority",
61        default,
62        with = "::serde_with::rust::double_option",
63        skip_serializing_if = "Option::is_none"
64    )]
65    pub device_redundancy_group_priority: Option<Option<i32>>,
66    #[serde(
67        rename = "vc_position",
68        default,
69        with = "::serde_with::rust::double_option",
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub vc_position: Option<Option<i32>>,
73    #[serde(
74        rename = "vc_priority",
75        default,
76        with = "::serde_with::rust::double_option",
77        skip_serializing_if = "Option::is_none"
78    )]
79    pub vc_priority: Option<Option<i32>>,
80    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
81    pub comments: Option<String>,
82    #[serde(
83        rename = "local_config_context_schema",
84        default,
85        with = "::serde_with::rust::double_option",
86        skip_serializing_if = "Option::is_none"
87    )]
88    pub local_config_context_schema:
89        Option<Option<Box<crate::models::BulkWritableConfigContextRequestConfigContextSchema>>>,
90    #[serde(
91        rename = "local_config_context_data_owner_content_type",
92        default,
93        with = "::serde_with::rust::double_option",
94        skip_serializing_if = "Option::is_none"
95    )]
96    pub local_config_context_data_owner_content_type:
97        Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
98    #[serde(rename = "device_type", skip_serializing_if = "Option::is_none")]
99    pub device_type: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
100    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
101    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
102    #[serde(rename = "role", skip_serializing_if = "Option::is_none")]
103    pub role: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
104    #[serde(
105        rename = "tenant",
106        default,
107        with = "::serde_with::rust::double_option",
108        skip_serializing_if = "Option::is_none"
109    )]
110    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
111    #[serde(
112        rename = "platform",
113        default,
114        with = "::serde_with::rust::double_option",
115        skip_serializing_if = "Option::is_none"
116    )]
117    pub platform: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
118    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
119    pub location: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
120    #[serde(
121        rename = "rack",
122        default,
123        with = "::serde_with::rust::double_option",
124        skip_serializing_if = "Option::is_none"
125    )]
126    pub rack: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
127    #[serde(
128        rename = "primary_ip4",
129        default,
130        with = "::serde_with::rust::double_option",
131        skip_serializing_if = "Option::is_none"
132    )]
133    pub primary_ip4: Option<Option<Box<crate::models::PrimaryIpv4>>>,
134    #[serde(
135        rename = "primary_ip6",
136        default,
137        with = "::serde_with::rust::double_option",
138        skip_serializing_if = "Option::is_none"
139    )]
140    pub primary_ip6: Option<Option<Box<crate::models::PrimaryIpv6>>>,
141    #[serde(
142        rename = "virtual_chassis",
143        default,
144        with = "::serde_with::rust::double_option",
145        skip_serializing_if = "Option::is_none"
146    )]
147    pub virtual_chassis: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
148    #[serde(
149        rename = "device_redundancy_group",
150        default,
151        with = "::serde_with::rust::double_option",
152        skip_serializing_if = "Option::is_none"
153    )]
154    pub device_redundancy_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
155    #[serde(
156        rename = "software_version",
157        default,
158        with = "::serde_with::rust::double_option",
159        skip_serializing_if = "Option::is_none"
160    )]
161    pub software_version:
162        Option<Option<Box<crate::models::BulkWritableDeviceRequestSoftwareVersion>>>,
163    #[serde(
164        rename = "secrets_group",
165        default,
166        with = "::serde_with::rust::double_option",
167        skip_serializing_if = "Option::is_none"
168    )]
169    pub secrets_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
170    #[serde(
171        rename = "controller_managed_device_group",
172        default,
173        with = "::serde_with::rust::double_option",
174        skip_serializing_if = "Option::is_none"
175    )]
176    pub controller_managed_device_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
177    /// Override the software image files associated with the software version for this device
178    #[serde(
179        rename = "software_image_files",
180        skip_serializing_if = "Option::is_none"
181    )]
182    pub software_image_files: Option<Vec<crate::models::SoftwareImageFiles>>,
183    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
184    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
185    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
186    pub relationships: Option<
187        ::std::collections::HashMap<
188            String,
189            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
190        >,
191    >,
192    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
193    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
194    #[serde(
195        rename = "parent_bay",
196        default,
197        with = "::serde_with::rust::double_option",
198        skip_serializing_if = "Option::is_none"
199    )]
200    pub parent_bay: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
201}
202
203impl PatchedWritableDeviceRequest {
204    /// 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.
205    pub fn new() -> PatchedWritableDeviceRequest {
206        PatchedWritableDeviceRequest {
207            id: None,
208            local_config_context_data: None,
209            local_config_context_data_owner_object_id: None,
210            name: None,
211            serial: None,
212            asset_tag: None,
213            position: None,
214            face: None,
215            device_redundancy_group_priority: None,
216            vc_position: None,
217            vc_priority: None,
218            comments: None,
219            local_config_context_schema: None,
220            local_config_context_data_owner_content_type: None,
221            device_type: None,
222            status: None,
223            role: None,
224            tenant: None,
225            platform: None,
226            location: None,
227            rack: None,
228            primary_ip4: None,
229            primary_ip6: None,
230            virtual_chassis: None,
231            device_redundancy_group: None,
232            software_version: None,
233            secrets_group: None,
234            controller_managed_device_group: None,
235            software_image_files: None,
236            custom_fields: None,
237            relationships: None,
238            tags: None,
239            parent_bay: None,
240        }
241    }
242}