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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The <code>Permission</code> structure.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Permission {
/// <p>The type of value that appears in the Grantee object:</p>
/// <ul>
/// <li>
/// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
/// <p>A canonical user ID is not the same as an AWS account number.</p>
/// </important></li>
/// <li>
/// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
/// <li>
/// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
/// </ul>
pub grantee_type: ::std::option::Option<::std::string::String>,
/// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
pub grantee: ::std::option::Option<::std::string::String>,
/// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
/// <ul>
/// <li>
/// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// </ul>
pub access: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Permission {
/// <p>The type of value that appears in the Grantee object:</p>
/// <ul>
/// <li>
/// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
/// <p>A canonical user ID is not the same as an AWS account number.</p>
/// </important></li>
/// <li>
/// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
/// <li>
/// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
/// </ul>
pub fn grantee_type(&self) -> ::std::option::Option<&str> {
self.grantee_type.as_deref()
}
/// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
pub fn grantee(&self) -> ::std::option::Option<&str> {
self.grantee.as_deref()
}
/// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
/// <ul>
/// <li>
/// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// </ul>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.access.is_none()`.
pub fn access(&self) -> &[::std::string::String] {
self.access.as_deref().unwrap_or_default()
}
}
impl Permission {
/// Creates a new builder-style object to manufacture [`Permission`](crate::types::Permission).
pub fn builder() -> crate::types::builders::PermissionBuilder {
crate::types::builders::PermissionBuilder::default()
}
}
/// A builder for [`Permission`](crate::types::Permission).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PermissionBuilder {
pub(crate) grantee_type: ::std::option::Option<::std::string::String>,
pub(crate) grantee: ::std::option::Option<::std::string::String>,
pub(crate) access: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl PermissionBuilder {
/// <p>The type of value that appears in the Grantee object:</p>
/// <ul>
/// <li>
/// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
/// <p>A canonical user ID is not the same as an AWS account number.</p>
/// </important></li>
/// <li>
/// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
/// <li>
/// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
/// </ul>
pub fn grantee_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.grantee_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of value that appears in the Grantee object:</p>
/// <ul>
/// <li>
/// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
/// <p>A canonical user ID is not the same as an AWS account number.</p>
/// </important></li>
/// <li>
/// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
/// <li>
/// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
/// </ul>
pub fn set_grantee_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.grantee_type = input;
self
}
/// <p>The type of value that appears in the Grantee object:</p>
/// <ul>
/// <li>
/// <p><code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p><important>
/// <p>A canonical user ID is not the same as an AWS account number.</p>
/// </important></li>
/// <li>
/// <p><code>Email</code>: The registered email address of an AWS account.</p></li>
/// <li>
/// <p><code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p></li>
/// </ul>
pub fn get_grantee_type(&self) -> &::std::option::Option<::std::string::String> {
&self.grantee_type
}
/// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
pub fn grantee(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.grantee = ::std::option::Option::Some(input.into());
self
}
/// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
pub fn set_grantee(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.grantee = input;
self
}
/// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
pub fn get_grantee(&self) -> &::std::option::Option<::std::string::String> {
&self.grantee
}
/// Appends an item to `access`.
///
/// To override the contents of this collection use [`set_access`](Self::set_access).
///
/// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
/// <ul>
/// <li>
/// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// </ul>
pub fn access(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.access.unwrap_or_default();
v.push(input.into());
self.access = ::std::option::Option::Some(v);
self
}
/// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
/// <ul>
/// <li>
/// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// </ul>
pub fn set_access(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.access = input;
self
}
/// <p>The permission that you want to give to the AWS user that is listed in Grantee. Valid values include:</p>
/// <ul>
/// <li>
/// <p><code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>READ_ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>WRITE_ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// <li>
/// <p><code>FULL_CONTROL</code>: The grantee has READ, READ_ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p></li>
/// </ul>
pub fn get_access(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.access
}
/// Consumes the builder and constructs a [`Permission`](crate::types::Permission).
pub fn build(self) -> crate::types::Permission {
crate::types::Permission {
grantee_type: self.grantee_type,
grantee: self.grantee,
access: self.access,
}
}
}