Skip to main content

nautobot_openapi/models/
patched_bulk_writable_virtual_machine_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/// PatchedBulkWritableVirtualMachineRequest : 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 PatchedBulkWritableVirtualMachineRequest {
15    #[serde(rename = "id")]
16    pub id: 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(rename = "name", skip_serializing_if = "Option::is_none")]
32    pub name: Option<String>,
33    #[serde(
34        rename = "vcpus",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub vcpus: Option<Option<i32>>,
40    #[serde(
41        rename = "memory",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub memory: Option<Option<i32>>,
47    #[serde(
48        rename = "disk",
49        default,
50        with = "::serde_with::rust::double_option",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub disk: Option<Option<i32>>,
54    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
55    pub comments: Option<String>,
56    #[serde(
57        rename = "local_config_context_schema",
58        default,
59        with = "::serde_with::rust::double_option",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub local_config_context_schema:
63        Option<Option<Box<crate::models::BulkWritableConfigContextRequestConfigContextSchema>>>,
64    #[serde(
65        rename = "local_config_context_data_owner_content_type",
66        default,
67        with = "::serde_with::rust::double_option",
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub local_config_context_data_owner_content_type:
71        Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
72    #[serde(rename = "cluster", skip_serializing_if = "Option::is_none")]
73    pub cluster: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
74    #[serde(
75        rename = "tenant",
76        default,
77        with = "::serde_with::rust::double_option",
78        skip_serializing_if = "Option::is_none"
79    )]
80    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
81    #[serde(
82        rename = "platform",
83        default,
84        with = "::serde_with::rust::double_option",
85        skip_serializing_if = "Option::is_none"
86    )]
87    pub platform: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
88    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
89    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
90    #[serde(
91        rename = "role",
92        default,
93        with = "::serde_with::rust::double_option",
94        skip_serializing_if = "Option::is_none"
95    )]
96    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
97    #[serde(
98        rename = "primary_ip4",
99        default,
100        with = "::serde_with::rust::double_option",
101        skip_serializing_if = "Option::is_none"
102    )]
103    pub primary_ip4: Option<Option<Box<crate::models::PrimaryIpv4>>>,
104    #[serde(
105        rename = "primary_ip6",
106        default,
107        with = "::serde_with::rust::double_option",
108        skip_serializing_if = "Option::is_none"
109    )]
110    pub primary_ip6: Option<Option<Box<crate::models::PrimaryIpv6>>>,
111    #[serde(
112        rename = "software_version",
113        default,
114        with = "::serde_with::rust::double_option",
115        skip_serializing_if = "Option::is_none"
116    )]
117    pub software_version:
118        Option<Option<Box<crate::models::BulkWritableVirtualMachineRequestSoftwareVersion>>>,
119    /// Override the software image files associated with the software version for this virtual machine
120    #[serde(
121        rename = "software_image_files",
122        skip_serializing_if = "Option::is_none"
123    )]
124    pub software_image_files: Option<Vec<crate::models::SoftwareImageFiles>>,
125    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
126    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
127    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
128    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
129    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
130    pub relationships: Option<
131        ::std::collections::HashMap<
132            String,
133            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
134        >,
135    >,
136}
137
138impl PatchedBulkWritableVirtualMachineRequest {
139    /// 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.
140    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableVirtualMachineRequest {
141        PatchedBulkWritableVirtualMachineRequest {
142            id,
143            local_config_context_data: None,
144            local_config_context_data_owner_object_id: None,
145            name: None,
146            vcpus: None,
147            memory: None,
148            disk: None,
149            comments: None,
150            local_config_context_schema: None,
151            local_config_context_data_owner_content_type: None,
152            cluster: None,
153            tenant: None,
154            platform: None,
155            status: None,
156            role: None,
157            primary_ip4: None,
158            primary_ip6: None,
159            software_version: None,
160            software_image_files: None,
161            tags: None,
162            custom_fields: None,
163            relationships: None,
164        }
165    }
166}