Skip to main content

netbox_openapi/models/
bulk_power_panel_request.rs

1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.6.8 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BulkPowerPanelRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkPowerPanelRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "site")]
18    pub site: Box<crate::models::BulkDeviceWithConfigContextRequestSite>,
19    #[serde(
20        rename = "location",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub location: Option<Option<Box<crate::models::BulkDeviceWithConfigContextRequestLocation>>>,
26    #[serde(rename = "name")]
27    pub name: String,
28    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
29    pub description: Option<String>,
30    #[serde(
31        rename = "owner",
32        default,
33        with = "::serde_with::rust::double_option",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
37    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
38    pub comments: Option<String>,
39    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
40    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
41    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
42    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
43}
44
45impl BulkPowerPanelRequest {
46    /// Base serializer class for models inheriting from PrimaryModel.
47    pub fn new(
48        id: i32,
49        site: crate::models::BulkDeviceWithConfigContextRequestSite,
50        name: String,
51    ) -> BulkPowerPanelRequest {
52        BulkPowerPanelRequest {
53            id,
54            site: Box::new(site),
55            location: None,
56            name,
57            description: None,
58            owner: None,
59            comments: None,
60            tags: None,
61            custom_fields: None,
62        }
63    }
64}