Skip to main content

nautobot_openapi/models/
bulk_writable_interface_vdc_assignment_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/// BulkWritableInterfaceVdcAssignmentRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableInterfaceVdcAssignmentRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(rename = "virtual_device_context")]
18    pub virtual_device_context:
19        Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
20    #[serde(rename = "interface")]
21    pub interface: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
22}
23
24impl BulkWritableInterfaceVdcAssignmentRequest {
25    /// Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
26    pub fn new(
27        id: uuid::Uuid,
28        virtual_device_context: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
29        interface: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
30    ) -> BulkWritableInterfaceVdcAssignmentRequest {
31        BulkWritableInterfaceVdcAssignmentRequest {
32            id,
33            virtual_device_context: Box::new(virtual_device_context),
34            interface: Box::new(interface),
35        }
36    }
37}