/*
 * 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 BaseTask {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<models::EnumTaskType>,
    #[serde(rename = "depends_on", skip_serializing_if = "Option::is_none")]
    pub depends_on: Option<Vec<models::TaskDependency>>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "execution_profile", skip_serializing_if = "Option::is_none")]
    pub execution_profile: Option<Box<models::TaskExecutionProfile>>,
    #[serde(rename = "input", skip_serializing_if = "Option::is_none")]
    pub input: Option<std::collections::HashMap<String, models::SpecWithValue>>,
    #[serde(rename = "output", skip_serializing_if = "Option::is_none")]
    pub output: Option<std::collections::HashMap<String, models::OutputValue>>,
    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
}

impl BaseTask {
    pub fn new() -> BaseTask {
        BaseTask {
            id: None,
            r#type: None,
            depends_on: None,
            description: None,
            execution_profile: None,
            input: None,
            output: None,
            conditions: None,
        }
    }
}
