Skip to main content

netbox_openapi/models/
bulk_vlan_translation_rule_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.6.8 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BulkVlanTranslationRuleRequest : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkVlanTranslationRuleRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "policy")]
18    pub policy: i32,
19    /// Numeric VLAN ID (1-4094)
20    #[serde(rename = "local_vid")]
21    pub local_vid: i32,
22    /// Numeric VLAN ID (1-4094)
23    #[serde(rename = "remote_vid")]
24    pub remote_vid: i32,
25    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
26    pub description: Option<String>,
27}
28
29impl BulkVlanTranslationRuleRequest {
30    /// Adds support for custom fields and tags.
31    pub fn new(
32        id: i32,
33        policy: i32,
34        local_vid: i32,
35        remote_vid: i32,
36    ) -> BulkVlanTranslationRuleRequest {
37        BulkVlanTranslationRuleRequest {
38            id,
39            policy,
40            local_vid,
41            remote_vid,
42            description: None,
43        }
44    }
45}