/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// LogConfig provides configuration for log rotation
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct LogConfig {
    #[serde(rename = "max_files", skip_serializing_if = "Option::is_none")]
    pub max_files: Option<i64>,

    #[serde(rename = "max_file_size", skip_serializing_if = "Option::is_none")]
    pub max_file_size_mb: Option<i64>,

    /// COMPAT(1.6.0): Enabled had to be swapped for Disabled to fix a backwards
    /// compatibility bug when restoring pre-1.5.4 jobs. Remove in 1.6.0
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,

    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
    pub disabled: Option<bool>,
}
