Skip to main content

netbox_openapi/models/
patched_bulk_cluster_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/// PatchedBulkClusterRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedBulkClusterRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
20    pub r#type: Option<Box<crate::models::BulkClusterRequestType>>,
21    #[serde(
22        rename = "group",
23        default,
24        with = "::serde_with::rust::double_option",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub group: Option<Option<Box<crate::models::BulkClusterRequestGroup>>>,
28    /// * `planned` - Planned * `staging` - Staging * `active` - Active * `decommissioning` - Decommissioning * `offline` - Offline
29    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
30    pub status: Option<Status>,
31    #[serde(
32        rename = "tenant",
33        default,
34        with = "::serde_with::rust::double_option",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
38    #[serde(
39        rename = "scope_type",
40        default,
41        with = "::serde_with::rust::double_option",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub scope_type: Option<Option<String>>,
45    #[serde(
46        rename = "scope_id",
47        default,
48        with = "::serde_with::rust::double_option",
49        skip_serializing_if = "Option::is_none"
50    )]
51    pub scope_id: Option<Option<i32>>,
52    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
53    pub description: Option<String>,
54    #[serde(
55        rename = "owner",
56        default,
57        with = "::serde_with::rust::double_option",
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
61    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
62    pub comments: Option<String>,
63    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
64    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
65    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
66    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
67}
68
69impl PatchedBulkClusterRequest {
70    /// Base serializer class for models inheriting from PrimaryModel.
71    pub fn new(id: i32) -> PatchedBulkClusterRequest {
72        PatchedBulkClusterRequest {
73            id,
74            name: None,
75            r#type: None,
76            group: None,
77            status: None,
78            tenant: None,
79            scope_type: None,
80            scope_id: None,
81            description: None,
82            owner: None,
83            comments: None,
84            tags: None,
85            custom_fields: None,
86        }
87    }
88}
89
90/// * `planned` - Planned * `staging` - Staging * `active` - Active * `decommissioning` - Decommissioning * `offline` - Offline
91#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
92pub enum Status {
93    #[serde(rename = "planned")]
94    Planned,
95    #[serde(rename = "staging")]
96    Staging,
97    #[serde(rename = "active")]
98    Active,
99    #[serde(rename = "decommissioning")]
100    Decommissioning,
101    #[serde(rename = "offline")]
102    Offline,
103}
104
105impl Default for Status {
106    fn default() -> Status {
107        Self::Planned
108    }
109}