Skip to main content

netbox_openapi/models/
patched_bulk_l2_vpn_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/// PatchedBulkL2VpnRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedBulkL2VpnRequest {
15    #[serde(rename = "id")]
16    pub id: i32,
17    #[serde(
18        rename = "identifier",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub identifier: Option<Option<i64>>,
24    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
25    pub name: Option<String>,
26    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
27    pub slug: Option<String>,
28    /// * `vpws` - VPWS * `vpls` - VPLS * `vxlan` - VXLAN * `vxlan-evpn` - VXLAN-EVPN * `mpls-evpn` - MPLS EVPN * `pbb-evpn` - PBB EVPN * `evpn-vpws` - EVPN VPWS * `epl` - EPL * `evpl` - EVPL * `ep-lan` - Ethernet Private LAN * `evp-lan` - Ethernet Virtual Private LAN * `ep-tree` - Ethernet Private Tree * `evp-tree` - Ethernet Virtual Private Tree * `spb` - SPB
29    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
30    pub r#type: Option<RHashType>,
31    /// * `active` - Active * `planned` - Planned * `decommissioning` - Decommissioning
32    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
33    pub status: Option<Status>,
34    #[serde(rename = "import_targets", skip_serializing_if = "Option::is_none")]
35    pub import_targets: Option<Vec<i32>>,
36    #[serde(rename = "export_targets", skip_serializing_if = "Option::is_none")]
37    pub export_targets: Option<Vec<i32>>,
38    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
39    pub description: Option<String>,
40    #[serde(
41        rename = "owner",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
47    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
48    pub comments: Option<String>,
49    #[serde(
50        rename = "tenant",
51        default,
52        with = "::serde_with::rust::double_option",
53        skip_serializing_if = "Option::is_none"
54    )]
55    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
56    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
57    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
58    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
59    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
60}
61
62impl PatchedBulkL2VpnRequest {
63    /// Base serializer class for models inheriting from PrimaryModel.
64    pub fn new(id: i32) -> PatchedBulkL2VpnRequest {
65        PatchedBulkL2VpnRequest {
66            id,
67            identifier: None,
68            name: None,
69            slug: None,
70            r#type: None,
71            status: None,
72            import_targets: None,
73            export_targets: None,
74            description: None,
75            owner: None,
76            comments: None,
77            tenant: None,
78            tags: None,
79            custom_fields: None,
80        }
81    }
82}
83
84/// * `vpws` - VPWS * `vpls` - VPLS * `vxlan` - VXLAN * `vxlan-evpn` - VXLAN-EVPN * `mpls-evpn` - MPLS EVPN * `pbb-evpn` - PBB EVPN * `evpn-vpws` - EVPN VPWS * `epl` - EPL * `evpl` - EVPL * `ep-lan` - Ethernet Private LAN * `evp-lan` - Ethernet Virtual Private LAN * `ep-tree` - Ethernet Private Tree * `evp-tree` - Ethernet Virtual Private Tree * `spb` - SPB
85#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
86pub enum RHashType {
87    #[serde(rename = "vpws")]
88    Vpws,
89    #[serde(rename = "vpls")]
90    Vpls,
91    #[serde(rename = "vxlan")]
92    Vxlan,
93    #[serde(rename = "vxlan-evpn")]
94    VxlanEvpn,
95    #[serde(rename = "mpls-evpn")]
96    MplsEvpn,
97    #[serde(rename = "pbb-evpn")]
98    PbbEvpn,
99    #[serde(rename = "evpn-vpws")]
100    EvpnVpws,
101    #[serde(rename = "epl")]
102    Epl,
103    #[serde(rename = "evpl")]
104    Evpl,
105    #[serde(rename = "ep-lan")]
106    EpLan,
107    #[serde(rename = "evp-lan")]
108    EvpLan,
109    #[serde(rename = "ep-tree")]
110    EpTree,
111    #[serde(rename = "evp-tree")]
112    EvpTree,
113    #[serde(rename = "spb")]
114    Spb,
115}
116
117impl Default for RHashType {
118    fn default() -> RHashType {
119        Self::Vpws
120    }
121}
122/// * `active` - Active * `planned` - Planned * `decommissioning` - Decommissioning
123#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
124pub enum Status {
125    #[serde(rename = "active")]
126    Active,
127    #[serde(rename = "planned")]
128    Planned,
129    #[serde(rename = "decommissioning")]
130    Decommissioning,
131}
132
133impl Default for Status {
134    fn default() -> Status {
135        Self::Active
136    }
137}