1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChangeMessageVisibilityBatchInput {
/// <p>The URL of the Amazon SQS queue whose messages' visibility is changed.</p>
/// <p>Queue URLs and names are case-sensitive.</p>
pub queue_url: ::std::option::Option<::std::string::String>,
/// <p>Lists the receipt handles of the messages for which the visibility timeout must be changed.</p>
pub entries: ::std::option::Option<::std::vec::Vec<crate::types::ChangeMessageVisibilityBatchRequestEntry>>,
}
impl ChangeMessageVisibilityBatchInput {
/// <p>The URL of the Amazon SQS queue whose messages' visibility is changed.</p>
/// <p>Queue URLs and names are case-sensitive.</p>
pub fn queue_url(&self) -> ::std::option::Option<&str> {
self.queue_url.as_deref()
}
/// <p>Lists the receipt handles of the messages for which the visibility timeout must be changed.</p>
pub fn entries(&self) -> ::std::option::Option<&[crate::types::ChangeMessageVisibilityBatchRequestEntry]> {
self.entries.as_deref()
}
}
impl ChangeMessageVisibilityBatchInput {
/// Creates a new builder-style object to manufacture [`ChangeMessageVisibilityBatchInput`](crate::operation::change_message_visibility_batch::ChangeMessageVisibilityBatchInput).
pub fn builder() -> crate::operation::change_message_visibility_batch::builders::ChangeMessageVisibilityBatchInputBuilder {
crate::operation::change_message_visibility_batch::builders::ChangeMessageVisibilityBatchInputBuilder::default()
}
}
/// A builder for [`ChangeMessageVisibilityBatchInput`](crate::operation::change_message_visibility_batch::ChangeMessageVisibilityBatchInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChangeMessageVisibilityBatchInputBuilder {
pub(crate) queue_url: ::std::option::Option<::std::string::String>,
pub(crate) entries: ::std::option::Option<::std::vec::Vec<crate::types::ChangeMessageVisibilityBatchRequestEntry>>,
}
impl ChangeMessageVisibilityBatchInputBuilder {
/// <p>The URL of the Amazon SQS queue whose messages' visibility is changed.</p>
/// <p>Queue URLs and names are case-sensitive.</p>
pub fn queue_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.queue_url = ::std::option::Option::Some(input.into());
self
}
/// <p>The URL of the Amazon SQS queue whose messages' visibility is changed.</p>
/// <p>Queue URLs and names are case-sensitive.</p>
pub fn set_queue_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.queue_url = input;
self
}
/// <p>The URL of the Amazon SQS queue whose messages' visibility is changed.</p>
/// <p>Queue URLs and names are case-sensitive.</p>
pub fn get_queue_url(&self) -> &::std::option::Option<::std::string::String> {
&self.queue_url
}
/// Appends an item to `entries`.
///
/// To override the contents of this collection use [`set_entries`](Self::set_entries).
///
/// <p>Lists the receipt handles of the messages for which the visibility timeout must be changed.</p>
pub fn entries(mut self, input: crate::types::ChangeMessageVisibilityBatchRequestEntry) -> Self {
let mut v = self.entries.unwrap_or_default();
v.push(input);
self.entries = ::std::option::Option::Some(v);
self
}
/// <p>Lists the receipt handles of the messages for which the visibility timeout must be changed.</p>
pub fn set_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ChangeMessageVisibilityBatchRequestEntry>>) -> Self {
self.entries = input;
self
}
/// <p>Lists the receipt handles of the messages for which the visibility timeout must be changed.</p>
pub fn get_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ChangeMessageVisibilityBatchRequestEntry>> {
&self.entries
}
/// Consumes the builder and constructs a [`ChangeMessageVisibilityBatchInput`](crate::operation::change_message_visibility_batch::ChangeMessageVisibilityBatchInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::change_message_visibility_batch::ChangeMessageVisibilityBatchInput,
::aws_smithy_http::operation::error::BuildError,
> {
::std::result::Result::Ok(crate::operation::change_message_visibility_batch::ChangeMessageVisibilityBatchInput {
queue_url: self.queue_url,
entries: self.entries,
})
}
}