/*
 * 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 UpdateSite {
    /// Resource name.
    #[serde(rename = "site_name")]
    pub site_name: String,
    #[serde(rename = "description")]
    pub description: String,
    /// Latitude of site.
    #[serde(rename = "latitude")]
    pub latitude: f64,
    /// Longitude of site.
    #[serde(rename = "longitude")]
    pub longitude: f64,
    /// Elevation of site.
    #[serde(rename = "elevation")]
    pub elevation: f64,
    /// User defined metadata for the site
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
}

impl UpdateSite {
    pub fn new(
        site_name: String,
        description: String,
        latitude: f64,
        longitude: f64,
        elevation: f64,
    ) -> UpdateSite {
        UpdateSite {
            site_name,
            description,
            latitude,
            longitude,
            elevation,
            metadata: None,
        }
    }
}
