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