146 152 | crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError,
|
147 153 | >::new());
|
148 154 |
|
149 155 | ::std::borrow::Cow::Owned(rcb)
|
150 156 | }
|
151 157 | }
|
152 158 |
|
153 159 | #[derive(Debug)]
|
154 160 | struct DescribeConfigurationAggregatorSourcesStatusResponseDeserializer;
|
155 161 | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeConfigurationAggregatorSourcesStatusResponseDeserializer {
|
156 - | fn deserialize_nonstreaming(
|
162 + | fn deserialize_nonstreaming_with_config(
|
157 163 | &self,
|
158 164 | response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
165 + | _cfg: &::aws_smithy_types::config_bag::ConfigBag,
|
159 166 | ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
|
160 167 | let (success, status) = (response.status().is_success(), response.status().as_u16());
|
161 - | let headers = response.headers();
|
162 - | let body = response.body().bytes().expect("body loaded");
|
163 168 | #[allow(unused_mut)]
|
164 169 | let mut force_error = false;
|
165 170 | ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
|
166 - | let parse_result = if !success && status != 200 || force_error {
|
167 - | crate::protocol_serde::shape_describe_configuration_aggregator_sources_status::de_describe_configuration_aggregator_sources_status_http_error(status, headers, body)
|
171 + | if !success && status != 200 || force_error {
|
172 + | let headers = response.headers();
|
173 + | let body = response.body().bytes().expect("body loaded");
|
174 + | #[allow(unused_mut)]
|
175 + | let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
|
176 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
177 + | })?;
|
178 + | generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
|
179 + | let generic = generic_builder.build();
|
180 + | let error_code = match generic.code() {
|
181 + | ::std::option::Option::Some(code) => code,
|
182 + | ::std::option::Option::None => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError::unhandled(generic)))),
|
183 + | };
|
184 + | let _error_message = generic.message().map(|msg| msg.to_owned());
|
185 + | let protocol = _cfg
|
186 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
187 + | .expect("a SharedClientProtocol is required");
|
188 + | let err = match error_code {
|
189 + | "InvalidLimitException" => crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError::InvalidLimitException({
|
190 + | let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidLimitException::SCHEMA, _cfg)
|
191 + | .and_then(|mut deser| crate::types::error::InvalidLimitException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
|
192 + | {
|
193 + | ::std::result::Result::Ok(val) => val,
|
194 + | ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
|
195 + | };
|
196 + | tmp.meta = generic;
|
197 + | if tmp.message.is_none() {
|
198 + | tmp.message = _error_message;
|
199 + | }
|
200 + | tmp
|
201 + | }),
|
202 + | "InvalidNextTokenException" => crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError::InvalidNextTokenException({
|
203 + | let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidNextTokenException::SCHEMA, _cfg)
|
204 + | .and_then(|mut deser| crate::types::error::InvalidNextTokenException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
|
205 + | {
|
206 + | ::std::result::Result::Ok(val) => val,
|
207 + | ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
|
208 + | };
|
209 + | tmp.meta = generic;
|
210 + | if tmp.message.is_none() {
|
211 + | tmp.message = _error_message;
|
212 + | }
|
213 + | tmp
|
214 + | }),
|
215 + | "InvalidParameterValueException" => crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError::InvalidParameterValueException({
|
216 + | let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidParameterValueException::SCHEMA, _cfg)
|
217 + | .and_then(|mut deser| crate::types::error::InvalidParameterValueException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
|
218 + | {
|
219 + | ::std::result::Result::Ok(val) => val,
|
220 + | ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
|
221 + | };
|
222 + | tmp.meta = generic;
|
223 + | if tmp.message.is_none() {
|
224 + | tmp.message = _error_message;
|
225 + | }
|
226 + | tmp
|
227 + | }),
|
228 + | "NoSuchConfigurationAggregatorException" => crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError::NoSuchConfigurationAggregatorException({
|
229 + | let mut tmp = match protocol.deserialize_response(response, crate::types::error::NoSuchConfigurationAggregatorException::SCHEMA, _cfg)
|
230 + | .and_then(|mut deser| crate::types::error::NoSuchConfigurationAggregatorException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
|
231 + | {
|
232 + | ::std::result::Result::Ok(val) => val,
|
233 + | ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
|
234 + | };
|
235 + | tmp.meta = generic;
|
236 + | if tmp.message.is_none() {
|
237 + | tmp.message = _error_message;
|
238 + | }
|
239 + | tmp
|
240 + | }),
|
241 + | _ => crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusError::generic(generic)
|
242 + | };
|
243 + | ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
|
244 + | ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
|
245 + | ))
|
168 246 | } else {
|
169 - | crate::protocol_serde::shape_describe_configuration_aggregator_sources_status::de_describe_configuration_aggregator_sources_status_http_response(status, headers, body)
|
170 - | };
|
171 - | crate::protocol_serde::type_erase_result(parse_result)
|
247 + | let protocol = _cfg
|
248 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
249 + | .expect("a SharedClientProtocol is required");
|
250 + | let mut deser = protocol
|
251 + | .deserialize_response(response, DescribeConfigurationAggregatorSourcesStatus::OUTPUT_SCHEMA, _cfg)
|
252 + | .map_err(|e| {
|
253 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
254 + | })?;
|
255 + | let body = response.body().bytes().expect("body loaded");
|
256 + | let output = crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusOutput::deserialize_with_response(
|
257 + | &mut *deser,
|
258 + | response.headers(),
|
259 + | response.status().into(),
|
260 + | body,
|
261 + | ).map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
|
262 + | ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
|
263 + | }
|
172 264 | }
|
173 265 | }
|
174 266 | #[derive(Debug)]
|
175 267 | struct DescribeConfigurationAggregatorSourcesStatusRequestSerializer;
|
176 268 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeConfigurationAggregatorSourcesStatusRequestSerializer {
|
177 269 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
178 270 | fn serialize_input(
|
179 271 | &self,
|
180 272 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
181 273 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
182 274 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
183 275 | let input = input
|
184 276 | .downcast::<crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusInput>()
|
185 277 | .expect("correct type");
|
186 - | let _header_serialization_settings = _cfg
|
187 - | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
188 - | .cloned()
|
189 - | .unwrap_or_default();
|
190 - | let mut request_builder = {
|
191 - | #[allow(clippy::uninlined_format_args)]
|
192 - | fn uri_base(
|
193 - | _input: &crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusInput,
|
194 - | output: &mut ::std::string::String,
|
195 - | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
196 - | use ::std::fmt::Write as _;
|
197 - | ::std::write!(output, "/").expect("formatting should succeed");
|
198 - | ::std::result::Result::Ok(())
|
199 - | }
|
200 - | #[allow(clippy::unnecessary_wraps)]
|
201 - | fn update_http_builder(
|
202 - | input: &crate::operation::describe_configuration_aggregator_sources_status::DescribeConfigurationAggregatorSourcesStatusInput,
|
203 - | builder: ::http_1x::request::Builder,
|
204 - | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
205 - | let mut uri = ::std::string::String::new();
|
206 - | uri_base(input, &mut uri)?;
|
207 - | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
208 - | }
|
209 - | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
210 - | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
|
211 - | builder = _header_serialization_settings.set_default_header(
|
212 - | builder,
|
213 - | ::http_1x::header::HeaderName::from_static("x-amz-target"),
|
214 - | "StarlingDoveService.DescribeConfigurationAggregatorSourcesStatus",
|
215 - | );
|
216 - | builder
|
217 - | };
|
218 - | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_configuration_aggregator_sources_status::ser_describe_configuration_aggregator_sources_status_input(&input)?);
|
219 - | if let Some(content_length) = body.content_length() {
|
220 - | let content_length = content_length.to_string();
|
221 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
222 - | }
|
223 - | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
278 + | let protocol = _cfg
|
279 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
280 + | .expect("a SharedClientProtocol is required");
|
281 + | let mut request = protocol
|
282 + | .serialize_request(&input, DescribeConfigurationAggregatorSourcesStatus::INPUT_SCHEMA, "", _cfg)
|
283 + | .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
|
284 + |
|
285 + | return ::std::result::Result::Ok(request);
|
224 286 | }
|
225 287 | }
|
226 288 | #[derive(Debug)]
|
227 289 | struct DescribeConfigurationAggregatorSourcesStatusEndpointParamsInterceptor;
|
228 290 |
|
229 291 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeConfigurationAggregatorSourcesStatusEndpointParamsInterceptor {
|
230 292 | fn name(&self) -> &'static str {
|
231 293 | "DescribeConfigurationAggregatorSourcesStatusEndpointParamsInterceptor"
|
232 294 | }
|
233 295 |
|