netbox_openapi/models/
brief_vrf.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/// BriefVrf : Adds support for custom fields and tags.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BriefVrf {
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 = "name")]
22    pub name: String,
23    /// Unique route distinguisher (as defined in RFC 4364)
24    #[serde(
25        rename = "rd",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub rd: Option<Option<String>>,
31    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
32    pub description: Option<String>,
33    #[serde(rename = "prefix_count", skip_serializing_if = "Option::is_none")]
34    pub prefix_count: Option<i64>,
35}
36
37impl BriefVrf {
38    /// Adds support for custom fields and tags.
39    pub fn new(name: String) -> BriefVrf {
40        BriefVrf {
41            id: None,
42            url: None,
43            display: None,
44            name,
45            rd: None,
46            description: None,
47            prefix_count: None,
48        }
49    }
50}