Skip to main content

nautobot_openapi/models/
vlan_request.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// VlanRequest : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct VlanRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(
18        rename = "location",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub location: Option<Option<Box<crate::models::BulkWritablePrefixRequestLocation>>>,
24    #[serde(rename = "vid")]
25    pub vid: i32,
26    #[serde(rename = "name")]
27    pub name: String,
28    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
29    pub description: Option<String>,
30    #[serde(
31        rename = "vlan_group",
32        default,
33        with = "::serde_with::rust::double_option",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub vlan_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
37    #[serde(rename = "status")]
38    pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
39    #[serde(
40        rename = "role",
41        default,
42        with = "::serde_with::rust::double_option",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
46    #[serde(
47        rename = "tenant",
48        default,
49        with = "::serde_with::rust::double_option",
50        skip_serializing_if = "Option::is_none"
51    )]
52    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
53    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
54    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
55    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
56    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
57    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
58    pub relationships: Option<
59        ::std::collections::HashMap<
60            String,
61            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
62        >,
63    >,
64}
65
66impl VlanRequest {
67    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
68    pub fn new(
69        vid: i32,
70        name: String,
71        status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
72    ) -> VlanRequest {
73        VlanRequest {
74            id: None,
75            location: None,
76            vid,
77            name,
78            description: None,
79            vlan_group: None,
80            status: Box::new(status),
81            role: None,
82            tenant: None,
83            tags: None,
84            custom_fields: None,
85            relationships: None,
86        }
87    }
88}