/*
 * Streams API
 *
 * Manage Tapis Streams API.
 *
 * The version of the OpenAPI document: 1
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Variable {
    /// The name of variable.
    #[serde(rename = "var_name", skip_serializing_if = "Option::is_none")]
    pub var_name: Option<String>,
    /// The unique identifier for variable.
    #[serde(rename = "var_id", skip_serializing_if = "Option::is_none")]
    pub var_id: Option<String>,
    /// The owner for variable.
    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
    pub owner: Option<String>,
    /// The instrument id generated by CHORDS.
    #[serde(rename = "inst_id", skip_serializing_if = "Option::is_none")]
    pub inst_id: Option<String>,
    /// The shortname of variable.
    #[serde(rename = "shortname", skip_serializing_if = "Option::is_none")]
    pub shortname: Option<String>,
    /// The unit to measure property of variable.
    #[serde(rename = "unit", skip_serializing_if = "Option::is_none")]
    pub unit: Option<String>,
    /// The unit abbrevation to measure variable.
    #[serde(rename = "unit_abbrev", skip_serializing_if = "Option::is_none")]
    pub unit_abbrev: Option<String>,
    /// The property measured by variable.
    #[serde(rename = "measured_property", skip_serializing_if = "Option::is_none")]
    pub measured_property: Option<String>,
    /// User entered metadata for the variable
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
    /// Variable ID in chords
    #[serde(rename = "chords_id", skip_serializing_if = "Option::is_none")]
    pub chords_id: Option<i32>,
    /// ISO8601 datetime string for object creation date
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// ISO8601 datetime string for object updated date
    #[serde(rename = "last_updated", skip_serializing_if = "Option::is_none")]
    pub last_updated: Option<String>,
}

impl Variable {
    pub fn new() -> Variable {
        Variable {
            var_name: None,
            var_id: None,
            owner: None,
            inst_id: None,
            shortname: None,
            unit: None,
            unit_abbrev: None,
            measured_property: None,
            metadata: None,
            chords_id: None,
            created_at: None,
            last_updated: None,
        }
    }
}
