aws_sdk_connect/types/_routing_profile_queue_config_summary.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains summary information about a routing profile queue.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RoutingProfileQueueConfigSummary {
7 /// <p>The identifier for the queue.</p>
8 pub queue_id: ::std::string::String,
9 /// <p>The Amazon Resource Name (ARN) of the queue.</p>
10 pub queue_arn: ::std::string::String,
11 /// <p>The name of the queue.</p>
12 pub queue_name: ::std::string::String,
13 /// <p>The order in which contacts are to be handled for the queue. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a>.</p>
14 pub priority: i32,
15 /// <p>The delay, in seconds, that a contact should be in the queue before they are routed to an available agent. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
16 pub delay: i32,
17 /// <p>The channels this queue supports.</p>
18 pub channel: crate::types::Channel,
19}
20impl RoutingProfileQueueConfigSummary {
21 /// <p>The identifier for the queue.</p>
22 pub fn queue_id(&self) -> &str {
23 use std::ops::Deref;
24 self.queue_id.deref()
25 }
26 /// <p>The Amazon Resource Name (ARN) of the queue.</p>
27 pub fn queue_arn(&self) -> &str {
28 use std::ops::Deref;
29 self.queue_arn.deref()
30 }
31 /// <p>The name of the queue.</p>
32 pub fn queue_name(&self) -> &str {
33 use std::ops::Deref;
34 self.queue_name.deref()
35 }
36 /// <p>The order in which contacts are to be handled for the queue. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a>.</p>
37 pub fn priority(&self) -> i32 {
38 self.priority
39 }
40 /// <p>The delay, in seconds, that a contact should be in the queue before they are routed to an available agent. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
41 pub fn delay(&self) -> i32 {
42 self.delay
43 }
44 /// <p>The channels this queue supports.</p>
45 pub fn channel(&self) -> &crate::types::Channel {
46 &self.channel
47 }
48}
49impl RoutingProfileQueueConfigSummary {
50 /// Creates a new builder-style object to manufacture [`RoutingProfileQueueConfigSummary`](crate::types::RoutingProfileQueueConfigSummary).
51 pub fn builder() -> crate::types::builders::RoutingProfileQueueConfigSummaryBuilder {
52 crate::types::builders::RoutingProfileQueueConfigSummaryBuilder::default()
53 }
54}
55
56/// A builder for [`RoutingProfileQueueConfigSummary`](crate::types::RoutingProfileQueueConfigSummary).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct RoutingProfileQueueConfigSummaryBuilder {
60 pub(crate) queue_id: ::std::option::Option<::std::string::String>,
61 pub(crate) queue_arn: ::std::option::Option<::std::string::String>,
62 pub(crate) queue_name: ::std::option::Option<::std::string::String>,
63 pub(crate) priority: ::std::option::Option<i32>,
64 pub(crate) delay: ::std::option::Option<i32>,
65 pub(crate) channel: ::std::option::Option<crate::types::Channel>,
66}
67impl RoutingProfileQueueConfigSummaryBuilder {
68 /// <p>The identifier for the queue.</p>
69 /// This field is required.
70 pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.queue_id = ::std::option::Option::Some(input.into());
72 self
73 }
74 /// <p>The identifier for the queue.</p>
75 pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.queue_id = input;
77 self
78 }
79 /// <p>The identifier for the queue.</p>
80 pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
81 &self.queue_id
82 }
83 /// <p>The Amazon Resource Name (ARN) of the queue.</p>
84 /// This field is required.
85 pub fn queue_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.queue_arn = ::std::option::Option::Some(input.into());
87 self
88 }
89 /// <p>The Amazon Resource Name (ARN) of the queue.</p>
90 pub fn set_queue_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.queue_arn = input;
92 self
93 }
94 /// <p>The Amazon Resource Name (ARN) of the queue.</p>
95 pub fn get_queue_arn(&self) -> &::std::option::Option<::std::string::String> {
96 &self.queue_arn
97 }
98 /// <p>The name of the queue.</p>
99 /// This field is required.
100 pub fn queue_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.queue_name = ::std::option::Option::Some(input.into());
102 self
103 }
104 /// <p>The name of the queue.</p>
105 pub fn set_queue_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.queue_name = input;
107 self
108 }
109 /// <p>The name of the queue.</p>
110 pub fn get_queue_name(&self) -> &::std::option::Option<::std::string::String> {
111 &self.queue_name
112 }
113 /// <p>The order in which contacts are to be handled for the queue. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a>.</p>
114 /// This field is required.
115 pub fn priority(mut self, input: i32) -> Self {
116 self.priority = ::std::option::Option::Some(input);
117 self
118 }
119 /// <p>The order in which contacts are to be handled for the queue. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a>.</p>
120 pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
121 self.priority = input;
122 self
123 }
124 /// <p>The order in which contacts are to be handled for the queue. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a>.</p>
125 pub fn get_priority(&self) -> &::std::option::Option<i32> {
126 &self.priority
127 }
128 /// <p>The delay, in seconds, that a contact should be in the queue before they are routed to an available agent. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
129 /// This field is required.
130 pub fn delay(mut self, input: i32) -> Self {
131 self.delay = ::std::option::Option::Some(input);
132 self
133 }
134 /// <p>The delay, in seconds, that a contact should be in the queue before they are routed to an available agent. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
135 pub fn set_delay(mut self, input: ::std::option::Option<i32>) -> Self {
136 self.delay = input;
137 self
138 }
139 /// <p>The delay, in seconds, that a contact should be in the queue before they are routed to an available agent. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html">Queues: priority and delay</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
140 pub fn get_delay(&self) -> &::std::option::Option<i32> {
141 &self.delay
142 }
143 /// <p>The channels this queue supports.</p>
144 /// This field is required.
145 pub fn channel(mut self, input: crate::types::Channel) -> Self {
146 self.channel = ::std::option::Option::Some(input);
147 self
148 }
149 /// <p>The channels this queue supports.</p>
150 pub fn set_channel(mut self, input: ::std::option::Option<crate::types::Channel>) -> Self {
151 self.channel = input;
152 self
153 }
154 /// <p>The channels this queue supports.</p>
155 pub fn get_channel(&self) -> &::std::option::Option<crate::types::Channel> {
156 &self.channel
157 }
158 /// Consumes the builder and constructs a [`RoutingProfileQueueConfigSummary`](crate::types::RoutingProfileQueueConfigSummary).
159 /// This method will fail if any of the following fields are not set:
160 /// - [`queue_id`](crate::types::builders::RoutingProfileQueueConfigSummaryBuilder::queue_id)
161 /// - [`queue_arn`](crate::types::builders::RoutingProfileQueueConfigSummaryBuilder::queue_arn)
162 /// - [`queue_name`](crate::types::builders::RoutingProfileQueueConfigSummaryBuilder::queue_name)
163 /// - [`priority`](crate::types::builders::RoutingProfileQueueConfigSummaryBuilder::priority)
164 /// - [`channel`](crate::types::builders::RoutingProfileQueueConfigSummaryBuilder::channel)
165 pub fn build(self) -> ::std::result::Result<crate::types::RoutingProfileQueueConfigSummary, ::aws_smithy_types::error::operation::BuildError> {
166 ::std::result::Result::Ok(crate::types::RoutingProfileQueueConfigSummary {
167 queue_id: self.queue_id.ok_or_else(|| {
168 ::aws_smithy_types::error::operation::BuildError::missing_field(
169 "queue_id",
170 "queue_id was not specified but it is required when building RoutingProfileQueueConfigSummary",
171 )
172 })?,
173 queue_arn: self.queue_arn.ok_or_else(|| {
174 ::aws_smithy_types::error::operation::BuildError::missing_field(
175 "queue_arn",
176 "queue_arn was not specified but it is required when building RoutingProfileQueueConfigSummary",
177 )
178 })?,
179 queue_name: self.queue_name.ok_or_else(|| {
180 ::aws_smithy_types::error::operation::BuildError::missing_field(
181 "queue_name",
182 "queue_name was not specified but it is required when building RoutingProfileQueueConfigSummary",
183 )
184 })?,
185 priority: self.priority.ok_or_else(|| {
186 ::aws_smithy_types::error::operation::BuildError::missing_field(
187 "priority",
188 "priority was not specified but it is required when building RoutingProfileQueueConfigSummary",
189 )
190 })?,
191 delay: self.delay.unwrap_or_default(),
192 channel: self.channel.ok_or_else(|| {
193 ::aws_smithy_types::error::operation::BuildError::missing_field(
194 "channel",
195 "channel was not specified but it is required when building RoutingProfileQueueConfigSummary",
196 )
197 })?,
198 })
199 }
200}