aws-sdk-sqs 1.105.0

AWS SDK for Amazon Simple Queue Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Retrieves the URL of an existing queue based on its name and, optionally, the Amazon Web Services account ID.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetQueueUrlInput {
    /// <p>(Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.</p>
    pub queue_name: ::std::option::Option<::std::string::String>,
    /// <p>(Optional) The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.</p>
    pub queue_owner_aws_account_id: ::std::option::Option<::std::string::String>,
}
impl GetQueueUrlInput {
    /// <p>(Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.</p>
    pub fn queue_name(&self) -> ::std::option::Option<&str> {
        self.queue_name.as_deref()
    }
    /// <p>(Optional) The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.</p>
    pub fn queue_owner_aws_account_id(&self) -> ::std::option::Option<&str> {
        self.queue_owner_aws_account_id.as_deref()
    }
}
impl GetQueueUrlInput {
    /// Creates a new builder-style object to manufacture [`GetQueueUrlInput`](crate::operation::get_queue_url::GetQueueUrlInput).
    pub fn builder() -> crate::operation::get_queue_url::builders::GetQueueUrlInputBuilder {
        crate::operation::get_queue_url::builders::GetQueueUrlInputBuilder::default()
    }
}

/// A builder for [`GetQueueUrlInput`](crate::operation::get_queue_url::GetQueueUrlInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetQueueUrlInputBuilder {
    pub(crate) queue_name: ::std::option::Option<::std::string::String>,
    pub(crate) queue_owner_aws_account_id: ::std::option::Option<::std::string::String>,
}
impl GetQueueUrlInputBuilder {
    /// <p>(Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.</p>
    /// This field is required.
    pub fn queue_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.queue_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>(Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.</p>
    pub fn set_queue_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.queue_name = input;
        self
    }
    /// <p>(Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.</p>
    pub fn get_queue_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.queue_name
    }
    /// <p>(Optional) The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.</p>
    pub fn queue_owner_aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.queue_owner_aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>(Optional) The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.</p>
    pub fn set_queue_owner_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.queue_owner_aws_account_id = input;
        self
    }
    /// <p>(Optional) The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.</p>
    pub fn get_queue_owner_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.queue_owner_aws_account_id
    }
    /// Consumes the builder and constructs a [`GetQueueUrlInput`](crate::operation::get_queue_url::GetQueueUrlInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_queue_url::GetQueueUrlInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_queue_url::GetQueueUrlInput {
            queue_name: self.queue_name,
            queue_owner_aws_account_id: self.queue_owner_aws_account_id,
        })
    }
}