Skip to main content

netbox_openapi/models/
patched_bulk_prefix_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/// PatchedBulkPrefixRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedBulkPrefixRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "prefix", skip_serializing_if = "Option::is_none")]
18    pub prefix: Option<String>,
19    #[serde(
20        rename = "vrf",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub vrf: Option<Option<Box<crate::models::BulkIpAddressRequestVrf>>>,
26    #[serde(
27        rename = "scope_type",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub scope_type: Option<Option<String>>,
33    #[serde(
34        rename = "scope_id",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub scope_id: Option<Option<i32>>,
40    #[serde(
41        rename = "tenant",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
47    #[serde(
48        rename = "vlan",
49        default,
50        with = "::serde_with::rust::double_option",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub vlan: Option<Option<Box<crate::models::BulkInterfaceRequestUntaggedVlan>>>,
54    /// * `container` - Container * `active` - Active * `reserved` - Reserved * `deprecated` - Deprecated
55    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
56    pub status: Option<Status>,
57    #[serde(
58        rename = "role",
59        default,
60        with = "::serde_with::rust::double_option",
61        skip_serializing_if = "Option::is_none"
62    )]
63    pub role: Option<Option<Box<crate::models::AsnRequestRole>>>,
64    /// All IP addresses within this prefix are considered usable
65    #[serde(rename = "is_pool", skip_serializing_if = "Option::is_none")]
66    pub is_pool: Option<bool>,
67    /// Treat as fully utilized
68    #[serde(rename = "mark_utilized", skip_serializing_if = "Option::is_none")]
69    pub mark_utilized: Option<bool>,
70    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
71    pub description: Option<String>,
72    #[serde(
73        rename = "owner",
74        default,
75        with = "::serde_with::rust::double_option",
76        skip_serializing_if = "Option::is_none"
77    )]
78    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
79    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
80    pub comments: Option<String>,
81    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
82    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
83    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
84    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
85}
86
87impl PatchedBulkPrefixRequest {
88    /// Base serializer class for models inheriting from PrimaryModel.
89    pub fn new(id: i32) -> PatchedBulkPrefixRequest {
90        PatchedBulkPrefixRequest {
91            id,
92            prefix: None,
93            vrf: None,
94            scope_type: None,
95            scope_id: None,
96            tenant: None,
97            vlan: None,
98            status: None,
99            role: None,
100            is_pool: None,
101            mark_utilized: None,
102            description: None,
103            owner: None,
104            comments: None,
105            tags: None,
106            custom_fields: None,
107        }
108    }
109}
110
111/// * `container` - Container * `active` - Active * `reserved` - Reserved * `deprecated` - Deprecated
112#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
113pub enum Status {
114    #[serde(rename = "container")]
115    Container,
116    #[serde(rename = "active")]
117    Active,
118    #[serde(rename = "reserved")]
119    Reserved,
120    #[serde(rename = "deprecated")]
121    Deprecated,
122}
123
124impl Default for Status {
125    fn default() -> Status {
126        Self::Container
127    }
128}