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

/// PatchedBulkWritableJobRequest : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PatchedBulkWritableJobRequest {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// Human-readable grouping that this job belongs to
    #[serde(rename = "grouping", skip_serializing_if = "Option::is_none")]
    pub grouping: Option<String>,
    /// Human-readable name of this job
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Markdown formatting and a limited subset of HTML are supported
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Whether this job can be executed by users
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// Whether this job contains sensitive variables
    #[serde(
        rename = "has_sensitive_variables",
        skip_serializing_if = "Option::is_none"
    )]
    pub has_sensitive_variables: Option<bool>,
    /// Whether this job should fail to run if another instance of this job is already running
    #[serde(rename = "is_singleton", skip_serializing_if = "Option::is_none")]
    pub is_singleton: Option<bool>,
    /// Whether the job defaults to running with console log argument set to true
    #[serde(
        rename = "console_log_default",
        skip_serializing_if = "Option::is_none"
    )]
    pub console_log_default: Option<bool>,
    /// Whether the job defaults to not being shown in the UI
    #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
    pub hidden: Option<bool>,
    /// Whether the job defaults to running with dryrun argument set to true
    #[serde(rename = "dryrun_default", skip_serializing_if = "Option::is_none")]
    pub dryrun_default: Option<bool>,
    /// Maximum runtime in seconds before the job will receive a <code>SoftTimeLimitExceeded</code> exception.<br>Set to 0 to use Nautobot system default
    #[serde(rename = "soft_time_limit", skip_serializing_if = "Option::is_none")]
    pub soft_time_limit: Option<f64>,
    /// Maximum runtime in seconds before the job will be forcibly terminated.<br>Set to 0 to use Nautobot system default
    #[serde(rename = "time_limit", skip_serializing_if = "Option::is_none")]
    pub time_limit: Option<f64>,
    /// If set, the configured grouping will remain even if the underlying Job source code changes
    #[serde(rename = "grouping_override", skip_serializing_if = "Option::is_none")]
    pub grouping_override: Option<bool>,
    /// If set, the configured name will remain even if the underlying Job source code changes
    #[serde(rename = "name_override", skip_serializing_if = "Option::is_none")]
    pub name_override: Option<bool>,
    /// If set, the configured console log default will remain even if the underlying Job source code changes
    #[serde(
        rename = "console_log_default_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub console_log_default_override: Option<bool>,
    /// If set, the configured description will remain even if the underlying Job source code changes
    #[serde(
        rename = "description_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub description_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "dryrun_default_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub dryrun_default_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(rename = "hidden_override", skip_serializing_if = "Option::is_none")]
    pub hidden_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "soft_time_limit_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub soft_time_limit_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "time_limit_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub time_limit_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "has_sensitive_variables_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub has_sensitive_variables_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "job_queues_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub job_queues_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "default_job_queue_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub default_job_queue_override: Option<bool>,
    /// If set, the configured value will remain even if the underlying Job source code changes
    #[serde(
        rename = "is_singleton_override",
        skip_serializing_if = "Option::is_none"
    )]
    pub is_singleton_override: Option<bool>,
    #[serde(rename = "default_job_queue", skip_serializing_if = "Option::is_none")]
    pub default_job_queue:
        Option<Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
    #[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 PatchedBulkWritableJobRequest {
    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableJobRequest {
        PatchedBulkWritableJobRequest {
            id,
            grouping: None,
            name: None,
            description: None,
            enabled: None,
            has_sensitive_variables: None,
            is_singleton: None,
            console_log_default: None,
            hidden: None,
            dryrun_default: None,
            soft_time_limit: None,
            time_limit: None,
            grouping_override: None,
            name_override: None,
            console_log_default_override: None,
            description_override: None,
            dryrun_default_override: None,
            hidden_override: None,
            soft_time_limit_override: None,
            time_limit_override: None,
            has_sensitive_variables_override: None,
            job_queues_override: None,
            default_job_queue_override: None,
            is_singleton_override: None,
            default_job_queue: None,
            tags: None,
            custom_fields: None,
            relationships: None,
        }
    }
}
