netbox_openapi/models/
circuit_circuit_termination.rs

1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// CircuitCircuitTermination : Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a dictionary of attributes which can be used to uniquely identify the related object. This class should be subclassed to return a full representation of the related object on read.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct CircuitCircuitTermination {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<i32>,
17    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
18    pub url: Option<String>,
19    #[serde(rename = "display_url", skip_serializing_if = "Option::is_none")]
20    pub display_url: Option<String>,
21    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
22    pub display: Option<String>,
23    #[serde(
24        rename = "termination_type",
25        default,
26        with = "::serde_with::rust::double_option",
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub termination_type: Option<Option<String>>,
30    #[serde(
31        rename = "termination_id",
32        default,
33        with = "::serde_with::rust::double_option",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub termination_id: Option<Option<i32>>,
37    #[serde(
38        rename = "termination",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub termination: Option<Option<serde_json::Value>>,
44    /// Physical circuit speed
45    #[serde(
46        rename = "port_speed",
47        default,
48        with = "::serde_with::rust::double_option",
49        skip_serializing_if = "Option::is_none"
50    )]
51    pub port_speed: Option<Option<i32>>,
52    /// Upstream speed, if different from port speed
53    #[serde(
54        rename = "upstream_speed",
55        default,
56        with = "::serde_with::rust::double_option",
57        skip_serializing_if = "Option::is_none"
58    )]
59    pub upstream_speed: Option<Option<i32>>,
60    /// ID of the local cross-connect
61    #[serde(rename = "xconnect_id", skip_serializing_if = "Option::is_none")]
62    pub xconnect_id: Option<String>,
63    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
64    pub description: Option<String>,
65}
66
67impl CircuitCircuitTermination {
68    /// Represents an object related through a ForeignKey field. On write, it accepts a primary key (PK) value or a dictionary of attributes which can be used to uniquely identify the related object. This class should be subclassed to return a full representation of the related object on read.
69    pub fn new() -> CircuitCircuitTermination {
70        CircuitCircuitTermination {
71            id: None,
72            url: None,
73            display_url: None,
74            display: None,
75            termination_type: None,
76            termination_id: None,
77            termination: None,
78            port_speed: None,
79            upstream_speed: None,
80            xconnect_id: None,
81            description: None,
82        }
83    }
84}