nautobot-openapi 0.4.0

low level nautobot bindings (generated by openapi-generator)
Documentation
/*
 * 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
 */

/// BulkWritableInterfaceRedundancyGroupRequest : InterfaceRedundancyGroup Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BulkWritableInterfaceRedundancyGroupRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "protocol")]
    pub protocol: crate::models::InterfaceRedundancyGroupProtocolChoices,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "protocol_group_id", skip_serializing_if = "Option::is_none")]
    pub protocol_group_id: Option<String>,
    #[serde(rename = "status")]
    pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
    #[serde(
        rename = "secrets_group",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub secrets_group: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[serde(
        rename = "virtual_ip",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub virtual_ip: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
    #[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 BulkWritableInterfaceRedundancyGroupRequest {
    /// InterfaceRedundancyGroup Serializer.
    pub fn new(
        id: uuid::Uuid,
        protocol: crate::models::InterfaceRedundancyGroupProtocolChoices,
        name: String,
        status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
    ) -> BulkWritableInterfaceRedundancyGroupRequest {
        BulkWritableInterfaceRedundancyGroupRequest {
            id,
            protocol,
            name,
            description: None,
            protocol_group_id: None,
            status: Box::new(status),
            secrets_group: None,
            virtual_ip: None,
            custom_fields: None,
            relationships: None,
            tags: None,
        }
    }
}