Skip to main content

nautobot_openapi/models/
patched_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/// PatchedBulkWritableInterfaceVdcAssignmentRequest : 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 PatchedBulkWritableInterfaceVdcAssignmentRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(
18        rename = "virtual_device_context",
19        skip_serializing_if = "Option::is_none"
20    )]
21    pub virtual_device_context:
22        Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
23    #[serde(rename = "interface", skip_serializing_if = "Option::is_none")]
24    pub interface: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
25}
26
27impl PatchedBulkWritableInterfaceVdcAssignmentRequest {
28    /// 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>)
29    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableInterfaceVdcAssignmentRequest {
30        PatchedBulkWritableInterfaceVdcAssignmentRequest {
31            id,
32            virtual_device_context: None,
33            interface: None,
34        }
35    }
36}