Skip to main content

nautobot_openapi/models/
console_port.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/// ConsolePort : 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 ConsolePort {
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 = "cable_peer_type",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub cable_peer_type: Option<Option<String>>,
33    #[serde(
34        rename = "cable_peer",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub cable_peer: Option<Option<Box<crate::models::CableTermination>>>,
40    #[serde(
41        rename = "connected_endpoint_type",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub connected_endpoint_type: Option<Option<String>>,
47    #[serde(
48        rename = "connected_endpoint",
49        default,
50        with = "::serde_with::rust::double_option",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub connected_endpoint: Option<Option<Box<crate::models::PathEndpoint>>>,
54    #[serde(
55        rename = "connected_endpoint_reachable",
56        default,
57        with = "::serde_with::rust::double_option",
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub connected_endpoint_reachable: Option<Option<bool>>,
61    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
62    pub r#type: Option<Box<crate::models::ConsolePortType>>,
63    #[serde(rename = "name")]
64    pub name: String,
65    /// Physical label
66    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
67    pub label: Option<String>,
68    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
69    pub description: Option<String>,
70    #[serde(
71        rename = "device",
72        default,
73        with = "::serde_with::rust::double_option",
74        skip_serializing_if = "Option::is_none"
75    )]
76    pub device: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
77    #[serde(
78        rename = "module",
79        default,
80        with = "::serde_with::rust::double_option",
81        skip_serializing_if = "Option::is_none"
82    )]
83    pub module: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
84    #[serde(
85        rename = "cable",
86        default,
87        with = "::serde_with::rust::double_option",
88        skip_serializing_if = "Option::is_none"
89    )]
90    pub cable: Option<Option<Box<crate::models::CircuitCircuitTerminationA>>>,
91    #[serde(
92        rename = "created",
93        default,
94        with = "::serde_with::rust::double_option",
95        skip_serializing_if = "Option::is_none"
96    )]
97    pub created: Option<Option<String>>,
98    #[serde(
99        rename = "last_updated",
100        default,
101        with = "::serde_with::rust::double_option",
102        skip_serializing_if = "Option::is_none"
103    )]
104    pub last_updated: Option<Option<String>>,
105    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
106    pub notes_url: Option<String>,
107    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
108    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
109    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
110    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
111}
112
113impl ConsolePort {
114    /// 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.
115    pub fn new(name: String) -> ConsolePort {
116        ConsolePort {
117            id: None,
118            object_type: None,
119            display: None,
120            url: None,
121            natural_slug: None,
122            cable_peer_type: None,
123            cable_peer: None,
124            connected_endpoint_type: None,
125            connected_endpoint: None,
126            connected_endpoint_reachable: None,
127            r#type: None,
128            name,
129            label: None,
130            description: None,
131            device: None,
132            module: None,
133            cable: None,
134            created: None,
135            last_updated: None,
136            notes_url: None,
137            custom_fields: None,
138            tags: None,
139        }
140    }
141}