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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// 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 AddPermissionInput {
/// <p>The URL of the Amazon SQS queue to which permissions are added.</p>
/// <p>Queue URLs and names are case-sensitive.</p>
pub queue_url: ::std::option::Option<::std::string::String>,
/// <p>The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores (<code>_</code>).</p>
pub label: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Web Services account numbers of the <a href="https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principals</a> who are to receive permission. For information about locating the Amazon Web Services account identification, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication">Your Amazon Web Services Identifiers</a> in the <i>Amazon SQS Developer Guide</i>.</p>
pub aws_account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The action the client wants to allow for the specified principal. Valid values: the name of any action or <code>*</code>.</p>
/// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html">Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource</a> in the <i>Amazon SQS Developer Guide</i>.</p>
/// <p>Specifying <code>SendMessage</code>, <code>DeleteMessage</code>, or <code>ChangeMessageVisibility</code> for <code>ActionName.n</code> also grants permissions for the corresponding batch versions of those actions: <code>SendMessageBatch</code>, <code>DeleteMessageBatch</code>, and <code>ChangeMessageVisibilityBatch</code>.</p>
pub actions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl AddPermissionInput {
/// <p>The URL of the Amazon SQS queue to which permissions are added.</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 unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores (<code>_</code>).</p>
pub fn label(&self) -> ::std::option::Option<&str> {
self.label.as_deref()
}
/// <p>The Amazon Web Services account numbers of the <a href="https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principals</a> who are to receive permission. For information about locating the Amazon Web Services account identification, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication">Your Amazon Web Services Identifiers</a> in the <i>Amazon SQS Developer Guide</i>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.aws_account_ids.is_none()`.
pub fn aws_account_ids(&self) -> &[::std::string::String] {
self.aws_account_ids.as_deref().unwrap_or_default()
}
/// <p>The action the client wants to allow for the specified principal. Valid values: the name of any action or <code>*</code>.</p>
/// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html">Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource</a> in the <i>Amazon SQS Developer Guide</i>.</p>
/// <p>Specifying <code>SendMessage</code>, <code>DeleteMessage</code>, or <code>ChangeMessageVisibility</code> for <code>ActionName.n</code> also grants permissions for the corresponding batch versions of those actions: <code>SendMessageBatch</code>, <code>DeleteMessageBatch</code>, and <code>ChangeMessageVisibilityBatch</code>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actions.is_none()`.
pub fn actions(&self) -> &[::std::string::String] {
self.actions.as_deref().unwrap_or_default()
}
}
impl AddPermissionInput {
/// Creates a new builder-style object to manufacture [`AddPermissionInput`](crate::operation::add_permission::AddPermissionInput).
pub fn builder() -> crate::operation::add_permission::builders::AddPermissionInputBuilder {
crate::operation::add_permission::builders::AddPermissionInputBuilder::default()
}
}
/// A builder for [`AddPermissionInput`](crate::operation::add_permission::AddPermissionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddPermissionInputBuilder {
pub(crate) queue_url: ::std::option::Option<::std::string::String>,
pub(crate) label: ::std::option::Option<::std::string::String>,
pub(crate) aws_account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) actions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl AddPermissionInputBuilder {
/// <p>The URL of the Amazon SQS queue to which permissions are added.</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 to which permissions are added.</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 to which permissions are added.</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 unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores (<code>_</code>).</p>
/// This field is required.
pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.label = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores (<code>_</code>).</p>
pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.label = input;
self
}
/// <p>The unique identification of the permission you're setting (for example, <code>AliceSendMessage</code>). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (<code>-</code>), and underscores (<code>_</code>).</p>
pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
&self.label
}
/// Appends an item to `aws_account_ids`.
///
/// To override the contents of this collection use [`set_aws_account_ids`](Self::set_aws_account_ids).
///
/// <p>The Amazon Web Services account numbers of the <a href="https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principals</a> who are to receive permission. For information about locating the Amazon Web Services account identification, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication">Your Amazon Web Services Identifiers</a> in the <i>Amazon SQS Developer Guide</i>.</p>
pub fn aws_account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.aws_account_ids.unwrap_or_default();
v.push(input.into());
self.aws_account_ids = ::std::option::Option::Some(v);
self
}
/// <p>The Amazon Web Services account numbers of the <a href="https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principals</a> who are to receive permission. For information about locating the Amazon Web Services account identification, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication">Your Amazon Web Services Identifiers</a> in the <i>Amazon SQS Developer Guide</i>.</p>
pub fn set_aws_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.aws_account_ids = input;
self
}
/// <p>The Amazon Web Services account numbers of the <a href="https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P">principals</a> who are to receive permission. For information about locating the Amazon Web Services account identification, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication">Your Amazon Web Services Identifiers</a> in the <i>Amazon SQS Developer Guide</i>.</p>
pub fn get_aws_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.aws_account_ids
}
/// Appends an item to `actions`.
///
/// To override the contents of this collection use [`set_actions`](Self::set_actions).
///
/// <p>The action the client wants to allow for the specified principal. Valid values: the name of any action or <code>*</code>.</p>
/// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html">Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource</a> in the <i>Amazon SQS Developer Guide</i>.</p>
/// <p>Specifying <code>SendMessage</code>, <code>DeleteMessage</code>, or <code>ChangeMessageVisibility</code> for <code>ActionName.n</code> also grants permissions for the corresponding batch versions of those actions: <code>SendMessageBatch</code>, <code>DeleteMessageBatch</code>, and <code>ChangeMessageVisibilityBatch</code>.</p>
pub fn actions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.actions.unwrap_or_default();
v.push(input.into());
self.actions = ::std::option::Option::Some(v);
self
}
/// <p>The action the client wants to allow for the specified principal. Valid values: the name of any action or <code>*</code>.</p>
/// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html">Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource</a> in the <i>Amazon SQS Developer Guide</i>.</p>
/// <p>Specifying <code>SendMessage</code>, <code>DeleteMessage</code>, or <code>ChangeMessageVisibility</code> for <code>ActionName.n</code> also grants permissions for the corresponding batch versions of those actions: <code>SendMessageBatch</code>, <code>DeleteMessageBatch</code>, and <code>ChangeMessageVisibilityBatch</code>.</p>
pub fn set_actions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.actions = input;
self
}
/// <p>The action the client wants to allow for the specified principal. Valid values: the name of any action or <code>*</code>.</p>
/// <p>For more information about these actions, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html">Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource</a> in the <i>Amazon SQS Developer Guide</i>.</p>
/// <p>Specifying <code>SendMessage</code>, <code>DeleteMessage</code>, or <code>ChangeMessageVisibility</code> for <code>ActionName.n</code> also grants permissions for the corresponding batch versions of those actions: <code>SendMessageBatch</code>, <code>DeleteMessageBatch</code>, and <code>ChangeMessageVisibilityBatch</code>.</p>
pub fn get_actions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.actions
}
/// Consumes the builder and constructs a [`AddPermissionInput`](crate::operation::add_permission::AddPermissionInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::add_permission::AddPermissionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::add_permission::AddPermissionInput {
queue_url: self.queue_url,
label: self.label,
aws_account_ids: self.aws_account_ids,
actions: self.actions,
})
}
}