/*
* 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 TaskSchedule {
#[serde(rename = "cron")]
pub cron: String,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "task", skip_serializing_if = "Option::is_none")]
pub task: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "template_id", skip_serializing_if = "Option::is_none")]
pub template_id: Option<String>,
#[serde(rename = "template_style", skip_serializing_if = "Option::is_none")]
pub template_style: Option<models::TemplateStyle>,
/// A valid IANA timezone for examples see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Note: Be careful when setting fire times between the hours of the morning when “daylight savings” changes occur in your locale (for US locales, this would typically be the hour before and after 2:00 AM - because the time shift can cause a skip or a repeat depending on whether the time moves back or jumps forward. You may find this wikipedia entry helpful in determining the specifics to your locale https://secure.wikimedia.org/wikipedia/en/wiki/Daylight_saving_time_around_the_world
#[serde(rename = "timezone", skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
}
impl TaskSchedule {
pub fn new(cron: String) -> TaskSchedule {
TaskSchedule {
cron,
name: None,
task: None,
template_id: None,
template_style: None,
timezone: None,
}
}
}