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.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedWritablePlatformRequest : Extends PrimaryModelSerializer to include MPTT support.
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(rename = "comments", skip_serializing_if = "Option::is_none")]
43    pub comments: Option<String>,
44    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
45    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
46    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
47    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
48}
49
50impl PatchedWritablePlatformRequest {
51    /// Extends PrimaryModelSerializer to include MPTT support.
52    pub fn new() -> PatchedWritablePlatformRequest {
53        PatchedWritablePlatformRequest {
54            parent: None,
55            name: None,
56            slug: None,
57            manufacturer: None,
58            config_template: None,
59            description: None,
60            comments: None,
61            tags: None,
62            custom_fields: None,
63        }
64    }
65}