aws_sdk_sqs/operation/remove_permission/_remove_permission_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RemovePermissionInput {
7 /// <p>The URL of the Amazon SQS queue from which permissions are removed.</p>
8 /// <p>Queue URLs and names are case-sensitive.</p>
9 pub queue_url: ::std::option::Option<::std::string::String>,
10 /// <p>The identification of the permission to remove. This is the label added using the <code> <code>AddPermission</code> </code> action.</p>
11 pub label: ::std::option::Option<::std::string::String>,
12}
13impl RemovePermissionInput {
14 /// <p>The URL of the Amazon SQS queue from which permissions are removed.</p>
15 /// <p>Queue URLs and names are case-sensitive.</p>
16 pub fn queue_url(&self) -> ::std::option::Option<&str> {
17 self.queue_url.as_deref()
18 }
19 /// <p>The identification of the permission to remove. This is the label added using the <code> <code>AddPermission</code> </code> action.</p>
20 pub fn label(&self) -> ::std::option::Option<&str> {
21 self.label.as_deref()
22 }
23}
24impl RemovePermissionInput {
25 /// Creates a new builder-style object to manufacture [`RemovePermissionInput`](crate::operation::remove_permission::RemovePermissionInput).
26 pub fn builder() -> crate::operation::remove_permission::builders::RemovePermissionInputBuilder {
27 crate::operation::remove_permission::builders::RemovePermissionInputBuilder::default()
28 }
29}
30
31/// A builder for [`RemovePermissionInput`](crate::operation::remove_permission::RemovePermissionInput).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct RemovePermissionInputBuilder {
35 pub(crate) queue_url: ::std::option::Option<::std::string::String>,
36 pub(crate) label: ::std::option::Option<::std::string::String>,
37}
38impl RemovePermissionInputBuilder {
39 /// <p>The URL of the Amazon SQS queue from which permissions are removed.</p>
40 /// <p>Queue URLs and names are case-sensitive.</p>
41 /// This field is required.
42 pub fn queue_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43 self.queue_url = ::std::option::Option::Some(input.into());
44 self
45 }
46 /// <p>The URL of the Amazon SQS queue from which permissions are removed.</p>
47 /// <p>Queue URLs and names are case-sensitive.</p>
48 pub fn set_queue_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
49 self.queue_url = input;
50 self
51 }
52 /// <p>The URL of the Amazon SQS queue from which permissions are removed.</p>
53 /// <p>Queue URLs and names are case-sensitive.</p>
54 pub fn get_queue_url(&self) -> &::std::option::Option<::std::string::String> {
55 &self.queue_url
56 }
57 /// <p>The identification of the permission to remove. This is the label added using the <code> <code>AddPermission</code> </code> action.</p>
58 /// This field is required.
59 pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.label = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <p>The identification of the permission to remove. This is the label added using the <code> <code>AddPermission</code> </code> action.</p>
64 pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.label = input;
66 self
67 }
68 /// <p>The identification of the permission to remove. This is the label added using the <code> <code>AddPermission</code> </code> action.</p>
69 pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
70 &self.label
71 }
72 /// Consumes the builder and constructs a [`RemovePermissionInput`](crate::operation::remove_permission::RemovePermissionInput).
73 pub fn build(
74 self,
75 ) -> ::std::result::Result<crate::operation::remove_permission::RemovePermissionInput, ::aws_smithy_types::error::operation::BuildError> {
76 ::std::result::Result::Ok(crate::operation::remove_permission::RemovePermissionInput {
77 queue_url: self.queue_url,
78 label: self.label,
79 })
80 }
81}