babelforce-manager-sdk 0.42.2

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 SubmitTask {
    /// a unique identifier
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    /// a unique identifier
    #[serde(rename = "queue_id", skip_serializing_if = "Option::is_none")]
    pub queue_id: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
    pub body: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "actions", skip_serializing_if = "Option::is_none")]
    pub actions: Option<Box<models::Actions>>,
    #[serde(rename = "task_completion", skip_serializing_if = "Option::is_none")]
    pub task_completion: Option<Box<models::TaskCompletionSettings>>,
    #[serde(rename = "selection_settings", skip_serializing_if = "Option::is_none")]
    pub selection_settings: Option<Box<models::TaskSelectionSettings>>,
    /// defines when the task will be scheduled for execution. now - as soon as possible at 1654075565950 - at the given timestamp in 1w 3d 5h 10min 5sec  - in 1 week 3 days 5 hours 10 minutes and 5 seconds
    #[serde(rename = "scheduled_at", skip_serializing_if = "Option::is_none")]
    pub scheduled_at: Option<String>,
}

impl SubmitTask {
    pub fn new() -> SubmitTask {
        SubmitTask {
            id: None,
            queue_id: None,
            r#type: None,
            body: None,
            actions: None,
            task_completion: None,
            selection_settings: None,
            scheduled_at: None,
        }
    }
}