aws_sdk_connect/operation/create_queue/
_create_queue_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateQueueInput {
pub instance_id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub outbound_caller_config: ::std::option::Option<crate::types::OutboundCallerConfig>,
pub outbound_email_config: ::std::option::Option<crate::types::OutboundEmailConfig>,
pub hours_of_operation_id: ::std::option::Option<::std::string::String>,
pub max_contacts: ::std::option::Option<i32>,
pub quick_connect_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQueueInput {
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn outbound_caller_config(&self) -> ::std::option::Option<&crate::types::OutboundCallerConfig> {
self.outbound_caller_config.as_ref()
}
pub fn outbound_email_config(&self) -> ::std::option::Option<&crate::types::OutboundEmailConfig> {
self.outbound_email_config.as_ref()
}
pub fn hours_of_operation_id(&self) -> ::std::option::Option<&str> {
self.hours_of_operation_id.as_deref()
}
pub fn max_contacts(&self) -> ::std::option::Option<i32> {
self.max_contacts
}
pub fn quick_connect_ids(&self) -> &[::std::string::String] {
self.quick_connect_ids.as_deref().unwrap_or_default()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl CreateQueueInput {
pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateQueueInputBuilder {
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) outbound_caller_config: ::std::option::Option<crate::types::OutboundCallerConfig>,
pub(crate) outbound_email_config: ::std::option::Option<crate::types::OutboundEmailConfig>,
pub(crate) hours_of_operation_id: ::std::option::Option<::std::string::String>,
pub(crate) max_contacts: ::std::option::Option<i32>,
pub(crate) quick_connect_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQueueInputBuilder {
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn outbound_caller_config(mut self, input: crate::types::OutboundCallerConfig) -> Self {
self.outbound_caller_config = ::std::option::Option::Some(input);
self
}
pub fn set_outbound_caller_config(mut self, input: ::std::option::Option<crate::types::OutboundCallerConfig>) -> Self {
self.outbound_caller_config = input;
self
}
pub fn get_outbound_caller_config(&self) -> &::std::option::Option<crate::types::OutboundCallerConfig> {
&self.outbound_caller_config
}
pub fn outbound_email_config(mut self, input: crate::types::OutboundEmailConfig) -> Self {
self.outbound_email_config = ::std::option::Option::Some(input);
self
}
pub fn set_outbound_email_config(mut self, input: ::std::option::Option<crate::types::OutboundEmailConfig>) -> Self {
self.outbound_email_config = input;
self
}
pub fn get_outbound_email_config(&self) -> &::std::option::Option<crate::types::OutboundEmailConfig> {
&self.outbound_email_config
}
pub fn hours_of_operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hours_of_operation_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_hours_of_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hours_of_operation_id = input;
self
}
pub fn get_hours_of_operation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.hours_of_operation_id
}
pub fn max_contacts(mut self, input: i32) -> Self {
self.max_contacts = ::std::option::Option::Some(input);
self
}
pub fn set_max_contacts(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_contacts = input;
self
}
pub fn get_max_contacts(&self) -> &::std::option::Option<i32> {
&self.max_contacts
}
pub fn quick_connect_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.quick_connect_ids.unwrap_or_default();
v.push(input.into());
self.quick_connect_ids = ::std::option::Option::Some(v);
self
}
pub fn set_quick_connect_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.quick_connect_ids = input;
self
}
pub fn get_quick_connect_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.quick_connect_ids
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
instance_id: self.instance_id,
name: self.name,
description: self.description,
outbound_caller_config: self.outbound_caller_config,
outbound_email_config: self.outbound_email_config,
hours_of_operation_id: self.hours_of_operation_id,
max_contacts: self.max_contacts,
quick_connect_ids: self.quick_connect_ids,
tags: self.tags,
})
}
}