41 41 | "com.amazonaws.s3control.synthetic",
|
42 42 | "ListCallerAccessGrantsInput",
|
43 43 | );
|
44 44 | static LISTCALLERACCESSGRANTSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
45 45 | ::aws_smithy_schema::ShapeId::from_static(
|
46 46 | "com.amazonaws.s3control.synthetic#ListCallerAccessGrantsInput$AccountId",
|
47 47 | "com.amazonaws.s3control.synthetic",
|
48 48 | "ListCallerAccessGrantsInput",
|
49 49 | ),
|
50 50 | ::aws_smithy_schema::ShapeType::String,
|
51 - | "account_id",
|
51 + | "AccountId",
|
52 52 | 0,
|
53 53 | )
|
54 54 | .with_host_label()
|
55 55 | .with_http_header("x-amz-account-id");
|
56 56 | static LISTCALLERACCESSGRANTSINPUT_MEMBER_GRANT_SCOPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
57 57 | ::aws_smithy_schema::ShapeId::from_static(
|
58 58 | "com.amazonaws.s3control.synthetic#ListCallerAccessGrantsInput$GrantScope",
|
59 59 | "com.amazonaws.s3control.synthetic",
|
60 60 | "ListCallerAccessGrantsInput",
|
61 61 | ),
|
62 62 | ::aws_smithy_schema::ShapeType::String,
|
63 - | "grant_scope",
|
63 + | "GrantScope",
|
64 64 | 1,
|
65 65 | )
|
66 66 | .with_http_query("grantscope");
|
67 67 | static LISTCALLERACCESSGRANTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
68 68 | ::aws_smithy_schema::ShapeId::from_static(
|
69 69 | "com.amazonaws.s3control.synthetic#ListCallerAccessGrantsInput$NextToken",
|
70 70 | "com.amazonaws.s3control.synthetic",
|
71 71 | "ListCallerAccessGrantsInput",
|
72 72 | ),
|
73 73 | ::aws_smithy_schema::ShapeType::String,
|
74 - | "next_token",
|
74 + | "NextToken",
|
75 75 | 2,
|
76 76 | )
|
77 77 | .with_http_query("nextToken");
|
78 78 | static LISTCALLERACCESSGRANTSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
79 79 | ::aws_smithy_schema::ShapeId::from_static(
|
80 80 | "com.amazonaws.s3control.synthetic#ListCallerAccessGrantsInput$MaxResults",
|
81 81 | "com.amazonaws.s3control.synthetic",
|
82 82 | "ListCallerAccessGrantsInput",
|
83 83 | ),
|
84 84 | ::aws_smithy_schema::ShapeType::Integer,
|
85 - | "max_results",
|
85 + | "MaxResults",
|
86 86 | 3,
|
87 87 | )
|
88 88 | .with_http_query("maxResults");
|
89 89 | static LISTCALLERACCESSGRANTSINPUT_MEMBER_ALLOWED_BY_APPLICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
90 90 | ::aws_smithy_schema::ShapeId::from_static(
|
91 91 | "com.amazonaws.s3control.synthetic#ListCallerAccessGrantsInput$AllowedByApplication",
|
92 92 | "com.amazonaws.s3control.synthetic",
|
93 93 | "ListCallerAccessGrantsInput",
|
94 94 | ),
|
95 95 | ::aws_smithy_schema::ShapeType::Boolean,
|
96 - | "allowed_by_application",
|
96 + | "AllowedByApplication",
|
97 97 | 4,
|
98 98 | )
|
99 99 | .with_http_query("allowedByApplication");
|
100 100 | static LISTCALLERACCESSGRANTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
101 101 | LISTCALLERACCESSGRANTSINPUT_SCHEMA_ID,
|
102 102 | ::aws_smithy_schema::ShapeType::Structure,
|
103 103 | &[
|
104 104 | &LISTCALLERACCESSGRANTSINPUT_MEMBER_ACCOUNT_ID,
|
105 105 | &LISTCALLERACCESSGRANTSINPUT_MEMBER_GRANT_SCOPE,
|
106 106 | &LISTCALLERACCESSGRANTSINPUT_MEMBER_NEXT_TOKEN,
|
107 107 | &LISTCALLERACCESSGRANTSINPUT_MEMBER_MAX_RESULTS,
|
108 108 | &LISTCALLERACCESSGRANTSINPUT_MEMBER_ALLOWED_BY_APPLICATION,
|
109 109 | ],
|
110 - | );
|
110 + | )
|
111 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
112 + | "GET",
|
113 + | "/v20180820/accessgrantsinstance/caller/grants",
|
114 + | None,
|
115 + | ));
|
111 116 | impl ListCallerAccessGrantsInput {
|
112 117 | /// The schema for this shape.
|
113 118 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTCALLERACCESSGRANTSINPUT_SCHEMA;
|
114 119 | }
|
115 120 | impl ::aws_smithy_schema::serde::SerializableStruct for ListCallerAccessGrantsInput {
|
116 121 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
117 122 | fn serialize_members(
|
118 123 | &self,
|
119 124 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
120 125 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
121 126 | if let Some(ref val) = self.account_id {
|
122 127 | ser.write_string(&LISTCALLERACCESSGRANTSINPUT_MEMBER_ACCOUNT_ID, val)?;
|
123 128 | }
|
124 129 | if let Some(ref val) = self.grant_scope {
|
125 130 | ser.write_string(&LISTCALLERACCESSGRANTSINPUT_MEMBER_GRANT_SCOPE, val)?;
|
126 131 | }
|
127 132 | if let Some(ref val) = self.next_token {
|
128 133 | ser.write_string(&LISTCALLERACCESSGRANTSINPUT_MEMBER_NEXT_TOKEN, val)?;
|
129 134 | }
|
130 135 | if let Some(ref val) = self.max_results {
|
131 136 | ser.write_integer(&LISTCALLERACCESSGRANTSINPUT_MEMBER_MAX_RESULTS, *val)?;
|
132 137 | }
|
133 138 | if let Some(ref val) = self.allowed_by_application {
|
134 139 | ser.write_boolean(&LISTCALLERACCESSGRANTSINPUT_MEMBER_ALLOWED_BY_APPLICATION, *val)?;
|
135 140 | }
|
136 141 | Ok(())
|
137 142 | }
|
138 143 | }
|
139 144 | impl ListCallerAccessGrantsInput {
|
140 145 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
141 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
142 - | deserializer: &mut D,
|
146 + | pub fn deserialize(
|
147 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
143 148 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
144 149 | #[allow(unused_variables, unused_mut)]
|
145 150 | let mut builder = Self::builder();
|
146 151 | #[allow(
|
147 152 | unused_variables,
|
148 153 | unreachable_code,
|
149 154 | clippy::single_match,
|
150 155 | clippy::match_single_binding,
|
151 156 | clippy::diverging_sub_expression
|
152 157 | )]
|
153 - | deserializer.read_struct(&LISTCALLERACCESSGRANTSINPUT_SCHEMA, (), |_, member, deser| {
|
158 + | deserializer.read_struct(&LISTCALLERACCESSGRANTSINPUT_SCHEMA, &mut |member, deser| {
|
154 159 | match member.member_index() {
|
155 160 | Some(0) => {
|
156 161 | builder.account_id = Some(deser.read_string(member)?);
|
157 162 | }
|
158 163 | Some(1) => {
|
159 164 | builder.grant_scope = Some(deser.read_string(member)?);
|
160 165 | }
|
161 166 | Some(2) => {
|
162 167 | builder.next_token = Some(deser.read_string(member)?);
|
163 168 | }
|
164 169 | Some(3) => {
|
165 170 | builder.max_results = Some(deser.read_integer(member)?);
|
166 171 | }
|
167 172 | Some(4) => {
|
168 173 | builder.allowed_by_application = Some(deser.read_boolean(member)?);
|
169 174 | }
|
170 175 | _ => {}
|
171 176 | }
|
172 177 | Ok(())
|
173 178 | })?;
|
179 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
180 + | builder
|
181 + | .build()
|
182 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
183 + | }
|
184 + | }
|
185 + | impl ListCallerAccessGrantsInput {
|
186 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
187 + | /// Header-bound members are read directly from headers, avoiding runtime
|
188 + | /// member iteration overhead. Body members are read via the deserializer.
|
189 + | pub fn deserialize_with_response(
|
190 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
191 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
192 + | _status: u16,
|
193 + | _body: &[u8],
|
194 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
195 + | #[allow(unused_variables, unused_mut)]
|
196 + | let mut builder = Self::builder();
|
197 + | if let Some(val) = headers.get("x-amz-account-id") {
|
198 + | builder.account_id = Some(val.to_string());
|
199 + | }
|
200 + | #[allow(
|
201 + | unused_variables,
|
202 + | unreachable_code,
|
203 + | clippy::single_match,
|
204 + | clippy::match_single_binding,
|
205 + | clippy::diverging_sub_expression
|
206 + | )]
|
207 + | deserializer.read_struct(&LISTCALLERACCESSGRANTSINPUT_SCHEMA, &mut |member, deser| {
|
208 + | match member.member_index() {
|
209 + | Some(0) => { /* read from headers above */ }
|
210 + | Some(1) => {
|
211 + | builder.grant_scope = Some(deser.read_string(member)?);
|
212 + | }
|
213 + | Some(2) => {
|
214 + | builder.next_token = Some(deser.read_string(member)?);
|
215 + | }
|
216 + | Some(3) => {
|
217 + | builder.max_results = Some(deser.read_integer(member)?);
|
218 + | }
|
219 + | Some(4) => {
|
220 + | builder.allowed_by_application = Some(deser.read_boolean(member)?);
|
221 + | }
|
222 + | _ => {}
|
223 + | }
|
224 + | Ok(())
|
225 + | })?;
|
174 226 | builder
|
175 227 | .build()
|
176 228 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
177 229 | }
|
178 230 | }
|
179 231 | impl ListCallerAccessGrantsInput {
|
180 232 | /// Creates a new builder-style object to manufacture [`ListCallerAccessGrantsInput`](crate::operation::list_caller_access_grants::ListCallerAccessGrantsInput).
|
181 233 | pub fn builder() -> crate::operation::list_caller_access_grants::builders::ListCallerAccessGrantsInputBuilder {
|
182 234 | crate::operation::list_caller_access_grants::builders::ListCallerAccessGrantsInputBuilder::default()
|
183 235 | }
|