/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

/// PatchedWritableVmInterfaceRequest : 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.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedWritableVmInterfaceRequest {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(
        rename = "mac_address",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub mac_address: Option<Option<String>>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(
        rename = "mtu",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub mtu: Option<Option<i32>>,
    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
    pub mode: Option<Box<crate::models::PatchedWritableInterfaceRequestMode>>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(
        rename = "role",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub role: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(
        rename = "parent_interface",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub parent_interface:
        Option<Option<Box<crate::models::BulkWritableInterfaceRequestParentInterface>>>,
    #[serde(
        rename = "bridge",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub bridge: Option<Option<Box<crate::models::BridgeInterface>>>,
    #[serde(rename = "virtual_machine", skip_serializing_if = "Option::is_none")]
    pub virtual_machine:
        Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(
        rename = "untagged_vlan",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub untagged_vlan: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(
        rename = "vrf",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub vrf: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(rename = "tagged_vlans", skip_serializing_if = "Option::is_none")]
    pub tagged_vlans: Option<Vec<crate::models::TaggedVlans>>,
    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
    pub relationships: Option<
        ::std::collections::HashMap<
            String,
            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
        >,
    >,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
}

impl PatchedWritableVmInterfaceRequest {
    /// 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.
    pub fn new() -> PatchedWritableVmInterfaceRequest {
        PatchedWritableVmInterfaceRequest {
            id: None,
            mac_address: None,
            enabled: None,
            mtu: None,
            mode: None,
            name: None,
            description: None,
            status: None,
            role: None,
            parent_interface: None,
            bridge: None,
            virtual_machine: None,
            untagged_vlan: None,
            vrf: None,
            tagged_vlans: None,
            custom_fields: None,
            relationships: None,
            tags: None,
        }
    }
}
