91 91 | "com.amazonaws.s3control.synthetic",
|
92 92 | "ListAccessGrantsInput",
|
93 93 | );
|
94 94 | static LISTACCESSGRANTSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
95 95 | ::aws_smithy_schema::ShapeId::from_static(
|
96 96 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$AccountId",
|
97 97 | "com.amazonaws.s3control.synthetic",
|
98 98 | "ListAccessGrantsInput",
|
99 99 | ),
|
100 100 | ::aws_smithy_schema::ShapeType::String,
|
101 - | "account_id",
|
101 + | "AccountId",
|
102 102 | 0,
|
103 103 | )
|
104 104 | .with_host_label()
|
105 105 | .with_http_header("x-amz-account-id");
|
106 106 | static LISTACCESSGRANTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
107 107 | ::aws_smithy_schema::ShapeId::from_static(
|
108 108 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$NextToken",
|
109 109 | "com.amazonaws.s3control.synthetic",
|
110 110 | "ListAccessGrantsInput",
|
111 111 | ),
|
112 112 | ::aws_smithy_schema::ShapeType::String,
|
113 - | "next_token",
|
113 + | "NextToken",
|
114 114 | 1,
|
115 115 | )
|
116 116 | .with_http_query("nextToken");
|
117 117 | static LISTACCESSGRANTSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
118 118 | ::aws_smithy_schema::ShapeId::from_static(
|
119 119 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$MaxResults",
|
120 120 | "com.amazonaws.s3control.synthetic",
|
121 121 | "ListAccessGrantsInput",
|
122 122 | ),
|
123 123 | ::aws_smithy_schema::ShapeType::Integer,
|
124 - | "max_results",
|
124 + | "MaxResults",
|
125 125 | 2,
|
126 126 | )
|
127 127 | .with_http_query("maxResults");
|
128 128 | static LISTACCESSGRANTSINPUT_MEMBER_GRANTEE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
129 129 | ::aws_smithy_schema::ShapeId::from_static(
|
130 130 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$GranteeType",
|
131 131 | "com.amazonaws.s3control.synthetic",
|
132 132 | "ListAccessGrantsInput",
|
133 133 | ),
|
134 134 | ::aws_smithy_schema::ShapeType::String,
|
135 - | "grantee_type",
|
135 + | "GranteeType",
|
136 136 | 3,
|
137 137 | )
|
138 138 | .with_http_query("granteetype");
|
139 139 | static LISTACCESSGRANTSINPUT_MEMBER_GRANTEE_IDENTIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
140 140 | ::aws_smithy_schema::ShapeId::from_static(
|
141 141 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$GranteeIdentifier",
|
142 142 | "com.amazonaws.s3control.synthetic",
|
143 143 | "ListAccessGrantsInput",
|
144 144 | ),
|
145 145 | ::aws_smithy_schema::ShapeType::String,
|
146 - | "grantee_identifier",
|
146 + | "GranteeIdentifier",
|
147 147 | 4,
|
148 148 | )
|
149 149 | .with_http_query("granteeidentifier");
|
150 150 | static LISTACCESSGRANTSINPUT_MEMBER_PERMISSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
151 151 | ::aws_smithy_schema::ShapeId::from_static(
|
152 152 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$Permission",
|
153 153 | "com.amazonaws.s3control.synthetic",
|
154 154 | "ListAccessGrantsInput",
|
155 155 | ),
|
156 156 | ::aws_smithy_schema::ShapeType::String,
|
157 - | "permission",
|
157 + | "Permission",
|
158 158 | 5,
|
159 159 | )
|
160 160 | .with_http_query("permission");
|
161 161 | static LISTACCESSGRANTSINPUT_MEMBER_GRANT_SCOPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
162 162 | ::aws_smithy_schema::ShapeId::from_static(
|
163 163 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$GrantScope",
|
164 164 | "com.amazonaws.s3control.synthetic",
|
165 165 | "ListAccessGrantsInput",
|
166 166 | ),
|
167 167 | ::aws_smithy_schema::ShapeType::String,
|
168 - | "grant_scope",
|
168 + | "GrantScope",
|
169 169 | 6,
|
170 170 | )
|
171 171 | .with_http_query("grantscope");
|
172 172 | static LISTACCESSGRANTSINPUT_MEMBER_APPLICATION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
173 173 | ::aws_smithy_schema::ShapeId::from_static(
|
174 174 | "com.amazonaws.s3control.synthetic#ListAccessGrantsInput$ApplicationArn",
|
175 175 | "com.amazonaws.s3control.synthetic",
|
176 176 | "ListAccessGrantsInput",
|
177 177 | ),
|
178 178 | ::aws_smithy_schema::ShapeType::String,
|
179 - | "application_arn",
|
179 + | "ApplicationArn",
|
180 180 | 7,
|
181 181 | )
|
182 182 | .with_http_query("application_arn");
|
183 183 | static LISTACCESSGRANTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
184 184 | LISTACCESSGRANTSINPUT_SCHEMA_ID,
|
185 185 | ::aws_smithy_schema::ShapeType::Structure,
|
186 186 | &[
|
187 187 | &LISTACCESSGRANTSINPUT_MEMBER_ACCOUNT_ID,
|
188 188 | &LISTACCESSGRANTSINPUT_MEMBER_NEXT_TOKEN,
|
189 189 | &LISTACCESSGRANTSINPUT_MEMBER_MAX_RESULTS,
|
190 190 | &LISTACCESSGRANTSINPUT_MEMBER_GRANTEE_TYPE,
|
191 191 | &LISTACCESSGRANTSINPUT_MEMBER_GRANTEE_IDENTIFIER,
|
192 192 | &LISTACCESSGRANTSINPUT_MEMBER_PERMISSION,
|
193 193 | &LISTACCESSGRANTSINPUT_MEMBER_GRANT_SCOPE,
|
194 194 | &LISTACCESSGRANTSINPUT_MEMBER_APPLICATION_ARN,
|
195 195 | ],
|
196 - | );
|
196 + | )
|
197 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
198 + | "GET",
|
199 + | "/v20180820/accessgrantsinstance/grants",
|
200 + | None,
|
201 + | ));
|
197 202 | impl ListAccessGrantsInput {
|
198 203 | /// The schema for this shape.
|
199 204 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTACCESSGRANTSINPUT_SCHEMA;
|
200 205 | }
|
201 206 | impl ::aws_smithy_schema::serde::SerializableStruct for ListAccessGrantsInput {
|
202 207 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
203 208 | fn serialize_members(
|
204 209 | &self,
|
205 210 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
206 211 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
207 212 | if let Some(ref val) = self.account_id {
|
208 213 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_ACCOUNT_ID, val)?;
|
209 214 | }
|
210 215 | if let Some(ref val) = self.next_token {
|
211 216 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_NEXT_TOKEN, val)?;
|
212 217 | }
|
213 218 | if let Some(ref val) = self.max_results {
|
214 219 | ser.write_integer(&LISTACCESSGRANTSINPUT_MEMBER_MAX_RESULTS, *val)?;
|
215 220 | }
|
216 221 | if let Some(ref val) = self.grantee_type {
|
217 222 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_GRANTEE_TYPE, val.as_str())?;
|
218 223 | }
|
219 224 | if let Some(ref val) = self.grantee_identifier {
|
220 225 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_GRANTEE_IDENTIFIER, val)?;
|
221 226 | }
|
222 227 | if let Some(ref val) = self.permission {
|
223 228 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_PERMISSION, val.as_str())?;
|
224 229 | }
|
225 230 | if let Some(ref val) = self.grant_scope {
|
226 231 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_GRANT_SCOPE, val)?;
|
227 232 | }
|
228 233 | if let Some(ref val) = self.application_arn {
|
229 234 | ser.write_string(&LISTACCESSGRANTSINPUT_MEMBER_APPLICATION_ARN, val)?;
|
230 235 | }
|
231 236 | Ok(())
|
232 237 | }
|
233 238 | }
|
234 239 | impl ListAccessGrantsInput {
|
235 240 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
236 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
237 - | deserializer: &mut D,
|
241 + | pub fn deserialize(
|
242 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
238 243 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
239 244 | #[allow(unused_variables, unused_mut)]
|
240 245 | let mut builder = Self::builder();
|
241 246 | #[allow(
|
242 247 | unused_variables,
|
243 248 | unreachable_code,
|
244 249 | clippy::single_match,
|
245 250 | clippy::match_single_binding,
|
246 251 | clippy::diverging_sub_expression
|
247 252 | )]
|
248 - | deserializer.read_struct(&LISTACCESSGRANTSINPUT_SCHEMA, (), |_, member, deser| {
|
253 + | deserializer.read_struct(&LISTACCESSGRANTSINPUT_SCHEMA, &mut |member, deser| {
|
249 254 | match member.member_index() {
|
250 255 | Some(0) => {
|
251 256 | builder.account_id = Some(deser.read_string(member)?);
|
252 257 | }
|
253 258 | Some(1) => {
|
254 259 | builder.next_token = Some(deser.read_string(member)?);
|
255 260 | }
|
256 261 | Some(2) => {
|
257 262 | builder.max_results = Some(deser.read_integer(member)?);
|
258 263 | }
|
259 264 | Some(3) => {
|
260 265 | builder.grantee_type = Some(crate::types::GranteeType::from(deser.read_string(member)?.as_str()));
|
261 266 | }
|
262 267 | Some(4) => {
|
263 268 | builder.grantee_identifier = Some(deser.read_string(member)?);
|
264 269 | }
|
265 270 | Some(5) => {
|
266 271 | builder.permission = Some(crate::types::Permission::from(deser.read_string(member)?.as_str()));
|
267 272 | }
|
268 273 | Some(6) => {
|
269 274 | builder.grant_scope = Some(deser.read_string(member)?);
|
270 275 | }
|
271 276 | Some(7) => {
|
272 277 | builder.application_arn = Some(deser.read_string(member)?);
|
273 278 | }
|
274 279 | _ => {}
|
275 280 | }
|
276 281 | Ok(())
|
277 282 | })?;
|
283 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
284 + | builder
|
285 + | .build()
|
286 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
287 + | }
|
288 + | }
|
289 + | impl ListAccessGrantsInput {
|
290 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
291 + | /// Header-bound members are read directly from headers, avoiding runtime
|
292 + | /// member iteration overhead. Body members are read via the deserializer.
|
293 + | pub fn deserialize_with_response(
|
294 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
295 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
296 + | _status: u16,
|
297 + | _body: &[u8],
|
298 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
299 + | #[allow(unused_variables, unused_mut)]
|
300 + | let mut builder = Self::builder();
|
301 + | if let Some(val) = headers.get("x-amz-account-id") {
|
302 + | builder.account_id = Some(val.to_string());
|
303 + | }
|
304 + | #[allow(
|
305 + | unused_variables,
|
306 + | unreachable_code,
|
307 + | clippy::single_match,
|
308 + | clippy::match_single_binding,
|
309 + | clippy::diverging_sub_expression
|
310 + | )]
|
311 + | deserializer.read_struct(&LISTACCESSGRANTSINPUT_SCHEMA, &mut |member, deser| {
|
312 + | match member.member_index() {
|
313 + | Some(0) => { /* read from headers above */ }
|
314 + | Some(1) => {
|
315 + | builder.next_token = Some(deser.read_string(member)?);
|
316 + | }
|
317 + | Some(2) => {
|
318 + | builder.max_results = Some(deser.read_integer(member)?);
|
319 + | }
|
320 + | Some(3) => {
|
321 + | builder.grantee_type = Some(crate::types::GranteeType::from(deser.read_string(member)?.as_str()));
|
322 + | }
|
323 + | Some(4) => {
|
324 + | builder.grantee_identifier = Some(deser.read_string(member)?);
|
325 + | }
|
326 + | Some(5) => {
|
327 + | builder.permission = Some(crate::types::Permission::from(deser.read_string(member)?.as_str()));
|
328 + | }
|
329 + | Some(6) => {
|
330 + | builder.grant_scope = Some(deser.read_string(member)?);
|
331 + | }
|
332 + | Some(7) => {
|
333 + | builder.application_arn = Some(deser.read_string(member)?);
|
334 + | }
|
335 + | _ => {}
|
336 + | }
|
337 + | Ok(())
|
338 + | })?;
|
278 339 | builder
|
279 340 | .build()
|
280 341 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
281 342 | }
|
282 343 | }
|
283 344 | impl ListAccessGrantsInput {
|
284 345 | /// Creates a new builder-style object to manufacture [`ListAccessGrantsInput`](crate::operation::list_access_grants::ListAccessGrantsInput).
|
285 346 | pub fn builder() -> crate::operation::list_access_grants::builders::ListAccessGrantsInputBuilder {
|
286 347 | crate::operation::list_access_grants::builders::ListAccessGrantsInputBuilder::default()
|
287 348 | }
|