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

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

/// DesiredTransition is used to mark an allocation as having a desired state
/// transition. This information can be used by the scheduler to make the
/// correct decision.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct DesiredTransition {
    /// Migrate is used to indicate that this allocation should be stopped and
    /// migrated to another node.
    #[serde(rename = "Migrate", skip_serializing_if = "Option::is_none")]
    pub migrate: Option<bool>,

    /// Reschedule is used to indicate that this allocation is eligible to be
    /// rescheduled.
    #[serde(rename = "Reschedule", skip_serializing_if = "Option::is_none")]
    pub reschedule: Option<bool>,
}
