Skip to main content

netbox_openapi/models/
front_port_mapping.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.6.2 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct FrontPortMapping {
13    #[serde(rename = "position")]
14    pub position: i32,
15    #[serde(rename = "rear_port")]
16    pub rear_port: i32,
17    #[serde(rename = "rear_port_position", skip_serializing_if = "Option::is_none")]
18    pub rear_port_position: Option<i32>,
19}
20
21impl FrontPortMapping {
22    pub fn new(position: i32, rear_port: i32) -> FrontPortMapping {
23        FrontPortMapping {
24            position,
25            rear_port,
26            rear_port_position: None,
27        }
28    }
29}