/*
 * Tapis Workflows API
 *
 * Create and manage pipelines
 *
 * The version of the OpenAPI document: 1.6.0
 * 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 Pipeline {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "uses", skip_serializing_if = "Option::is_none")]
    pub uses: Option<Box<models::Uses>>,
    #[serde(rename = "env", skip_serializing_if = "Option::is_none")]
    pub env: Option<std::collections::HashMap<String, models::EnvSpec>>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "params", skip_serializing_if = "Option::is_none")]
    pub params: Option<std::collections::HashMap<String, models::Spec>>,
    #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
    pub group: Option<uuid::Uuid>,
    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
    pub owner: Option<String>,
    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
    pub uuid: Option<uuid::Uuid>,
    #[serde(rename = "execution_profile", skip_serializing_if = "Option::is_none")]
    pub execution_profile: Option<Box<models::PipelineExecutionProfile>>,
    #[serde(rename = "current_run", skip_serializing_if = "Option::is_none")]
    pub current_run: Option<uuid::Uuid>,
    #[serde(rename = "last_run", skip_serializing_if = "Option::is_none")]
    pub last_run: Option<uuid::Uuid>,
    #[serde(rename = "tasks", skip_serializing_if = "Option::is_none")]
    pub tasks: Option<Vec<models::Task>>,
}

impl Pipeline {
    pub fn new() -> Pipeline {
        Pipeline {
            id: None,
            description: None,
            uses: None,
            env: None,
            enabled: None,
            params: None,
            group: None,
            owner: None,
            uuid: None,
            execution_profile: None,
            current_run: None,
            last_run: None,
            tasks: None,
        }
    }
}
