aws_sdk_sqs/operation/receive_message/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::receive_message::_receive_message_output::ReceiveMessageOutputBuilder;
3
4pub use crate::operation::receive_message::_receive_message_input::ReceiveMessageInputBuilder;
5
6impl crate::operation::receive_message::builders::ReceiveMessageInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::receive_message::ReceiveMessageOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::receive_message::ReceiveMessageError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.receive_message();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ReceiveMessage`.
24///
25/// <p>Retrieves one or more messages (up to 10), from the specified queue. Using the <code>WaitTimeSeconds</code> parameter enables long-poll support. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html">Amazon SQS Long Polling</a> in the <i>Amazon SQS Developer Guide</i>.</p>
26/// <p>Short poll is the default behavior where a weighted random set of machines is sampled on a <code>ReceiveMessage</code> call. Therefore, only the messages on the sampled machines are returned. If the number of messages in the queue is small (fewer than 1,000), you most likely get fewer messages than you requested per <code>ReceiveMessage</code> call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular <code>ReceiveMessage</code> response. If this happens, repeat the request.</p>
27/// <p>For each message returned, the response includes the following:</p>
28/// <ul>
29/// <li>
30/// <p>The message body.</p></li>
31/// <li>
32/// <p>An MD5 digest of the message body. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p></li>
33/// <li>
34/// <p>The <code>MessageId</code> you received when you sent the message to the queue.</p></li>
35/// <li>
36/// <p>The receipt handle.</p></li>
37/// <li>
38/// <p>The message attributes.</p></li>
39/// <li>
40/// <p>An MD5 digest of the message attributes.</p></li>
41/// </ul>
42/// <p>The receipt handle is the identifier you must provide when deleting the message. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html">Queue and Message Identifiers</a> in the <i>Amazon SQS Developer Guide</i>.</p>
43/// <p>You can provide the <code>VisibilityTimeout</code> parameter in your request. The parameter is applied to the messages that Amazon SQS returns in the response. If you don't include the parameter, the overall visibility timeout for the queue is used for the returned messages. The default visibility timeout for a queue is 30 seconds.</p><note>
44/// <p>In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.</p>
45/// </note>
46#[derive(::std::clone::Clone, ::std::fmt::Debug)]
47pub struct ReceiveMessageFluentBuilder {
48    handle: ::std::sync::Arc<crate::client::Handle>,
49    inner: crate::operation::receive_message::builders::ReceiveMessageInputBuilder,
50    config_override: ::std::option::Option<crate::config::Builder>,
51}
52impl
53    crate::client::customize::internal::CustomizableSend<
54        crate::operation::receive_message::ReceiveMessageOutput,
55        crate::operation::receive_message::ReceiveMessageError,
56    > for ReceiveMessageFluentBuilder
57{
58    fn send(
59        self,
60        config_override: crate::config::Builder,
61    ) -> crate::client::customize::internal::BoxFuture<
62        crate::client::customize::internal::SendResult<
63            crate::operation::receive_message::ReceiveMessageOutput,
64            crate::operation::receive_message::ReceiveMessageError,
65        >,
66    > {
67        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
68    }
69}
70impl ReceiveMessageFluentBuilder {
71    /// Creates a new `ReceiveMessageFluentBuilder`.
72    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
73        Self {
74            handle,
75            inner: ::std::default::Default::default(),
76            config_override: ::std::option::Option::None,
77        }
78    }
79    /// Access the ReceiveMessage as a reference.
80    pub fn as_input(&self) -> &crate::operation::receive_message::builders::ReceiveMessageInputBuilder {
81        &self.inner
82    }
83    /// Sends the request and returns the response.
84    ///
85    /// If an error occurs, an `SdkError` will be returned with additional details that
86    /// can be matched against.
87    ///
88    /// By default, any retryable failures will be retried twice. Retry behavior
89    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
90    /// set when configuring the client.
91    pub async fn send(
92        self,
93    ) -> ::std::result::Result<
94        crate::operation::receive_message::ReceiveMessageOutput,
95        ::aws_smithy_runtime_api::client::result::SdkError<
96            crate::operation::receive_message::ReceiveMessageError,
97            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
98        >,
99    > {
100        let input = self
101            .inner
102            .build()
103            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
104        let runtime_plugins = crate::operation::receive_message::ReceiveMessage::operation_runtime_plugins(
105            self.handle.runtime_plugins.clone(),
106            &self.handle.conf,
107            self.config_override,
108        );
109        crate::operation::receive_message::ReceiveMessage::orchestrate(&runtime_plugins, input).await
110    }
111
112    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
113    pub fn customize(
114        self,
115    ) -> crate::client::customize::CustomizableOperation<
116        crate::operation::receive_message::ReceiveMessageOutput,
117        crate::operation::receive_message::ReceiveMessageError,
118        Self,
119    > {
120        crate::client::customize::CustomizableOperation::new(self)
121    }
122    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
123        self.set_config_override(::std::option::Option::Some(config_override.into()));
124        self
125    }
126
127    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
128        self.config_override = config_override;
129        self
130    }
131    /// <p>The URL of the Amazon SQS queue from which messages are received.</p>
132    /// <p>Queue URLs and names are case-sensitive.</p>
133    pub fn queue_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.inner = self.inner.queue_url(input.into());
135        self
136    }
137    /// <p>The URL of the Amazon SQS queue from which messages are received.</p>
138    /// <p>Queue URLs and names are case-sensitive.</p>
139    pub fn set_queue_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.inner = self.inner.set_queue_url(input);
141        self
142    }
143    /// <p>The URL of the Amazon SQS queue from which messages are received.</p>
144    /// <p>Queue URLs and names are case-sensitive.</p>
145    pub fn get_queue_url(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_queue_url()
147    }
148    ///
149    /// Appends an item to `AttributeNames`.
150    ///
151    /// To override the contents of this collection use [`set_attribute_names`](Self::set_attribute_names).
152    ///
153    /// <important>
154    /// <p>This parameter has been discontinued but will be supported for backward compatibility. To provide attribute names, you are encouraged to use <code>MessageSystemAttributeNames</code>.</p>
155    /// </important>
156    /// <p>A list of attributes that need to be returned along with each message. These attributes include:</p>
157    /// <ul>
158    /// <li>
159    /// <p><code>All</code> – Returns all values.</p></li>
160    /// <li>
161    /// <p><code>ApproximateFirstReceiveTimestamp</code> – Returns the time the message was first received from the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
162    /// <li>
163    /// <p><code>ApproximateReceiveCount</code> – Returns the number of times a message has been received across all queues but not deleted.</p></li>
164    /// <li>
165    /// <p><code>AWSTraceHeader</code> – Returns the X-Ray trace header string.</p></li>
166    /// <li>
167    /// <p><code>SenderId</code></p>
168    /// <ul>
169    /// <li>
170    /// <p>For a user, returns the user ID, for example <code>ABCDEFGHI1JKLMNOPQ23R</code>.</p></li>
171    /// <li>
172    /// <p>For an IAM role, returns the IAM role ID, for example <code>ABCDE1F2GH3I4JK5LMNOP:i-a123b456</code>.</p></li>
173    /// </ul></li>
174    /// <li>
175    /// <p><code>SentTimestamp</code> – Returns the time the message was sent to the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
176    /// <li>
177    /// <p><code>SqsManagedSseEnabled</code> – Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (for example, <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html">SSE-KMS</a> or <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html">SSE-SQS</a>).</p></li>
178    /// <li>
179    /// <p><code>MessageDeduplicationId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
180    /// <li>
181    /// <p><code>MessageGroupId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
182    /// <li>
183    /// <p><code>SequenceNumber</code> – Returns the value provided by Amazon SQS.</p></li>
184    /// </ul>
185    #[deprecated(note = "AttributeNames has been replaced by MessageSystemAttributeNames")]
186    pub fn attribute_names(mut self, input: crate::types::QueueAttributeName) -> Self {
187        self.inner = self.inner.attribute_names(input);
188        self
189    }
190    /// <important>
191    /// <p>This parameter has been discontinued but will be supported for backward compatibility. To provide attribute names, you are encouraged to use <code>MessageSystemAttributeNames</code>.</p>
192    /// </important>
193    /// <p>A list of attributes that need to be returned along with each message. These attributes include:</p>
194    /// <ul>
195    /// <li>
196    /// <p><code>All</code> – Returns all values.</p></li>
197    /// <li>
198    /// <p><code>ApproximateFirstReceiveTimestamp</code> – Returns the time the message was first received from the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
199    /// <li>
200    /// <p><code>ApproximateReceiveCount</code> – Returns the number of times a message has been received across all queues but not deleted.</p></li>
201    /// <li>
202    /// <p><code>AWSTraceHeader</code> – Returns the X-Ray trace header string.</p></li>
203    /// <li>
204    /// <p><code>SenderId</code></p>
205    /// <ul>
206    /// <li>
207    /// <p>For a user, returns the user ID, for example <code>ABCDEFGHI1JKLMNOPQ23R</code>.</p></li>
208    /// <li>
209    /// <p>For an IAM role, returns the IAM role ID, for example <code>ABCDE1F2GH3I4JK5LMNOP:i-a123b456</code>.</p></li>
210    /// </ul></li>
211    /// <li>
212    /// <p><code>SentTimestamp</code> – Returns the time the message was sent to the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
213    /// <li>
214    /// <p><code>SqsManagedSseEnabled</code> – Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (for example, <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html">SSE-KMS</a> or <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html">SSE-SQS</a>).</p></li>
215    /// <li>
216    /// <p><code>MessageDeduplicationId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
217    /// <li>
218    /// <p><code>MessageGroupId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
219    /// <li>
220    /// <p><code>SequenceNumber</code> – Returns the value provided by Amazon SQS.</p></li>
221    /// </ul>
222    #[deprecated(note = "AttributeNames has been replaced by MessageSystemAttributeNames")]
223    pub fn set_attribute_names(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QueueAttributeName>>) -> Self {
224        self.inner = self.inner.set_attribute_names(input);
225        self
226    }
227    /// <important>
228    /// <p>This parameter has been discontinued but will be supported for backward compatibility. To provide attribute names, you are encouraged to use <code>MessageSystemAttributeNames</code>.</p>
229    /// </important>
230    /// <p>A list of attributes that need to be returned along with each message. These attributes include:</p>
231    /// <ul>
232    /// <li>
233    /// <p><code>All</code> – Returns all values.</p></li>
234    /// <li>
235    /// <p><code>ApproximateFirstReceiveTimestamp</code> – Returns the time the message was first received from the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
236    /// <li>
237    /// <p><code>ApproximateReceiveCount</code> – Returns the number of times a message has been received across all queues but not deleted.</p></li>
238    /// <li>
239    /// <p><code>AWSTraceHeader</code> – Returns the X-Ray trace header string.</p></li>
240    /// <li>
241    /// <p><code>SenderId</code></p>
242    /// <ul>
243    /// <li>
244    /// <p>For a user, returns the user ID, for example <code>ABCDEFGHI1JKLMNOPQ23R</code>.</p></li>
245    /// <li>
246    /// <p>For an IAM role, returns the IAM role ID, for example <code>ABCDE1F2GH3I4JK5LMNOP:i-a123b456</code>.</p></li>
247    /// </ul></li>
248    /// <li>
249    /// <p><code>SentTimestamp</code> – Returns the time the message was sent to the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
250    /// <li>
251    /// <p><code>SqsManagedSseEnabled</code> – Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (for example, <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html">SSE-KMS</a> or <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html">SSE-SQS</a>).</p></li>
252    /// <li>
253    /// <p><code>MessageDeduplicationId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
254    /// <li>
255    /// <p><code>MessageGroupId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
256    /// <li>
257    /// <p><code>SequenceNumber</code> – Returns the value provided by Amazon SQS.</p></li>
258    /// </ul>
259    #[deprecated(note = "AttributeNames has been replaced by MessageSystemAttributeNames")]
260    pub fn get_attribute_names(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QueueAttributeName>> {
261        self.inner.get_attribute_names()
262    }
263    ///
264    /// Appends an item to `MessageSystemAttributeNames`.
265    ///
266    /// To override the contents of this collection use [`set_message_system_attribute_names`](Self::set_message_system_attribute_names).
267    ///
268    /// <p>A list of attributes that need to be returned along with each message. These attributes include:</p>
269    /// <ul>
270    /// <li>
271    /// <p><code>All</code> – Returns all values.</p></li>
272    /// <li>
273    /// <p><code>ApproximateFirstReceiveTimestamp</code> – Returns the time the message was first received from the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
274    /// <li>
275    /// <p><code>ApproximateReceiveCount</code> – Returns the number of times a message has been received across all queues but not deleted.</p></li>
276    /// <li>
277    /// <p><code>AWSTraceHeader</code> – Returns the X-Ray trace header string.</p></li>
278    /// <li>
279    /// <p><code>SenderId</code></p>
280    /// <ul>
281    /// <li>
282    /// <p>For a user, returns the user ID, for example <code>ABCDEFGHI1JKLMNOPQ23R</code>.</p></li>
283    /// <li>
284    /// <p>For an IAM role, returns the IAM role ID, for example <code>ABCDE1F2GH3I4JK5LMNOP:i-a123b456</code>.</p></li>
285    /// </ul></li>
286    /// <li>
287    /// <p><code>SentTimestamp</code> – Returns the time the message was sent to the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
288    /// <li>
289    /// <p><code>SqsManagedSseEnabled</code> – Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (for example, <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html">SSE-KMS</a> or <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html">SSE-SQS</a>).</p></li>
290    /// <li>
291    /// <p><code>MessageDeduplicationId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
292    /// <li>
293    /// <p><code>MessageGroupId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
294    /// <li>
295    /// <p><code>SequenceNumber</code> – Returns the value provided by Amazon SQS.</p></li>
296    /// </ul>
297    pub fn message_system_attribute_names(mut self, input: crate::types::MessageSystemAttributeName) -> Self {
298        self.inner = self.inner.message_system_attribute_names(input);
299        self
300    }
301    /// <p>A list of attributes that need to be returned along with each message. These attributes include:</p>
302    /// <ul>
303    /// <li>
304    /// <p><code>All</code> – Returns all values.</p></li>
305    /// <li>
306    /// <p><code>ApproximateFirstReceiveTimestamp</code> – Returns the time the message was first received from the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
307    /// <li>
308    /// <p><code>ApproximateReceiveCount</code> – Returns the number of times a message has been received across all queues but not deleted.</p></li>
309    /// <li>
310    /// <p><code>AWSTraceHeader</code> – Returns the X-Ray trace header string.</p></li>
311    /// <li>
312    /// <p><code>SenderId</code></p>
313    /// <ul>
314    /// <li>
315    /// <p>For a user, returns the user ID, for example <code>ABCDEFGHI1JKLMNOPQ23R</code>.</p></li>
316    /// <li>
317    /// <p>For an IAM role, returns the IAM role ID, for example <code>ABCDE1F2GH3I4JK5LMNOP:i-a123b456</code>.</p></li>
318    /// </ul></li>
319    /// <li>
320    /// <p><code>SentTimestamp</code> – Returns the time the message was sent to the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
321    /// <li>
322    /// <p><code>SqsManagedSseEnabled</code> – Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (for example, <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html">SSE-KMS</a> or <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html">SSE-SQS</a>).</p></li>
323    /// <li>
324    /// <p><code>MessageDeduplicationId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
325    /// <li>
326    /// <p><code>MessageGroupId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
327    /// <li>
328    /// <p><code>SequenceNumber</code> – Returns the value provided by Amazon SQS.</p></li>
329    /// </ul>
330    pub fn set_message_system_attribute_names(
331        mut self,
332        input: ::std::option::Option<::std::vec::Vec<crate::types::MessageSystemAttributeName>>,
333    ) -> Self {
334        self.inner = self.inner.set_message_system_attribute_names(input);
335        self
336    }
337    /// <p>A list of attributes that need to be returned along with each message. These attributes include:</p>
338    /// <ul>
339    /// <li>
340    /// <p><code>All</code> – Returns all values.</p></li>
341    /// <li>
342    /// <p><code>ApproximateFirstReceiveTimestamp</code> – Returns the time the message was first received from the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
343    /// <li>
344    /// <p><code>ApproximateReceiveCount</code> – Returns the number of times a message has been received across all queues but not deleted.</p></li>
345    /// <li>
346    /// <p><code>AWSTraceHeader</code> – Returns the X-Ray trace header string.</p></li>
347    /// <li>
348    /// <p><code>SenderId</code></p>
349    /// <ul>
350    /// <li>
351    /// <p>For a user, returns the user ID, for example <code>ABCDEFGHI1JKLMNOPQ23R</code>.</p></li>
352    /// <li>
353    /// <p>For an IAM role, returns the IAM role ID, for example <code>ABCDE1F2GH3I4JK5LMNOP:i-a123b456</code>.</p></li>
354    /// </ul></li>
355    /// <li>
356    /// <p><code>SentTimestamp</code> – Returns the time the message was sent to the queue (<a href="http://en.wikipedia.org/wiki/Unix_time">epoch time</a> in milliseconds).</p></li>
357    /// <li>
358    /// <p><code>SqsManagedSseEnabled</code> – Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (for example, <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html">SSE-KMS</a> or <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html">SSE-SQS</a>).</p></li>
359    /// <li>
360    /// <p><code>MessageDeduplicationId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
361    /// <li>
362    /// <p><code>MessageGroupId</code> – Returns the value provided by the producer that calls the <code> <code>SendMessage</code> </code> action.</p></li>
363    /// <li>
364    /// <p><code>SequenceNumber</code> – Returns the value provided by Amazon SQS.</p></li>
365    /// </ul>
366    pub fn get_message_system_attribute_names(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MessageSystemAttributeName>> {
367        self.inner.get_message_system_attribute_names()
368    }
369    ///
370    /// Appends an item to `MessageAttributeNames`.
371    ///
372    /// To override the contents of this collection use [`set_message_attribute_names`](Self::set_message_attribute_names).
373    ///
374    /// <p>The name of the message attribute, where <i>N</i> is the index.</p>
375    /// <ul>
376    /// <li>
377    /// <p>The name can contain alphanumeric characters and the underscore (<code>_</code>), hyphen (<code>-</code>), and period (<code>.</code>).</p></li>
378    /// <li>
379    /// <p>The name is case-sensitive and must be unique among all attribute names for the message.</p></li>
380    /// <li>
381    /// <p>The name must not start with AWS-reserved prefixes such as <code>AWS.</code> or <code>Amazon.</code> (or any casing variants).</p></li>
382    /// <li>
383    /// <p>The name must not start or end with a period (<code>.</code>), and it should not have periods in succession (<code>..</code>).</p></li>
384    /// <li>
385    /// <p>The name can be up to 256 characters long.</p></li>
386    /// </ul>
387    /// <p>When using <code>ReceiveMessage</code>, you can send a list of attribute names to receive, or you can return all of the attributes by specifying <code>All</code> or <code>.*</code> in your request. You can also use all message attributes starting with a prefix, for example <code>bar.*</code>.</p>
388    pub fn message_attribute_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389        self.inner = self.inner.message_attribute_names(input.into());
390        self
391    }
392    /// <p>The name of the message attribute, where <i>N</i> is the index.</p>
393    /// <ul>
394    /// <li>
395    /// <p>The name can contain alphanumeric characters and the underscore (<code>_</code>), hyphen (<code>-</code>), and period (<code>.</code>).</p></li>
396    /// <li>
397    /// <p>The name is case-sensitive and must be unique among all attribute names for the message.</p></li>
398    /// <li>
399    /// <p>The name must not start with AWS-reserved prefixes such as <code>AWS.</code> or <code>Amazon.</code> (or any casing variants).</p></li>
400    /// <li>
401    /// <p>The name must not start or end with a period (<code>.</code>), and it should not have periods in succession (<code>..</code>).</p></li>
402    /// <li>
403    /// <p>The name can be up to 256 characters long.</p></li>
404    /// </ul>
405    /// <p>When using <code>ReceiveMessage</code>, you can send a list of attribute names to receive, or you can return all of the attributes by specifying <code>All</code> or <code>.*</code> in your request. You can also use all message attributes starting with a prefix, for example <code>bar.*</code>.</p>
406    pub fn set_message_attribute_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
407        self.inner = self.inner.set_message_attribute_names(input);
408        self
409    }
410    /// <p>The name of the message attribute, where <i>N</i> is the index.</p>
411    /// <ul>
412    /// <li>
413    /// <p>The name can contain alphanumeric characters and the underscore (<code>_</code>), hyphen (<code>-</code>), and period (<code>.</code>).</p></li>
414    /// <li>
415    /// <p>The name is case-sensitive and must be unique among all attribute names for the message.</p></li>
416    /// <li>
417    /// <p>The name must not start with AWS-reserved prefixes such as <code>AWS.</code> or <code>Amazon.</code> (or any casing variants).</p></li>
418    /// <li>
419    /// <p>The name must not start or end with a period (<code>.</code>), and it should not have periods in succession (<code>..</code>).</p></li>
420    /// <li>
421    /// <p>The name can be up to 256 characters long.</p></li>
422    /// </ul>
423    /// <p>When using <code>ReceiveMessage</code>, you can send a list of attribute names to receive, or you can return all of the attributes by specifying <code>All</code> or <code>.*</code> in your request. You can also use all message attributes starting with a prefix, for example <code>bar.*</code>.</p>
424    pub fn get_message_attribute_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
425        self.inner.get_message_attribute_names()
426    }
427    /// <p>The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.</p>
428    pub fn max_number_of_messages(mut self, input: i32) -> Self {
429        self.inner = self.inner.max_number_of_messages(input);
430        self
431    }
432    /// <p>The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.</p>
433    pub fn set_max_number_of_messages(mut self, input: ::std::option::Option<i32>) -> Self {
434        self.inner = self.inner.set_max_number_of_messages(input);
435        self
436    }
437    /// <p>The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.</p>
438    pub fn get_max_number_of_messages(&self) -> &::std::option::Option<i32> {
439        self.inner.get_max_number_of_messages()
440    }
441    /// <p>The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a <code>ReceiveMessage</code> request. If not specified, the default visibility timeout for the queue is used, which is 30 seconds.</p>
442    /// <p>Understanding <code>VisibilityTimeout</code>:</p>
443    /// <ul>
444    /// <li>
445    /// <p>When a message is received from a queue, it becomes temporarily invisible to other consumers for the duration of the visibility timeout. This prevents multiple consumers from processing the same message simultaneously. If the message is not deleted or its visibility timeout is not extended before the timeout expires, it becomes visible again and can be retrieved by other consumers.</p></li>
446    /// <li>
447    /// <p>Setting an appropriate visibility timeout is crucial. If it's too short, the message might become visible again before processing is complete, leading to duplicate processing. If it's too long, it delays the reprocessing of messages if the initial processing fails.</p></li>
448    /// <li>
449    /// <p>You can adjust the visibility timeout using the <code>--visibility-timeout</code> parameter in the <code>receive-message</code> command to match the processing time required by your application.</p></li>
450    /// <li>
451    /// <p>A message that isn't deleted or a message whose visibility isn't extended before the visibility timeout expires counts as a failed receive. Depending on the configuration of the queue, the message might be sent to the dead-letter queue.</p></li>
452    /// </ul>
453    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">Visibility Timeout</a> in the <i>Amazon SQS Developer Guide</i>.</p>
454    pub fn visibility_timeout(mut self, input: i32) -> Self {
455        self.inner = self.inner.visibility_timeout(input);
456        self
457    }
458    /// <p>The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a <code>ReceiveMessage</code> request. If not specified, the default visibility timeout for the queue is used, which is 30 seconds.</p>
459    /// <p>Understanding <code>VisibilityTimeout</code>:</p>
460    /// <ul>
461    /// <li>
462    /// <p>When a message is received from a queue, it becomes temporarily invisible to other consumers for the duration of the visibility timeout. This prevents multiple consumers from processing the same message simultaneously. If the message is not deleted or its visibility timeout is not extended before the timeout expires, it becomes visible again and can be retrieved by other consumers.</p></li>
463    /// <li>
464    /// <p>Setting an appropriate visibility timeout is crucial. If it's too short, the message might become visible again before processing is complete, leading to duplicate processing. If it's too long, it delays the reprocessing of messages if the initial processing fails.</p></li>
465    /// <li>
466    /// <p>You can adjust the visibility timeout using the <code>--visibility-timeout</code> parameter in the <code>receive-message</code> command to match the processing time required by your application.</p></li>
467    /// <li>
468    /// <p>A message that isn't deleted or a message whose visibility isn't extended before the visibility timeout expires counts as a failed receive. Depending on the configuration of the queue, the message might be sent to the dead-letter queue.</p></li>
469    /// </ul>
470    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">Visibility Timeout</a> in the <i>Amazon SQS Developer Guide</i>.</p>
471    pub fn set_visibility_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
472        self.inner = self.inner.set_visibility_timeout(input);
473        self
474    }
475    /// <p>The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a <code>ReceiveMessage</code> request. If not specified, the default visibility timeout for the queue is used, which is 30 seconds.</p>
476    /// <p>Understanding <code>VisibilityTimeout</code>:</p>
477    /// <ul>
478    /// <li>
479    /// <p>When a message is received from a queue, it becomes temporarily invisible to other consumers for the duration of the visibility timeout. This prevents multiple consumers from processing the same message simultaneously. If the message is not deleted or its visibility timeout is not extended before the timeout expires, it becomes visible again and can be retrieved by other consumers.</p></li>
480    /// <li>
481    /// <p>Setting an appropriate visibility timeout is crucial. If it's too short, the message might become visible again before processing is complete, leading to duplicate processing. If it's too long, it delays the reprocessing of messages if the initial processing fails.</p></li>
482    /// <li>
483    /// <p>You can adjust the visibility timeout using the <code>--visibility-timeout</code> parameter in the <code>receive-message</code> command to match the processing time required by your application.</p></li>
484    /// <li>
485    /// <p>A message that isn't deleted or a message whose visibility isn't extended before the visibility timeout expires counts as a failed receive. Depending on the configuration of the queue, the message might be sent to the dead-letter queue.</p></li>
486    /// </ul>
487    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">Visibility Timeout</a> in the <i>Amazon SQS Developer Guide</i>.</p>
488    pub fn get_visibility_timeout(&self) -> &::std::option::Option<i32> {
489        self.inner.get_visibility_timeout()
490    }
491    /// <p>The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call does not return a message list. If you are using the Java SDK, it returns a <code>ReceiveMessageResponse</code> object, which has a empty list instead of a Null object.</p><important>
492    /// <p>To avoid HTTP errors, ensure that the HTTP response timeout for <code>ReceiveMessage</code> requests is longer than the <code>WaitTimeSeconds</code> parameter. For example, with the Java SDK, you can set HTTP transport settings using the <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html"> NettyNioAsyncHttpClient</a> for asynchronous clients, or the <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html"> ApacheHttpClient</a> for synchronous clients.</p>
493    /// </important>
494    pub fn wait_time_seconds(mut self, input: i32) -> Self {
495        self.inner = self.inner.wait_time_seconds(input);
496        self
497    }
498    /// <p>The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call does not return a message list. If you are using the Java SDK, it returns a <code>ReceiveMessageResponse</code> object, which has a empty list instead of a Null object.</p><important>
499    /// <p>To avoid HTTP errors, ensure that the HTTP response timeout for <code>ReceiveMessage</code> requests is longer than the <code>WaitTimeSeconds</code> parameter. For example, with the Java SDK, you can set HTTP transport settings using the <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html"> NettyNioAsyncHttpClient</a> for asynchronous clients, or the <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html"> ApacheHttpClient</a> for synchronous clients.</p>
500    /// </important>
501    pub fn set_wait_time_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
502        self.inner = self.inner.set_wait_time_seconds(input);
503        self
504    }
505    /// <p>The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than <code>WaitTimeSeconds</code>. If no messages are available and the wait time expires, the call does not return a message list. If you are using the Java SDK, it returns a <code>ReceiveMessageResponse</code> object, which has a empty list instead of a Null object.</p><important>
506    /// <p>To avoid HTTP errors, ensure that the HTTP response timeout for <code>ReceiveMessage</code> requests is longer than the <code>WaitTimeSeconds</code> parameter. For example, with the Java SDK, you can set HTTP transport settings using the <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html"> NettyNioAsyncHttpClient</a> for asynchronous clients, or the <a href="https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html"> ApacheHttpClient</a> for synchronous clients.</p>
507    /// </important>
508    pub fn get_wait_time_seconds(&self) -> &::std::option::Option<i32> {
509        self.inner.get_wait_time_seconds()
510    }
511    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
512    /// <p>The token used for deduplication of <code>ReceiveMessage</code> calls. If a networking issue occurs after a <code>ReceiveMessage</code> action, and instead of a response you receive a generic error, it is possible to retry the same action with an identical <code>ReceiveRequestAttemptId</code> to retrieve the same set of messages, even if their visibility timeout has not yet expired.</p>
513    /// <ul>
514    /// <li>
515    /// <p>You can use <code>ReceiveRequestAttemptId</code> only for 5 minutes after a <code>ReceiveMessage</code> action.</p></li>
516    /// <li>
517    /// <p>When you set <code>FifoQueue</code>, a caller of the <code>ReceiveMessage</code> action can provide a <code>ReceiveRequestAttemptId</code> explicitly.</p></li>
518    /// <li>
519    /// <p>It is possible to retry the <code>ReceiveMessage</code> action with the same <code>ReceiveRequestAttemptId</code> if none of the messages have been modified (deleted or had their visibility changes).</p></li>
520    /// <li>
521    /// <p>During a visibility timeout, subsequent calls with the same <code>ReceiveRequestAttemptId</code> return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">Visibility Timeout</a> in the <i>Amazon SQS Developer Guide</i>.</p><important>
522    /// <p>If a caller of the <code>ReceiveMessage</code> action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.</p>
523    /// <p>To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.</p>
524    /// </important></li>
525    /// <li>
526    /// <p>While messages with a particular <code>MessageGroupId</code> are invisible, no more messages belonging to the same <code>MessageGroupId</code> are returned until the visibility timeout expires. You can still receive messages with another <code>MessageGroupId</code> from your FIFO queue as long as they are visible.</p></li>
527    /// <li>
528    /// <p>If a caller of <code>ReceiveMessage</code> can't track the <code>ReceiveRequestAttemptId</code>, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.</p></li>
529    /// </ul>
530    /// <p>The maximum length of <code>ReceiveRequestAttemptId</code> is 128 characters. <code>ReceiveRequestAttemptId</code> can contain alphanumeric characters (<code>a-z</code>, <code>A-Z</code>, <code>0-9</code>) and punctuation (<code>!"#$%&amp;'()*+,-./:;&lt;=&gt;?@\[\\]^_`{|}~</code>).</p>
531    /// <p>For best practices of using <code>ReceiveRequestAttemptId</code>, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html">Using the ReceiveRequestAttemptId Request Parameter</a> in the <i>Amazon SQS Developer Guide</i>.</p>
532    pub fn receive_request_attempt_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
533        self.inner = self.inner.receive_request_attempt_id(input.into());
534        self
535    }
536    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
537    /// <p>The token used for deduplication of <code>ReceiveMessage</code> calls. If a networking issue occurs after a <code>ReceiveMessage</code> action, and instead of a response you receive a generic error, it is possible to retry the same action with an identical <code>ReceiveRequestAttemptId</code> to retrieve the same set of messages, even if their visibility timeout has not yet expired.</p>
538    /// <ul>
539    /// <li>
540    /// <p>You can use <code>ReceiveRequestAttemptId</code> only for 5 minutes after a <code>ReceiveMessage</code> action.</p></li>
541    /// <li>
542    /// <p>When you set <code>FifoQueue</code>, a caller of the <code>ReceiveMessage</code> action can provide a <code>ReceiveRequestAttemptId</code> explicitly.</p></li>
543    /// <li>
544    /// <p>It is possible to retry the <code>ReceiveMessage</code> action with the same <code>ReceiveRequestAttemptId</code> if none of the messages have been modified (deleted or had their visibility changes).</p></li>
545    /// <li>
546    /// <p>During a visibility timeout, subsequent calls with the same <code>ReceiveRequestAttemptId</code> return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">Visibility Timeout</a> in the <i>Amazon SQS Developer Guide</i>.</p><important>
547    /// <p>If a caller of the <code>ReceiveMessage</code> action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.</p>
548    /// <p>To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.</p>
549    /// </important></li>
550    /// <li>
551    /// <p>While messages with a particular <code>MessageGroupId</code> are invisible, no more messages belonging to the same <code>MessageGroupId</code> are returned until the visibility timeout expires. You can still receive messages with another <code>MessageGroupId</code> from your FIFO queue as long as they are visible.</p></li>
552    /// <li>
553    /// <p>If a caller of <code>ReceiveMessage</code> can't track the <code>ReceiveRequestAttemptId</code>, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.</p></li>
554    /// </ul>
555    /// <p>The maximum length of <code>ReceiveRequestAttemptId</code> is 128 characters. <code>ReceiveRequestAttemptId</code> can contain alphanumeric characters (<code>a-z</code>, <code>A-Z</code>, <code>0-9</code>) and punctuation (<code>!"#$%&amp;'()*+,-./:;&lt;=&gt;?@\[\\]^_`{|}~</code>).</p>
556    /// <p>For best practices of using <code>ReceiveRequestAttemptId</code>, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html">Using the ReceiveRequestAttemptId Request Parameter</a> in the <i>Amazon SQS Developer Guide</i>.</p>
557    pub fn set_receive_request_attempt_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
558        self.inner = self.inner.set_receive_request_attempt_id(input);
559        self
560    }
561    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
562    /// <p>The token used for deduplication of <code>ReceiveMessage</code> calls. If a networking issue occurs after a <code>ReceiveMessage</code> action, and instead of a response you receive a generic error, it is possible to retry the same action with an identical <code>ReceiveRequestAttemptId</code> to retrieve the same set of messages, even if their visibility timeout has not yet expired.</p>
563    /// <ul>
564    /// <li>
565    /// <p>You can use <code>ReceiveRequestAttemptId</code> only for 5 minutes after a <code>ReceiveMessage</code> action.</p></li>
566    /// <li>
567    /// <p>When you set <code>FifoQueue</code>, a caller of the <code>ReceiveMessage</code> action can provide a <code>ReceiveRequestAttemptId</code> explicitly.</p></li>
568    /// <li>
569    /// <p>It is possible to retry the <code>ReceiveMessage</code> action with the same <code>ReceiveRequestAttemptId</code> if none of the messages have been modified (deleted or had their visibility changes).</p></li>
570    /// <li>
571    /// <p>During a visibility timeout, subsequent calls with the same <code>ReceiveRequestAttemptId</code> return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html">Visibility Timeout</a> in the <i>Amazon SQS Developer Guide</i>.</p><important>
572    /// <p>If a caller of the <code>ReceiveMessage</code> action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.</p>
573    /// <p>To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.</p>
574    /// </important></li>
575    /// <li>
576    /// <p>While messages with a particular <code>MessageGroupId</code> are invisible, no more messages belonging to the same <code>MessageGroupId</code> are returned until the visibility timeout expires. You can still receive messages with another <code>MessageGroupId</code> from your FIFO queue as long as they are visible.</p></li>
577    /// <li>
578    /// <p>If a caller of <code>ReceiveMessage</code> can't track the <code>ReceiveRequestAttemptId</code>, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.</p></li>
579    /// </ul>
580    /// <p>The maximum length of <code>ReceiveRequestAttemptId</code> is 128 characters. <code>ReceiveRequestAttemptId</code> can contain alphanumeric characters (<code>a-z</code>, <code>A-Z</code>, <code>0-9</code>) and punctuation (<code>!"#$%&amp;'()*+,-./:;&lt;=&gt;?@\[\\]^_`{|}~</code>).</p>
581    /// <p>For best practices of using <code>ReceiveRequestAttemptId</code>, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html">Using the ReceiveRequestAttemptId Request Parameter</a> in the <i>Amazon SQS Developer Guide</i>.</p>
582    pub fn get_receive_request_attempt_id(&self) -> &::std::option::Option<::std::string::String> {
583        self.inner.get_receive_request_attempt_id()
584    }
585}