Skip to main content

aws_sdk_connect/operation/create_queue/
_create_queue_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateQueueInput {
6    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the queue.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the queue.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
13    pub outbound_caller_config: ::std::option::Option<crate::types::OutboundCallerConfig>,
14    /// <p>The outbound email address ID for a specified queue.</p>
15    pub outbound_email_config: ::std::option::Option<crate::types::OutboundEmailConfig>,
16    /// <p>The identifier for the hours of operation.</p>
17    pub hours_of_operation_id: ::std::option::Option<::std::string::String>,
18    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
19    pub max_contacts: ::std::option::Option<i32>,
20    /// <p>The quick connects available to agents who are working the queue.</p>
21    pub quick_connect_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
22    /// <p>Configuration list containing the email addresses to associate with the queue during creation. Each configuration specifies an email address ID that agents can select when handling email contacts in this queue.</p>
23    pub email_addresses_config: ::std::option::Option<::std::vec::Vec<crate::types::EmailAddressConfig>>,
24    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
25    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26}
27impl CreateQueueInput {
28    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
29    pub fn instance_id(&self) -> ::std::option::Option<&str> {
30        self.instance_id.as_deref()
31    }
32    /// <p>The name of the queue.</p>
33    pub fn name(&self) -> ::std::option::Option<&str> {
34        self.name.as_deref()
35    }
36    /// <p>The description of the queue.</p>
37    pub fn description(&self) -> ::std::option::Option<&str> {
38        self.description.as_deref()
39    }
40    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
41    pub fn outbound_caller_config(&self) -> ::std::option::Option<&crate::types::OutboundCallerConfig> {
42        self.outbound_caller_config.as_ref()
43    }
44    /// <p>The outbound email address ID for a specified queue.</p>
45    pub fn outbound_email_config(&self) -> ::std::option::Option<&crate::types::OutboundEmailConfig> {
46        self.outbound_email_config.as_ref()
47    }
48    /// <p>The identifier for the hours of operation.</p>
49    pub fn hours_of_operation_id(&self) -> ::std::option::Option<&str> {
50        self.hours_of_operation_id.as_deref()
51    }
52    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
53    pub fn max_contacts(&self) -> ::std::option::Option<i32> {
54        self.max_contacts
55    }
56    /// <p>The quick connects available to agents who are working the queue.</p>
57    ///
58    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.quick_connect_ids.is_none()`.
59    pub fn quick_connect_ids(&self) -> &[::std::string::String] {
60        self.quick_connect_ids.as_deref().unwrap_or_default()
61    }
62    /// <p>Configuration list containing the email addresses to associate with the queue during creation. Each configuration specifies an email address ID that agents can select when handling email contacts in this queue.</p>
63    ///
64    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.email_addresses_config.is_none()`.
65    pub fn email_addresses_config(&self) -> &[crate::types::EmailAddressConfig] {
66        self.email_addresses_config.as_deref().unwrap_or_default()
67    }
68    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
69    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
70        self.tags.as_ref()
71    }
72}
73impl CreateQueueInput {
74    /// Creates a new builder-style object to manufacture [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
75    pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
76        crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
77    }
78}
79
80/// A builder for [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct CreateQueueInputBuilder {
84    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
85    pub(crate) name: ::std::option::Option<::std::string::String>,
86    pub(crate) description: ::std::option::Option<::std::string::String>,
87    pub(crate) outbound_caller_config: ::std::option::Option<crate::types::OutboundCallerConfig>,
88    pub(crate) outbound_email_config: ::std::option::Option<crate::types::OutboundEmailConfig>,
89    pub(crate) hours_of_operation_id: ::std::option::Option<::std::string::String>,
90    pub(crate) max_contacts: ::std::option::Option<i32>,
91    pub(crate) quick_connect_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
92    pub(crate) email_addresses_config: ::std::option::Option<::std::vec::Vec<crate::types::EmailAddressConfig>>,
93    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
94}
95impl CreateQueueInputBuilder {
96    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
97    /// This field is required.
98    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.instance_id = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
103    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.instance_id = input;
105        self
106    }
107    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
108    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
109        &self.instance_id
110    }
111    /// <p>The name of the queue.</p>
112    /// This field is required.
113    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.name = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>The name of the queue.</p>
118    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.name = input;
120        self
121    }
122    /// <p>The name of the queue.</p>
123    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
124        &self.name
125    }
126    /// <p>The description of the queue.</p>
127    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.description = ::std::option::Option::Some(input.into());
129        self
130    }
131    /// <p>The description of the queue.</p>
132    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.description = input;
134        self
135    }
136    /// <p>The description of the queue.</p>
137    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
138        &self.description
139    }
140    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
141    pub fn outbound_caller_config(mut self, input: crate::types::OutboundCallerConfig) -> Self {
142        self.outbound_caller_config = ::std::option::Option::Some(input);
143        self
144    }
145    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
146    pub fn set_outbound_caller_config(mut self, input: ::std::option::Option<crate::types::OutboundCallerConfig>) -> Self {
147        self.outbound_caller_config = input;
148        self
149    }
150    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
151    pub fn get_outbound_caller_config(&self) -> &::std::option::Option<crate::types::OutboundCallerConfig> {
152        &self.outbound_caller_config
153    }
154    /// <p>The outbound email address ID for a specified queue.</p>
155    pub fn outbound_email_config(mut self, input: crate::types::OutboundEmailConfig) -> Self {
156        self.outbound_email_config = ::std::option::Option::Some(input);
157        self
158    }
159    /// <p>The outbound email address ID for a specified queue.</p>
160    pub fn set_outbound_email_config(mut self, input: ::std::option::Option<crate::types::OutboundEmailConfig>) -> Self {
161        self.outbound_email_config = input;
162        self
163    }
164    /// <p>The outbound email address ID for a specified queue.</p>
165    pub fn get_outbound_email_config(&self) -> &::std::option::Option<crate::types::OutboundEmailConfig> {
166        &self.outbound_email_config
167    }
168    /// <p>The identifier for the hours of operation.</p>
169    /// This field is required.
170    pub fn hours_of_operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.hours_of_operation_id = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The identifier for the hours of operation.</p>
175    pub fn set_hours_of_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.hours_of_operation_id = input;
177        self
178    }
179    /// <p>The identifier for the hours of operation.</p>
180    pub fn get_hours_of_operation_id(&self) -> &::std::option::Option<::std::string::String> {
181        &self.hours_of_operation_id
182    }
183    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
184    pub fn max_contacts(mut self, input: i32) -> Self {
185        self.max_contacts = ::std::option::Option::Some(input);
186        self
187    }
188    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
189    pub fn set_max_contacts(mut self, input: ::std::option::Option<i32>) -> Self {
190        self.max_contacts = input;
191        self
192    }
193    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
194    pub fn get_max_contacts(&self) -> &::std::option::Option<i32> {
195        &self.max_contacts
196    }
197    /// Appends an item to `quick_connect_ids`.
198    ///
199    /// To override the contents of this collection use [`set_quick_connect_ids`](Self::set_quick_connect_ids).
200    ///
201    /// <p>The quick connects available to agents who are working the queue.</p>
202    pub fn quick_connect_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        let mut v = self.quick_connect_ids.unwrap_or_default();
204        v.push(input.into());
205        self.quick_connect_ids = ::std::option::Option::Some(v);
206        self
207    }
208    /// <p>The quick connects available to agents who are working the queue.</p>
209    pub fn set_quick_connect_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
210        self.quick_connect_ids = input;
211        self
212    }
213    /// <p>The quick connects available to agents who are working the queue.</p>
214    pub fn get_quick_connect_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
215        &self.quick_connect_ids
216    }
217    /// Appends an item to `email_addresses_config`.
218    ///
219    /// To override the contents of this collection use [`set_email_addresses_config`](Self::set_email_addresses_config).
220    ///
221    /// <p>Configuration list containing the email addresses to associate with the queue during creation. Each configuration specifies an email address ID that agents can select when handling email contacts in this queue.</p>
222    pub fn email_addresses_config(mut self, input: crate::types::EmailAddressConfig) -> Self {
223        let mut v = self.email_addresses_config.unwrap_or_default();
224        v.push(input);
225        self.email_addresses_config = ::std::option::Option::Some(v);
226        self
227    }
228    /// <p>Configuration list containing the email addresses to associate with the queue during creation. Each configuration specifies an email address ID that agents can select when handling email contacts in this queue.</p>
229    pub fn set_email_addresses_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EmailAddressConfig>>) -> Self {
230        self.email_addresses_config = input;
231        self
232    }
233    /// <p>Configuration list containing the email addresses to associate with the queue during creation. Each configuration specifies an email address ID that agents can select when handling email contacts in this queue.</p>
234    pub fn get_email_addresses_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EmailAddressConfig>> {
235        &self.email_addresses_config
236    }
237    /// Adds a key-value pair to `tags`.
238    ///
239    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
240    ///
241    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
242    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
243        let mut hash_map = self.tags.unwrap_or_default();
244        hash_map.insert(k.into(), v.into());
245        self.tags = ::std::option::Option::Some(hash_map);
246        self
247    }
248    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
249    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
250        self.tags = input;
251        self
252    }
253    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
254    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
255        &self.tags
256    }
257    /// Consumes the builder and constructs a [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
258    pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
259        ::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
260            instance_id: self.instance_id,
261            name: self.name,
262            description: self.description,
263            outbound_caller_config: self.outbound_caller_config,
264            outbound_email_config: self.outbound_email_config,
265            hours_of_operation_id: self.hours_of_operation_id,
266            max_contacts: self.max_contacts,
267            quick_connect_ids: self.quick_connect_ids,
268            email_addresses_config: self.email_addresses_config,
269            tags: self.tags,
270        })
271    }
272}