aws-sdk-sqs 1.99.0

AWS SDK for Amazon Simple Queue Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChangeMessageVisibilityInput {
    /// <p>The URL of the Amazon SQS queue whose message's visibility is changed.</p>
    /// <p>Queue URLs and names are case-sensitive.</p>
    pub queue_url: ::std::option::Option<::std::string::String>,
    /// <p>The receipt handle associated with the message, whose visibility timeout is changed. This parameter is returned by the <code> <code>ReceiveMessage</code> </code> action.</p>
    pub receipt_handle: ::std::option::Option<::std::string::String>,
    /// <p>The new value for the message's visibility timeout (in seconds). Values range: <code>0</code> to <code>43200</code>. Maximum: 12 hours.</p>
    pub visibility_timeout: ::std::option::Option<i32>,
}
impl ChangeMessageVisibilityInput {
    /// <p>The URL of the Amazon SQS queue whose message's 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>The receipt handle associated with the message, whose visibility timeout is changed. This parameter is returned by the <code> <code>ReceiveMessage</code> </code> action.</p>
    pub fn receipt_handle(&self) -> ::std::option::Option<&str> {
        self.receipt_handle.as_deref()
    }
    /// <p>The new value for the message's visibility timeout (in seconds). Values range: <code>0</code> to <code>43200</code>. Maximum: 12 hours.</p>
    pub fn visibility_timeout(&self) -> ::std::option::Option<i32> {
        self.visibility_timeout
    }
}
impl ChangeMessageVisibilityInput {
    /// Creates a new builder-style object to manufacture [`ChangeMessageVisibilityInput`](crate::operation::change_message_visibility::ChangeMessageVisibilityInput).
    pub fn builder() -> crate::operation::change_message_visibility::builders::ChangeMessageVisibilityInputBuilder {
        crate::operation::change_message_visibility::builders::ChangeMessageVisibilityInputBuilder::default()
    }
}

/// A builder for [`ChangeMessageVisibilityInput`](crate::operation::change_message_visibility::ChangeMessageVisibilityInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ChangeMessageVisibilityInputBuilder {
    pub(crate) queue_url: ::std::option::Option<::std::string::String>,
    pub(crate) receipt_handle: ::std::option::Option<::std::string::String>,
    pub(crate) visibility_timeout: ::std::option::Option<i32>,
}
impl ChangeMessageVisibilityInputBuilder {
    /// <p>The URL of the Amazon SQS queue whose message's visibility is changed.</p>
    /// <p>Queue URLs and names are case-sensitive.</p>
    /// This field is required.
    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 message's 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 message's 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
    }
    /// <p>The receipt handle associated with the message, whose visibility timeout is changed. This parameter is returned by the <code> <code>ReceiveMessage</code> </code> action.</p>
    /// This field is required.
    pub fn receipt_handle(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.receipt_handle = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The receipt handle associated with the message, whose visibility timeout is changed. This parameter is returned by the <code> <code>ReceiveMessage</code> </code> action.</p>
    pub fn set_receipt_handle(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.receipt_handle = input;
        self
    }
    /// <p>The receipt handle associated with the message, whose visibility timeout is changed. This parameter is returned by the <code> <code>ReceiveMessage</code> </code> action.</p>
    pub fn get_receipt_handle(&self) -> &::std::option::Option<::std::string::String> {
        &self.receipt_handle
    }
    /// <p>The new value for the message's visibility timeout (in seconds). Values range: <code>0</code> to <code>43200</code>. Maximum: 12 hours.</p>
    /// This field is required.
    pub fn visibility_timeout(mut self, input: i32) -> Self {
        self.visibility_timeout = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new value for the message's visibility timeout (in seconds). Values range: <code>0</code> to <code>43200</code>. Maximum: 12 hours.</p>
    pub fn set_visibility_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
        self.visibility_timeout = input;
        self
    }
    /// <p>The new value for the message's visibility timeout (in seconds). Values range: <code>0</code> to <code>43200</code>. Maximum: 12 hours.</p>
    pub fn get_visibility_timeout(&self) -> &::std::option::Option<i32> {
        &self.visibility_timeout
    }
    /// Consumes the builder and constructs a [`ChangeMessageVisibilityInput`](crate::operation::change_message_visibility::ChangeMessageVisibilityInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::change_message_visibility::ChangeMessageVisibilityInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::change_message_visibility::ChangeMessageVisibilityInput {
            queue_url: self.queue_url,
            receipt_handle: self.receipt_handle,
            visibility_timeout: self.visibility_timeout,
        })
    }
}