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

/// BulkWritableApprovalWorkflowStageRequest : ApprovalWorkflowStage Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BulkWritableApprovalWorkflowStageRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<crate::models::ApprovalWorkflowStateChoices>,
    #[serde(rename = "approval_workflow")]
    pub approval_workflow: Box<crate::models::ApprovalWorkflowStageApprovalWorkflow>,
    #[serde(
        rename = "approval_workflow_stage_definition",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub approval_workflow_stage_definition:
        Option<Option<Box<crate::models::ApprovalWorkflowStageApprovalWorkflowStageDefinition>>>,
    #[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 BulkWritableApprovalWorkflowStageRequest {
    /// ApprovalWorkflowStage Serializer.
    pub fn new(
        id: uuid::Uuid,
        approval_workflow: crate::models::ApprovalWorkflowStageApprovalWorkflow,
    ) -> BulkWritableApprovalWorkflowStageRequest {
        BulkWritableApprovalWorkflowStageRequest {
            id,
            state: None,
            approval_workflow: Box::new(approval_workflow),
            approval_workflow_stage_definition: None,
            custom_fields: None,
            relationships: None,
        }
    }
}
