tapis-streams 0.3.1

Manage Tapis Streams API.
Documentation
/*
 * 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 UpdateVariable {
    /// Variable name.
    #[serde(rename = "var_name")]
    pub var_name: String,
    /// Unit name
    #[serde(rename = "units", skip_serializing_if = "Option::is_none")]
    pub units: Option<String>,
    /// Id of the Property measured by the variable type
    #[serde(
        rename = "measured_property_id",
        skip_serializing_if = "Option::is_none"
    )]
    pub measured_property_id: Option<f64>,
    /// User entered metadata for the variable
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
    /// User entered short name
    #[serde(rename = "shortname", skip_serializing_if = "Option::is_none")]
    pub shortname: Option<String>,
}

impl UpdateVariable {
    pub fn new(var_name: String) -> UpdateVariable {
        UpdateVariable {
            var_name,
            units: None,
            measured_property_id: None,
            metadata: None,
            shortname: None,
        }
    }
}