/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// FlowModuleValue : The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum FlowModuleValue {
    #[serde(rename="rawscript")]
    Rawscript(Box<models::RawScript>),
    #[serde(rename="script")]
    Script(Box<models::PathScript>),
    #[serde(rename="flow")]
    Flow(Box<models::PathFlow>),
    #[serde(rename="forloopflow")]
    Forloopflow(Box<models::ForloopFlow>),
    #[serde(rename="whileloopflow")]
    Whileloopflow(Box<models::WhileloopFlow>),
    #[serde(rename="branchone")]
    Branchone(Box<models::BranchOne>),
    #[serde(rename="branchall")]
    Branchall(Box<models::BranchAll>),
    #[serde(rename="identity")]
    Identity(Box<models::Identity>),
    #[serde(rename="aiagent")]
    Aiagent(Box<models::AiAgent>),
}

impl Default for FlowModuleValue {
    fn default() -> Self {
        Self::Rawscript(Default::default())
    }
}

/// Programming language for this script
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Language {
    #[serde(rename = "deno")]
    Deno,
    #[serde(rename = "bun")]
    Bun,
    #[serde(rename = "python3")]
    Python3,
    #[serde(rename = "go")]
    Go,
    #[serde(rename = "bash")]
    Bash,
    #[serde(rename = "powershell")]
    Powershell,
    #[serde(rename = "postgresql")]
    Postgresql,
    #[serde(rename = "mysql")]
    Mysql,
    #[serde(rename = "bigquery")]
    Bigquery,
    #[serde(rename = "snowflake")]
    Snowflake,
    #[serde(rename = "mssql")]
    Mssql,
    #[serde(rename = "oracledb")]
    Oracledb,
    #[serde(rename = "graphql")]
    Graphql,
    #[serde(rename = "nativets")]
    Nativets,
    #[serde(rename = "php")]
    Php,
    #[serde(rename = "rust")]
    Rust,
    #[serde(rename = "ansible")]
    Ansible,
    #[serde(rename = "csharp")]
    Csharp,
    #[serde(rename = "nu")]
    Nu,
    #[serde(rename = "java")]
    Java,
    #[serde(rename = "ruby")]
    Ruby,
    #[serde(rename = "rlang")]
    Rlang,
    #[serde(rename = "duckdb")]
    Duckdb,
}

impl Default for Language {
    fn default() -> Language {
        Self::Deno
    }
}

