Skip to main content

nautobot_openapi/models/
cable_path.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#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct CablePath {
13    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
14    pub id: Option<uuid::Uuid>,
15    #[serde(rename = "origin_type", skip_serializing_if = "Option::is_none")]
16    pub origin_type: Option<String>,
17    #[serde(rename = "origin", skip_serializing_if = "Option::is_none")]
18    pub origin: Option<Box<crate::models::PathEndpoint>>,
19    #[serde(rename = "destination_type", skip_serializing_if = "Option::is_none")]
20    pub destination_type: Option<String>,
21    #[serde(
22        rename = "destination",
23        default,
24        with = "::serde_with::rust::double_option",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub destination: Option<Option<Box<crate::models::PathEndpoint>>>,
28    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
29    pub path: Option<Vec<crate::models::CableTermination>>,
30    #[serde(rename = "origin_id")]
31    pub origin_id: uuid::Uuid,
32    #[serde(
33        rename = "destination_id",
34        default,
35        with = "::serde_with::rust::double_option",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub destination_id: Option<Option<uuid::Uuid>>,
39    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
40    pub is_active: Option<bool>,
41    #[serde(rename = "is_split", skip_serializing_if = "Option::is_none")]
42    pub is_split: Option<bool>,
43}
44
45impl CablePath {
46    pub fn new(origin_id: uuid::Uuid) -> CablePath {
47        CablePath {
48            id: None,
49            origin_type: None,
50            origin: None,
51            destination_type: None,
52            destination: None,
53            path: None,
54            origin_id,
55            destination_id: None,
56            is_active: None,
57            is_split: None,
58        }
59    }
60}