Skip to main content

nautobot_openapi/models/
controller_managed_device_group.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// ControllerManagedDeviceGroup : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct ControllerManagedDeviceGroup {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
18    pub object_type: Option<String>,
19    /// Human friendly display value
20    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
21    pub display: Option<String>,
22    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
23    pub url: Option<String>,
24    #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
25    pub natural_slug: Option<String>,
26    #[serde(
27        rename = "capabilities",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub capabilities: Option<Option<Vec<crate::models::ControllerCapabilitiesInner>>>,
33    /// Name of the controller device group
34    #[serde(rename = "name")]
35    pub name: String,
36    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
37    pub description: Option<String>,
38    /// Weight of the controller device group, used to sort the groups within its parent group
39    #[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
40    pub weight: Option<i32>,
41    #[serde(
42        rename = "parent",
43        default,
44        with = "::serde_with::rust::double_option",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub parent: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
48    #[serde(rename = "controller")]
49    pub controller: Box<crate::models::BulkWritableControllerManagedDeviceGroupRequestController>,
50    #[serde(
51        rename = "tenant",
52        default,
53        with = "::serde_with::rust::double_option",
54        skip_serializing_if = "Option::is_none"
55    )]
56    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
57    #[serde(
58        rename = "created",
59        default,
60        with = "::serde_with::rust::double_option",
61        skip_serializing_if = "Option::is_none"
62    )]
63    pub created: Option<Option<String>>,
64    #[serde(
65        rename = "last_updated",
66        default,
67        with = "::serde_with::rust::double_option",
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub last_updated: Option<Option<String>>,
71    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
72    pub notes_url: Option<String>,
73    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
74    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
75    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
76    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
77}
78
79impl ControllerManagedDeviceGroup {
80    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
81    pub fn new(
82        name: String,
83        controller: crate::models::BulkWritableControllerManagedDeviceGroupRequestController,
84    ) -> ControllerManagedDeviceGroup {
85        ControllerManagedDeviceGroup {
86            id: None,
87            object_type: None,
88            display: None,
89            url: None,
90            natural_slug: None,
91            capabilities: None,
92            name,
93            description: None,
94            weight: None,
95            parent: None,
96            controller: Box::new(controller),
97            tenant: None,
98            created: None,
99            last_updated: None,
100            notes_url: None,
101            custom_fields: None,
102            tags: None,
103        }
104    }
105}