netbox_openapi/models/
vlan_translation_rule.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/// VlanTranslationRule : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct VlanTranslationRule {
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", skip_serializing_if = "Option::is_none")]
20    pub display: Option<String>,
21    #[serde(rename = "policy")]
22    pub policy: i32,
23    /// Numeric VLAN ID (1-4094)
24    #[serde(rename = "local_vid")]
25    pub local_vid: i32,
26    /// Numeric VLAN ID (1-4094)
27    #[serde(rename = "remote_vid")]
28    pub remote_vid: i32,
29    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
30    pub description: Option<String>,
31}
32
33impl VlanTranslationRule {
34    /// Adds support for custom fields and tags.
35    pub fn new(policy: i32, local_vid: i32, remote_vid: i32) -> VlanTranslationRule {
36        VlanTranslationRule {
37            id: None,
38            url: None,
39            display: None,
40            policy,
41            local_vid,
42            remote_vid,
43            description: None,
44        }
45    }
46}