Skip to main content

netbox_openapi/models/
bulk_l2_vpn_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.6.3 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BulkL2VpnTerminationRequest : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkL2VpnTerminationRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(rename = "l2vpn")]
18    pub l2vpn: Box<crate::models::BriefL2VpnTerminationRequestL2vpn>,
19    #[serde(rename = "assigned_object_type")]
20    pub assigned_object_type: String,
21    #[serde(rename = "assigned_object_id")]
22    pub assigned_object_id: i64,
23    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
24    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
25    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
26    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
27}
28
29impl BulkL2VpnTerminationRequest {
30    /// Adds support for custom fields and tags.
31    pub fn new(
32        id: i32,
33        l2vpn: crate::models::BriefL2VpnTerminationRequestL2vpn,
34        assigned_object_type: String,
35        assigned_object_id: i64,
36    ) -> BulkL2VpnTerminationRequest {
37        BulkL2VpnTerminationRequest {
38            id,
39            l2vpn: Box::new(l2vpn),
40            assigned_object_type,
41            assigned_object_id,
42            tags: None,
43            custom_fields: None,
44        }
45    }
46}