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
 */

/// PatchedConfigContextRequest : 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>)

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedConfigContextRequest {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(
        rename = "owner_content_type",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub owner_content_type: Option<Option<String>>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(
        rename = "owner_object_id",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub owner_object_id: Option<Option<uuid::Uuid>>,
    #[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
    pub weight: Option<i32>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    #[serde(
        rename = "data",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub data: Option<Option<serde_json::Value>>,
    #[serde(
        rename = "config_context_schema",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub config_context_schema:
        Option<Option<Box<crate::models::BulkWritableConfigContextRequestConfigContextSchema>>>,
    #[serde(rename = "locations", skip_serializing_if = "Option::is_none")]
    pub locations: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "roles", skip_serializing_if = "Option::is_none")]
    pub roles: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "device_types", skip_serializing_if = "Option::is_none")]
    pub device_types:
        Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(
        rename = "device_redundancy_groups",
        skip_serializing_if = "Option::is_none"
    )]
    pub device_redundancy_groups:
        Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "platforms", skip_serializing_if = "Option::is_none")]
    pub platforms: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "cluster_groups", skip_serializing_if = "Option::is_none")]
    pub cluster_groups:
        Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")]
    pub clusters: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "tenant_groups", skip_serializing_if = "Option::is_none")]
    pub tenant_groups:
        Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "tenants", skip_serializing_if = "Option::is_none")]
    pub tenants: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "device_families", skip_serializing_if = "Option::is_none")]
    pub device_families:
        Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
}

impl PatchedConfigContextRequest {
    /// 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>)
    pub fn new() -> PatchedConfigContextRequest {
        PatchedConfigContextRequest {
            id: None,
            owner_content_type: None,
            name: None,
            owner_object_id: None,
            weight: None,
            description: None,
            is_active: None,
            data: None,
            config_context_schema: None,
            locations: None,
            roles: None,
            device_types: None,
            device_redundancy_groups: None,
            platforms: None,
            cluster_groups: None,
            clusters: None,
            tenant_groups: None,
            tenants: None,
            device_families: None,
            tags: None,
        }
    }
}