babelforce-manager-sdk 0.42.3

Rust SDK for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations.
Documentation
/*
 * task-automation task schedule API
 *
 * execution of recurring time based tasks
 *
 * The version of the OpenAPI document: 3.63.10
 * Contact: support@babelforce.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CodeblockReferenceActionCodeblock {
    /// a javascript if not set or if it returns true then the action is executed
    #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
    pub condition: Option<String>,
    #[serde(rename = "var", skip_serializing_if = "Option::is_none")]
    pub var: Option<String>,
    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
    pub timeout: Option<i64>,
    #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")]
    pub arguments: Option<Vec<serde_json::Value>>,
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<Box<models::ErrorHandlingConfig>>,
    #[serde(rename = "parameter", skip_serializing_if = "Option::is_none")]
    pub parameter: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "ref")]
    pub r#ref: Box<models::ReferenceProperties>,
}

impl CodeblockReferenceActionCodeblock {
    pub fn new(r#ref: models::ReferenceProperties) -> CodeblockReferenceActionCodeblock {
        CodeblockReferenceActionCodeblock {
            condition: None,
            var: None,
            timeout: None,
            arguments: None,
            error: None,
            parameter: None,
            r#ref: Box::new(r#ref),
        }
    }
}