3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct DeleteAccessGrantsLocationInput {
|
6 6 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
7 7 | pub account_id: ::std::option::Option<::std::string::String>,
|
8 8 | /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
|
9 9 | pub access_grants_location_id: ::std::option::Option<::std::string::String>,
|
10 10 | }
|
11 11 | impl DeleteAccessGrantsLocationInput {
|
12 12 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
13 13 | pub fn account_id(&self) -> ::std::option::Option<&str> {
|
14 14 | self.account_id.as_deref()
|
15 15 | }
|
16 16 | /// <p>The ID of the registered location that you are deregistering from your S3 Access Grants instance. S3 Access Grants assigned this ID when you registered the location. S3 Access Grants assigns the ID <code>default</code> to the default location <code>s3://</code> and assigns an auto-generated ID to other locations that you register.</p>
|
17 17 | pub fn access_grants_location_id(&self) -> ::std::option::Option<&str> {
|
18 18 | self.access_grants_location_id.as_deref()
|
19 19 | }
|
20 20 | }
|
21 21 | static DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "com.amazonaws.s3control.synthetic#DeleteAccessGrantsLocationInput",
|
23 23 | "com.amazonaws.s3control.synthetic",
|
24 24 | "DeleteAccessGrantsLocationInput",
|
25 25 | );
|
26 26 | static DELETEACCESSGRANTSLOCATIONINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.s3control.synthetic#DeleteAccessGrantsLocationInput$AccountId",
|
29 29 | "com.amazonaws.s3control.synthetic",
|
30 30 | "DeleteAccessGrantsLocationInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::String,
|
33 - | "account_id",
|
33 + | "AccountId",
|
34 34 | 0,
|
35 35 | )
|
36 36 | .with_host_label()
|
37 37 | .with_http_header("x-amz-account-id");
|
38 38 | static DELETEACCESSGRANTSLOCATIONINPUT_MEMBER_ACCESS_GRANTS_LOCATION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
39 39 | ::aws_smithy_schema::ShapeId::from_static(
|
40 40 | "com.amazonaws.s3control.synthetic#DeleteAccessGrantsLocationInput$AccessGrantsLocationId",
|
41 41 | "com.amazonaws.s3control.synthetic",
|
42 42 | "DeleteAccessGrantsLocationInput",
|
43 43 | ),
|
44 44 | ::aws_smithy_schema::ShapeType::String,
|
45 - | "access_grants_location_id",
|
45 + | "AccessGrantsLocationId",
|
46 46 | 1,
|
47 47 | )
|
48 48 | .with_http_label();
|
49 49 | static DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
50 50 | DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA_ID,
|
51 51 | ::aws_smithy_schema::ShapeType::Structure,
|
52 52 | &[
|
53 53 | &DELETEACCESSGRANTSLOCATIONINPUT_MEMBER_ACCOUNT_ID,
|
54 54 | &DELETEACCESSGRANTSLOCATIONINPUT_MEMBER_ACCESS_GRANTS_LOCATION_ID,
|
55 55 | ],
|
56 - | );
|
56 + | )
|
57 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
58 + | "DELETE",
|
59 + | "/v20180820/accessgrantsinstance/location/{AccessGrantsLocationId}",
|
60 + | None,
|
61 + | ));
|
57 62 | impl DeleteAccessGrantsLocationInput {
|
58 63 | /// The schema for this shape.
|
59 64 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA;
|
60 65 | }
|
61 66 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteAccessGrantsLocationInput {
|
62 67 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
63 68 | fn serialize_members(
|
64 69 | &self,
|
65 70 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
66 71 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
67 72 | if let Some(ref val) = self.account_id {
|
68 73 | ser.write_string(&DELETEACCESSGRANTSLOCATIONINPUT_MEMBER_ACCOUNT_ID, val)?;
|
69 74 | }
|
70 75 | if let Some(ref val) = self.access_grants_location_id {
|
71 76 | ser.write_string(&DELETEACCESSGRANTSLOCATIONINPUT_MEMBER_ACCESS_GRANTS_LOCATION_ID, val)?;
|
72 77 | }
|
73 78 | Ok(())
|
74 79 | }
|
75 80 | }
|
76 81 | impl DeleteAccessGrantsLocationInput {
|
77 82 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
78 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
79 - | deserializer: &mut D,
|
83 + | pub fn deserialize(
|
84 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
80 85 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
81 86 | #[allow(unused_variables, unused_mut)]
|
82 87 | let mut builder = Self::builder();
|
83 88 | #[allow(
|
84 89 | unused_variables,
|
85 90 | unreachable_code,
|
86 91 | clippy::single_match,
|
87 92 | clippy::match_single_binding,
|
88 93 | clippy::diverging_sub_expression
|
89 94 | )]
|
90 - | deserializer.read_struct(&DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA, (), |_, member, deser| {
|
95 + | deserializer.read_struct(&DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA, &mut |member, deser| {
|
91 96 | match member.member_index() {
|
92 97 | Some(0) => {
|
93 98 | builder.account_id = Some(deser.read_string(member)?);
|
94 99 | }
|
95 100 | Some(1) => {
|
96 101 | builder.access_grants_location_id = Some(deser.read_string(member)?);
|
97 102 | }
|
98 103 | _ => {}
|
99 104 | }
|
100 105 | Ok(())
|
101 106 | })?;
|
107 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
108 + | builder.access_grants_location_id = builder.access_grants_location_id.or(Some(String::new()));
|
109 + | builder
|
110 + | .build()
|
111 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
112 + | }
|
113 + | }
|
114 + | impl DeleteAccessGrantsLocationInput {
|
115 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
116 + | /// Header-bound members are read directly from headers, avoiding runtime
|
117 + | /// member iteration overhead. Body members are read via the deserializer.
|
118 + | pub fn deserialize_with_response(
|
119 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
120 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
121 + | _status: u16,
|
122 + | _body: &[u8],
|
123 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
124 + | #[allow(unused_variables, unused_mut)]
|
125 + | let mut builder = Self::builder();
|
126 + | if let Some(val) = headers.get("x-amz-account-id") {
|
127 + | builder.account_id = Some(val.to_string());
|
128 + | }
|
129 + | #[allow(
|
130 + | unused_variables,
|
131 + | unreachable_code,
|
132 + | clippy::single_match,
|
133 + | clippy::match_single_binding,
|
134 + | clippy::diverging_sub_expression
|
135 + | )]
|
136 + | deserializer.read_struct(&DELETEACCESSGRANTSLOCATIONINPUT_SCHEMA, &mut |member, deser| {
|
137 + | match member.member_index() {
|
138 + | Some(0) => { /* read from headers above */ }
|
139 + | Some(1) => {
|
140 + | builder.access_grants_location_id = Some(deser.read_string(member)?);
|
141 + | }
|
142 + | _ => {}
|
143 + | }
|
144 + | Ok(())
|
145 + | })?;
|
102 146 | builder
|
103 147 | .build()
|
104 148 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
105 149 | }
|
106 150 | }
|
107 151 | impl DeleteAccessGrantsLocationInput {
|
108 152 | /// Creates a new builder-style object to manufacture [`DeleteAccessGrantsLocationInput`](crate::operation::delete_access_grants_location::DeleteAccessGrantsLocationInput).
|
109 153 | pub fn builder() -> crate::operation::delete_access_grants_location::builders::DeleteAccessGrantsLocationInputBuilder {
|
110 154 | crate::operation::delete_access_grants_location::builders::DeleteAccessGrantsLocationInputBuilder::default()
|
111 155 | }
|