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