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