/*
 * 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 NewInstrument {
    /// Instrument name
    #[serde(rename = "inst_name")]
    pub inst_name: String,
    /// User uniquely defined ID for instrument.
    #[serde(rename = "inst_id")]
    pub inst_id: String,
    /// Instrument description
    #[serde(rename = "inst_description")]
    pub inst_description: String,
    /// Instrument category
    #[serde(rename = "topic_category_id", skip_serializing_if = "Option::is_none")]
    pub topic_category_id: Option<String>,
    /// tags array
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// User enetered metadata on instruments
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
}

impl NewInstrument {
    pub fn new(inst_name: String, inst_id: String, inst_description: String) -> NewInstrument {
        NewInstrument {
            inst_name,
            inst_id,
            inst_description,
            topic_category_id: None,
            tags: None,
            metadata: None,
        }
    }
}
