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

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

/// Affinity is used to serialize task group affinities
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct Affinity {
    #[serde(rename = "LTarget")]
    pub l_target: String,

    #[serde(rename = "RTarget")]
    pub r_target: String,

    #[serde(rename = "Operand")]
    pub operand: String,

    #[serde(rename = "Weight", skip_serializing_if = "Option::is_none")]
    pub weight: Option<i8>,
}
