Skip to main content

netbox_openapi/models/
patched_bulk_rack_reservation_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/// PatchedBulkRackReservationRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedBulkRackReservationRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "rack", skip_serializing_if = "Option::is_none")]
18    pub rack: Option<Box<crate::models::BulkRackReservationRequestRack>>,
19    #[serde(rename = "units", skip_serializing_if = "Option::is_none")]
20    pub units: Option<Vec<i32>>,
21    /// * `pending` - Pending * `active` - Active * `stale` - Stale
22    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
23    pub status: Option<Status>,
24    #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
25    pub user: Option<Box<crate::models::BookmarkRequestUser>>,
26    #[serde(
27        rename = "tenant",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
33    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
34    pub description: Option<String>,
35    #[serde(
36        rename = "owner",
37        default,
38        with = "::serde_with::rust::double_option",
39        skip_serializing_if = "Option::is_none"
40    )]
41    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
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 PatchedBulkRackReservationRequest {
51    /// Base serializer class for models inheriting from PrimaryModel.
52    pub fn new(id: i32) -> PatchedBulkRackReservationRequest {
53        PatchedBulkRackReservationRequest {
54            id,
55            rack: None,
56            units: None,
57            status: None,
58            user: None,
59            tenant: None,
60            description: None,
61            owner: None,
62            comments: None,
63            tags: None,
64            custom_fields: None,
65        }
66    }
67}
68
69/// * `pending` - Pending * `active` - Active * `stale` - Stale
70#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
71pub enum Status {
72    #[serde(rename = "pending")]
73    Pending,
74    #[serde(rename = "active")]
75    Active,
76    #[serde(rename = "stale")]
77    Stale,
78}
79
80impl Default for Status {
81    fn default() -> Status {
82        Self::Pending
83    }
84}