netbox_openapi/models/
patched_vlan_group_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/// PatchedVlanGroupRequest : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedVlanGroupRequest {
15    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
16    pub name: Option<String>,
17    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
18    pub slug: Option<String>,
19    #[serde(
20        rename = "scope_type",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub scope_type: Option<Option<String>>,
26    #[serde(
27        rename = "scope_id",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub scope_id: Option<Option<i32>>,
33    #[serde(rename = "vid_ranges", skip_serializing_if = "Option::is_none")]
34    pub vid_ranges: Option<Vec<Vec<Vec<i32>>>>,
35    #[serde(
36        rename = "tenant",
37        default,
38        with = "::serde_with::rust::double_option",
39        skip_serializing_if = "Option::is_none"
40    )]
41    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
42    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
43    pub description: 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 PatchedVlanGroupRequest {
51    /// Adds support for custom fields and tags.
52    pub fn new() -> PatchedVlanGroupRequest {
53        PatchedVlanGroupRequest {
54            name: None,
55            slug: None,
56            scope_type: None,
57            scope_id: None,
58            vid_ranges: None,
59            tenant: None,
60            description: None,
61            tags: None,
62            custom_fields: None,
63        }
64    }
65}