use crate::gen::manager::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RestCreateQueueSelection {
#[serde(rename = "label")]
pub label: String,
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "continueOnMatch", skip_serializing_if = "Option::is_none")]
pub continue_on_match: Option<bool>,
#[serde(rename = "continueOnEmpty", skip_serializing_if = "Option::is_none")]
pub continue_on_empty: Option<bool>,
#[serde(rename = "selectLastAgent", skip_serializing_if = "Option::is_none")]
pub select_last_agent: Option<bool>,
#[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
pub priority: Option<i32>,
#[serde(rename = "trigger")]
pub trigger: Box<models::Trigger>,
#[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
pub groups: Option<Vec<models::QueueSelectionGroup>>,
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<models::QueueSelectionTag>>,
#[serde(rename = "agents", skip_serializing_if = "Option::is_none")]
pub agents: Option<Vec<models::QueueSelectionAgent>>,
}
impl RestCreateQueueSelection {
pub fn new(label: String, trigger: models::Trigger) -> RestCreateQueueSelection {
RestCreateQueueSelection {
label,
enabled: None,
continue_on_match: None,
continue_on_empty: None,
select_last_agent: None,
priority: None,
trigger: Box::new(trigger),
groups: None,
tags: None,
agents: None,
}
}
}