Skip to main content

netbox_openapi/models/
patched_writable_platform_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.2 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedWritablePlatformRequest : Base serializer class for models inheriting from NestedGroupModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritablePlatformRequest {
15    #[serde(
16        rename = "parent",
17        default,
18        with = "::serde_with::rust::double_option",
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub parent: Option<Option<i32>>,
22    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
23    pub name: Option<String>,
24    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
25    pub slug: Option<String>,
26    #[serde(
27        rename = "manufacturer",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub manufacturer: Option<Option<Box<crate::models::InventoryItemRequestManufacturer>>>,
33    #[serde(
34        rename = "config_template",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub config_template: Option<Option<Box<crate::models::DeviceRoleRequestConfigTemplate>>>,
40    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
41    pub description: Option<String>,
42    #[serde(
43        rename = "owner",
44        default,
45        with = "::serde_with::rust::double_option",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
49    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
50    pub comments: Option<String>,
51    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
52    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
53    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
54    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
55}
56
57impl PatchedWritablePlatformRequest {
58    /// Base serializer class for models inheriting from NestedGroupModel.
59    pub fn new() -> PatchedWritablePlatformRequest {
60        PatchedWritablePlatformRequest {
61            parent: None,
62            name: None,
63            slug: None,
64            manufacturer: None,
65            config_template: None,
66            description: None,
67            owner: None,
68            comments: None,
69            tags: None,
70            custom_fields: None,
71        }
72    }
73}