Skip to main content

nautobot_openapi/models/
console_server_port_template.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/// ConsoleServerPortTemplate : 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 ConsoleServerPortTemplate {
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 = "notes_url", skip_serializing_if = "Option::is_none")]
27    pub notes_url: Option<String>,
28    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
29    pub r#type: Option<Box<crate::models::ConsolePortType>>,
30    #[serde(rename = "name")]
31    pub name: String,
32    /// Physical label
33    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
34    pub label: Option<String>,
35    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
36    pub description: Option<String>,
37    #[serde(
38        rename = "device_type",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub device_type: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
44    #[serde(
45        rename = "module_type",
46        default,
47        with = "::serde_with::rust::double_option",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub module_type: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
51    #[serde(
52        rename = "created",
53        default,
54        with = "::serde_with::rust::double_option",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub created: Option<Option<String>>,
58    #[serde(
59        rename = "last_updated",
60        default,
61        with = "::serde_with::rust::double_option",
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub last_updated: Option<Option<String>>,
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 ConsoleServerPortTemplate {
70    /// 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.
71    pub fn new(name: String) -> ConsoleServerPortTemplate {
72        ConsoleServerPortTemplate {
73            id: None,
74            object_type: None,
75            display: None,
76            url: None,
77            natural_slug: None,
78            notes_url: None,
79            r#type: None,
80            name,
81            label: None,
82            description: None,
83            device_type: None,
84            module_type: None,
85            created: None,
86            last_updated: None,
87            custom_fields: None,
88        }
89    }
90}