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>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
23    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24}
25impl CreateQueueInput {
26    /// <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>
27    pub fn instance_id(&self) -> ::std::option::Option<&str> {
28        self.instance_id.as_deref()
29    }
30    /// <p>The name of the queue.</p>
31    pub fn name(&self) -> ::std::option::Option<&str> {
32        self.name.as_deref()
33    }
34    /// <p>The description of the queue.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
39    pub fn outbound_caller_config(&self) -> ::std::option::Option<&crate::types::OutboundCallerConfig> {
40        self.outbound_caller_config.as_ref()
41    }
42    /// <p>The outbound email address ID for a specified queue.</p>
43    pub fn outbound_email_config(&self) -> ::std::option::Option<&crate::types::OutboundEmailConfig> {
44        self.outbound_email_config.as_ref()
45    }
46    /// <p>The identifier for the hours of operation.</p>
47    pub fn hours_of_operation_id(&self) -> ::std::option::Option<&str> {
48        self.hours_of_operation_id.as_deref()
49    }
50    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
51    pub fn max_contacts(&self) -> ::std::option::Option<i32> {
52        self.max_contacts
53    }
54    /// <p>The quick connects available to agents who are working the queue.</p>
55    ///
56    /// 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()`.
57    pub fn quick_connect_ids(&self) -> &[::std::string::String] {
58        self.quick_connect_ids.as_deref().unwrap_or_default()
59    }
60    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
61    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
62        self.tags.as_ref()
63    }
64}
65impl CreateQueueInput {
66    /// Creates a new builder-style object to manufacture [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
67    pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
68        crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
69    }
70}
71
72/// A builder for [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct CreateQueueInputBuilder {
76    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
77    pub(crate) name: ::std::option::Option<::std::string::String>,
78    pub(crate) description: ::std::option::Option<::std::string::String>,
79    pub(crate) outbound_caller_config: ::std::option::Option<crate::types::OutboundCallerConfig>,
80    pub(crate) outbound_email_config: ::std::option::Option<crate::types::OutboundEmailConfig>,
81    pub(crate) hours_of_operation_id: ::std::option::Option<::std::string::String>,
82    pub(crate) max_contacts: ::std::option::Option<i32>,
83    pub(crate) quick_connect_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
84    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
85}
86impl CreateQueueInputBuilder {
87    /// <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>
88    /// This field is required.
89    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.instance_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <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>
94    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.instance_id = input;
96        self
97    }
98    /// <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>
99    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.instance_id
101    }
102    /// <p>The name of the queue.</p>
103    /// This field is required.
104    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.name = ::std::option::Option::Some(input.into());
106        self
107    }
108    /// <p>The name of the queue.</p>
109    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.name = input;
111        self
112    }
113    /// <p>The name of the queue.</p>
114    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
115        &self.name
116    }
117    /// <p>The description of the queue.</p>
118    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.description = ::std::option::Option::Some(input.into());
120        self
121    }
122    /// <p>The description of the queue.</p>
123    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.description = input;
125        self
126    }
127    /// <p>The description of the queue.</p>
128    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
129        &self.description
130    }
131    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
132    pub fn outbound_caller_config(mut self, input: crate::types::OutboundCallerConfig) -> Self {
133        self.outbound_caller_config = ::std::option::Option::Some(input);
134        self
135    }
136    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
137    pub fn set_outbound_caller_config(mut self, input: ::std::option::Option<crate::types::OutboundCallerConfig>) -> Self {
138        self.outbound_caller_config = input;
139        self
140    }
141    /// <p>The outbound caller ID name, number, and outbound whisper flow.</p>
142    pub fn get_outbound_caller_config(&self) -> &::std::option::Option<crate::types::OutboundCallerConfig> {
143        &self.outbound_caller_config
144    }
145    /// <p>The outbound email address ID for a specified queue.</p>
146    pub fn outbound_email_config(mut self, input: crate::types::OutboundEmailConfig) -> Self {
147        self.outbound_email_config = ::std::option::Option::Some(input);
148        self
149    }
150    /// <p>The outbound email address ID for a specified queue.</p>
151    pub fn set_outbound_email_config(mut self, input: ::std::option::Option<crate::types::OutboundEmailConfig>) -> Self {
152        self.outbound_email_config = input;
153        self
154    }
155    /// <p>The outbound email address ID for a specified queue.</p>
156    pub fn get_outbound_email_config(&self) -> &::std::option::Option<crate::types::OutboundEmailConfig> {
157        &self.outbound_email_config
158    }
159    /// <p>The identifier for the hours of operation.</p>
160    /// This field is required.
161    pub fn hours_of_operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.hours_of_operation_id = ::std::option::Option::Some(input.into());
163        self
164    }
165    /// <p>The identifier for the hours of operation.</p>
166    pub fn set_hours_of_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.hours_of_operation_id = input;
168        self
169    }
170    /// <p>The identifier for the hours of operation.</p>
171    pub fn get_hours_of_operation_id(&self) -> &::std::option::Option<::std::string::String> {
172        &self.hours_of_operation_id
173    }
174    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
175    pub fn max_contacts(mut self, input: i32) -> Self {
176        self.max_contacts = ::std::option::Option::Some(input);
177        self
178    }
179    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
180    pub fn set_max_contacts(mut self, input: ::std::option::Option<i32>) -> Self {
181        self.max_contacts = input;
182        self
183    }
184    /// <p>The maximum number of contacts that can be in the queue before it is considered full.</p>
185    pub fn get_max_contacts(&self) -> &::std::option::Option<i32> {
186        &self.max_contacts
187    }
188    /// Appends an item to `quick_connect_ids`.
189    ///
190    /// To override the contents of this collection use [`set_quick_connect_ids`](Self::set_quick_connect_ids).
191    ///
192    /// <p>The quick connects available to agents who are working the queue.</p>
193    pub fn quick_connect_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        let mut v = self.quick_connect_ids.unwrap_or_default();
195        v.push(input.into());
196        self.quick_connect_ids = ::std::option::Option::Some(v);
197        self
198    }
199    /// <p>The quick connects available to agents who are working the queue.</p>
200    pub fn set_quick_connect_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
201        self.quick_connect_ids = input;
202        self
203    }
204    /// <p>The quick connects available to agents who are working the queue.</p>
205    pub fn get_quick_connect_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
206        &self.quick_connect_ids
207    }
208    /// Adds a key-value pair to `tags`.
209    ///
210    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
211    ///
212    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
213    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
214        let mut hash_map = self.tags.unwrap_or_default();
215        hash_map.insert(k.into(), v.into());
216        self.tags = ::std::option::Option::Some(hash_map);
217        self
218    }
219    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
220    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
221        self.tags = input;
222        self
223    }
224    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
225    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
226        &self.tags
227    }
228    /// Consumes the builder and constructs a [`CreateQueueInput`](crate::operation::create_queue::CreateQueueInput).
229    pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
230        ::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
231            instance_id: self.instance_id,
232            name: self.name,
233            description: self.description,
234            outbound_caller_config: self.outbound_caller_config,
235            outbound_email_config: self.outbound_email_config,
236            hours_of_operation_id: self.hours_of_operation_id,
237            max_contacts: self.max_contacts,
238            quick_connect_ids: self.quick_connect_ids,
239            tags: self.tags,
240        })
241    }
242}