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

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

/// Attribute is used to describe the value of an attribute, optionally
/// specifying units
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct Attribute {
    /// String is the string value for the attribute
    #[serde(rename = "String", skip_serializing_if = "Option::is_none")]
    pub string_val: Option<String>,

    /// Bool is the bool value for the attribute
    #[serde(rename = "Bool", skip_serializing_if = "Option::is_none")]
    pub bool_val: Option<bool>,

    /// Unit is the optional unit for the set int or float value
    #[serde(rename = "Unit")]
    pub unit: String,

    /// Float is the float value for the attribute
    #[serde(rename = "Float", skip_serializing_if = "Option::is_none")]
    pub float_val: Option<f64>,

    /// Int is the int value for the attribute
    #[serde(rename = "Int", skip_serializing_if = "Option::is_none")]
    pub int_val: Option<i64>,
}
