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

/// PatchedBulkWritableApprovalWorkflowStageDefinitionRequest : ApprovalWorkflowStageDefinition Serializer.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedBulkWritableApprovalWorkflowStageDefinitionRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// The group that will be assigned to approve this stage.
    #[serde(rename = "approver_group", skip_serializing_if = "Option::is_none")]
    pub approver_group: Option<String>,
    /// The sequence dictates the order in which this stage will need to be approved. The lower the number, the earlier it will be.
    #[serde(rename = "sequence", skip_serializing_if = "Option::is_none")]
    pub sequence: Option<i32>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Minimum number of approvers required to approve this stage.
    #[serde(rename = "min_approvers", skip_serializing_if = "Option::is_none")]
    pub min_approvers: Option<i32>,
    /// Message to show when the stage is denied.
    #[serde(rename = "denial_message", skip_serializing_if = "Option::is_none")]
    pub denial_message: Option<String>,
    #[serde(
        rename = "approval_workflow_definition",
        skip_serializing_if = "Option::is_none"
    )]
    pub approval_workflow_definition:
        Option<Box<crate::models::ApprovalWorkflowStageDefinitionApprovalWorkflowDefinition>>,
    #[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 PatchedBulkWritableApprovalWorkflowStageDefinitionRequest {
    /// ApprovalWorkflowStageDefinition Serializer.
    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableApprovalWorkflowStageDefinitionRequest {
        PatchedBulkWritableApprovalWorkflowStageDefinitionRequest {
            id,
            approver_group: None,
            sequence: None,
            name: None,
            min_approvers: None,
            denial_message: None,
            approval_workflow_definition: None,
            custom_fields: None,
            relationships: None,
        }
    }
}
