167 167 | }
|
168 168 | #[derive(Debug)]
|
169 169 | struct GetContextKeysForCustomPolicyRequestSerializer;
|
170 170 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetContextKeysForCustomPolicyRequestSerializer {
|
171 171 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
172 172 | fn serialize_input(
|
173 173 | &self,
|
174 174 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
175 175 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
176 176 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
177 177 | let input = input
|
178 178 | .downcast::<crate::operation::get_context_keys_for_custom_policy::GetContextKeysForCustomPolicyInput>()
|
179 179 | .expect("correct type");
|
180 180 | let _header_serialization_settings = _cfg
|
181 181 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
182 182 | .cloned()
|
183 183 | .unwrap_or_default();
|
184 184 | let mut request_builder = {
|
185 185 | #[allow(clippy::uninlined_format_args)]
|
186 186 | fn uri_base(
|
187 187 | _input: &crate::operation::get_context_keys_for_custom_policy::GetContextKeysForCustomPolicyInput,
|
188 188 | output: &mut ::std::string::String,
|
189 189 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
190 190 | use ::std::fmt::Write as _;
|
191 191 | ::std::write!(output, "/").expect("formatting should succeed");
|
192 192 | ::std::result::Result::Ok(())
|
193 193 | }
|
194 194 | #[allow(clippy::unnecessary_wraps)]
|
195 195 | fn update_http_builder(
|
196 196 | input: &crate::operation::get_context_keys_for_custom_policy::GetContextKeysForCustomPolicyInput,
|
197 - | builder: ::http::request::Builder,
|
198 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
197 + | builder: ::http_1x::request::Builder,
|
198 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
199 199 | let mut uri = ::std::string::String::new();
|
200 200 | uri_base(input, &mut uri)?;
|
201 201 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
202 202 | }
|
203 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
204 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
|
203 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
204 + | builder =
|
205 + | _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
|
205 206 | builder
|
206 207 | };
|
207 208 | let body = ::aws_smithy_types::body::SdkBody::from(
|
208 209 | crate::protocol_serde::shape_get_context_keys_for_custom_policy_input::ser_get_context_keys_for_custom_policy_input_input_input(&input)?,
|
209 210 | );
|
210 211 | if let Some(content_length) = body.content_length() {
|
211 212 | let content_length = content_length.to_string();
|
212 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
213 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
213 214 | }
|
214 215 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
215 216 | }
|
216 217 | }
|
217 218 | #[derive(Debug)]
|
218 219 | struct GetContextKeysForCustomPolicyEndpointParamsInterceptor;
|
219 220 |
|
220 221 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetContextKeysForCustomPolicyEndpointParamsInterceptor {
|
221 222 | fn name(&self) -> &'static str {
|
222 223 | "GetContextKeysForCustomPolicyEndpointParamsInterceptor"
|
223 224 | }
|
224 225 |
|
225 226 | fn read_before_execution(
|
226 227 | &self,
|
227 228 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
228 229 | '_,
|
229 230 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
230 231 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
231 232 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
232 233 | >,
|
233 234 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
234 235 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
235 236 | let _input = context
|
236 237 | .input()
|
237 238 | .downcast_ref::<GetContextKeysForCustomPolicyInput>()
|
238 239 | .ok_or("failed to downcast to GetContextKeysForCustomPolicyInput")?;
|
239 240 |
|
240 241 | let params = crate::config::endpoint::Params::builder()
|
241 242 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
242 243 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|