netbox_openapi/models/
cable_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/// CableTerminationRequest : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct CableTerminationRequest {
15    #[serde(rename = "cable")]
16    pub cable: i32,
17    /// * `A` - A * `B` - B
18    #[serde(rename = "cable_end")]
19    pub cable_end: CableEnd,
20    #[serde(rename = "termination_type")]
21    pub termination_type: String,
22    #[serde(rename = "termination_id")]
23    pub termination_id: i64,
24}
25
26impl CableTerminationRequest {
27    /// Adds support for custom fields and tags.
28    pub fn new(
29        cable: i32,
30        cable_end: CableEnd,
31        termination_type: String,
32        termination_id: i64,
33    ) -> CableTerminationRequest {
34        CableTerminationRequest {
35            cable,
36            cable_end,
37            termination_type,
38            termination_id,
39        }
40    }
41}
42
43/// * `A` - A * `B` - B
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum CableEnd {
46    #[serde(rename = "A")]
47    A,
48    #[serde(rename = "B")]
49    B,
50}
51
52impl Default for CableEnd {
53    fn default() -> CableEnd {
54        Self::A
55    }
56}