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

/// PatchedApprovalWorkflowRequest : ApprovalWorkflow Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedApprovalWorkflowRequest {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    #[serde(
        rename = "object_under_review_content_type",
        skip_serializing_if = "Option::is_none"
    )]
    pub object_under_review_content_type: Option<String>,
    #[serde(
        rename = "object_under_review_object_id",
        skip_serializing_if = "Option::is_none"
    )]
    pub object_under_review_object_id: Option<uuid::Uuid>,
    #[serde(rename = "current_state", skip_serializing_if = "Option::is_none")]
    pub current_state: Option<crate::models::ApprovalWorkflowStateChoices>,
    #[serde(
        rename = "approval_workflow_definition",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub approval_workflow_definition:
        Option<Option<Box<crate::models::ApprovalWorkflowApprovalWorkflowDefinition>>>,
    #[serde(
        rename = "user",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub user: 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,
        >,
    >,
}

impl PatchedApprovalWorkflowRequest {
    /// ApprovalWorkflow Serializer.
    pub fn new() -> PatchedApprovalWorkflowRequest {
        PatchedApprovalWorkflowRequest {
            id: None,
            object_under_review_content_type: None,
            object_under_review_object_id: None,
            current_state: None,
            approval_workflow_definition: None,
            user: None,
            custom_fields: None,
            relationships: None,
        }
    }
}
