netbox_openapi/models/
circuit_circuit_termination_request.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/// CircuitCircuitTerminationRequest : 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 CircuitCircuitTerminationRequest {
15    #[serde(
16        rename = "termination_type",
17        default,
18        with = "::serde_with::rust::double_option",
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub termination_type: Option<Option<String>>,
22    #[serde(
23        rename = "termination_id",
24        default,
25        with = "::serde_with::rust::double_option",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub termination_id: Option<Option<i32>>,
29    /// Physical circuit speed
30    #[serde(
31        rename = "port_speed",
32        default,
33        with = "::serde_with::rust::double_option",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub port_speed: Option<Option<i32>>,
37    /// Upstream speed, if different from port speed
38    #[serde(
39        rename = "upstream_speed",
40        default,
41        with = "::serde_with::rust::double_option",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub upstream_speed: Option<Option<i32>>,
45    /// ID of the local cross-connect
46    #[serde(rename = "xconnect_id", skip_serializing_if = "Option::is_none")]
47    pub xconnect_id: Option<String>,
48    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
49    pub description: Option<String>,
50}
51
52impl CircuitCircuitTerminationRequest {
53    /// 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.
54    pub fn new() -> CircuitCircuitTerminationRequest {
55        CircuitCircuitTerminationRequest {
56            termination_type: None,
57            termination_id: None,
58            port_speed: None,
59            upstream_speed: None,
60            xconnect_id: None,
61            description: None,
62        }
63    }
64}