Skip to main content

nautobot_openapi/models/
virtual_chassis.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/// VirtualChassis : 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 VirtualChassis {
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(rename = "member_count", skip_serializing_if = "Option::is_none")]
27    pub member_count: Option<i32>,
28    #[serde(rename = "name")]
29    pub name: String,
30    #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
31    pub domain: Option<String>,
32    #[serde(
33        rename = "master",
34        default,
35        with = "::serde_with::rust::double_option",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub master: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
39    #[serde(
40        rename = "created",
41        default,
42        with = "::serde_with::rust::double_option",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub created: Option<Option<String>>,
46    #[serde(
47        rename = "last_updated",
48        default,
49        with = "::serde_with::rust::double_option",
50        skip_serializing_if = "Option::is_none"
51    )]
52    pub last_updated: Option<Option<String>>,
53    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
54    pub notes_url: Option<String>,
55    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
56    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
57    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
58    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
59}
60
61impl VirtualChassis {
62    /// 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.
63    pub fn new(name: String) -> VirtualChassis {
64        VirtualChassis {
65            id: None,
66            object_type: None,
67            display: None,
68            url: None,
69            natural_slug: None,
70            member_count: None,
71            name,
72            domain: None,
73            master: None,
74            created: None,
75            last_updated: None,
76            notes_url: None,
77            custom_fields: None,
78            tags: None,
79        }
80    }
81}