/*
 * 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 NewProject {
    /// Project name.
    #[serde(rename = "project_name")]
    pub project_name: String,
    /// Project description.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Project owner.
    #[serde(rename = "owner")]
    pub owner: String,
    /// Principal investigator.
    #[serde(rename = "pi")]
    pub pi: String,
    /// Funding for the project.
    #[serde(rename = "funding_resource", skip_serializing_if = "Option::is_none")]
    pub funding_resource: Option<String>,
    /// url of the project
    #[serde(rename = "project_url", skip_serializing_if = "Option::is_none")]
    pub project_url: Option<String>,
    /// Current status of the project
    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    /// User defined metadata for the site
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<serde_json::Value>,
}

impl NewProject {
    pub fn new(project_name: String, owner: String, pi: String) -> NewProject {
        NewProject {
            project_name,
            description: None,
            owner,
            pi,
            funding_resource: None,
            project_url: None,
            active: None,
            metadata: None,
        }
    }
}
