babelforce-manager-sdk 0.46.0

Rust SDK for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations.
Documentation
/*
 * task-automation API
 *
 * task-automation engine to automate and customize web based integration processes
 *
 * The version of the OpenAPI document: 3.63.10
 * Contact: support@babelforce.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActionSetting {
    #[serde(rename = "transitions")]
    pub transitions: models::TaskStateEvents,
    /// When set to true, action events on_* will run asynchronously with further state transitions.action will not block
    #[serde(rename = "async", skip_serializing_if = "Option::is_none")]
    pub r#async: Option<bool>,
    /// Milliseconds
    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
    pub timeout: Option<i64>,
}

impl ActionSetting {
    pub fn new(transitions: models::TaskStateEvents) -> ActionSetting {
        ActionSetting {
            transitions,
            r#async: None,
            timeout: None,
        }
    }
}