Skip to main content

nautobot_openapi/models/
bulk_writable_controller_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/// BulkWritableControllerRequest : 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 BulkWritableControllerRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(
18        rename = "capabilities",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub capabilities: Option<Option<Vec<crate::models::CapabilitiesEnum>>>,
24    #[serde(rename = "name")]
25    pub name: String,
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    #[serde(rename = "status")]
29    pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
30    #[serde(rename = "location")]
31    pub location: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
32    #[serde(
33        rename = "platform",
34        default,
35        with = "::serde_with::rust::double_option",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub platform: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
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(
54        rename = "external_integration",
55        default,
56        with = "::serde_with::rust::double_option",
57        skip_serializing_if = "Option::is_none"
58    )]
59    pub external_integration: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
60    #[serde(
61        rename = "controller_device",
62        default,
63        with = "::serde_with::rust::double_option",
64        skip_serializing_if = "Option::is_none"
65    )]
66    pub controller_device: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
67    #[serde(
68        rename = "controller_device_redundancy_group",
69        default,
70        with = "::serde_with::rust::double_option",
71        skip_serializing_if = "Option::is_none"
72    )]
73    pub controller_device_redundancy_group:
74        Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
75    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
76    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
77    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
78    pub relationships: Option<
79        ::std::collections::HashMap<
80            String,
81            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
82        >,
83    >,
84    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
85    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
86}
87
88impl BulkWritableControllerRequest {
89    /// 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.
90    pub fn new(
91        id: uuid::Uuid,
92        name: String,
93        status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
94        location: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
95    ) -> BulkWritableControllerRequest {
96        BulkWritableControllerRequest {
97            id,
98            capabilities: None,
99            name,
100            description: None,
101            status: Box::new(status),
102            location: Box::new(location),
103            platform: None,
104            role: None,
105            tenant: None,
106            external_integration: None,
107            controller_device: None,
108            controller_device_redundancy_group: None,
109            custom_fields: None,
110            relationships: None,
111            tags: None,
112        }
113    }
114}