/*
 * 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};

use serde_with::serde_as;

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum ReqTask {
    #[serde(rename = "image_build")]
    ImageBuild(Box<models::ReqImageBuildTask>),
    #[serde(rename = "request")]
    Request(Box<models::ReqRequestTask>),
    #[serde(rename = "application")]
    Application(Box<models::ReqApplicationTask>),
    #[serde(rename = "tapis_job")]
    TapisJob(Box<models::ReqTapisJobTask>),
    #[serde(rename = "tapis_actor")]
    TapisActor(Box<models::ReqTapisActorTask>),
    #[serde(rename = "function")]
    Function(Box<models::ReqFunctionTask>),
    #[serde(rename = "template")]
    Template(Box<models::ReqTemplateTask>),
}

impl Default for ReqTask {
    fn default() -> Self {
        Self::ImageBuild(Default::default())
    }
}
