babelforce-manager-sdk 0.42.1

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 TaskLog {
    #[serde(rename = "log_type")]
    pub log_type: models::LogType,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "state")]
    pub state: models::TaskState,
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "queue_id")]
    pub queue_id: String,
    #[serde(rename = "meta")]
    pub meta: Box<models::LogMeta>,
    #[serde(rename = "actions", skip_serializing_if = "Option::is_none")]
    pub actions: Option<Box<models::ActionLogsList>>,
}

impl TaskLog {
    pub fn new(
        log_type: models::LogType,
        id: String,
        state: models::TaskState,
        r#type: String,
        queue_id: String,
        meta: models::LogMeta,
    ) -> TaskLog {
        TaskLog {
            log_type,
            id,
            state,
            r#type,
            queue_id,
            meta: Box::new(meta),
            actions: None,
        }
    }
}