153 153 | crate::protocol_serde::type_erase_result(parse_result)
|
154 154 | }
|
155 155 | }
|
156 156 | #[derive(Debug)]
|
157 157 | struct ListSpacesRequestSerializer;
|
158 158 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListSpacesRequestSerializer {
|
159 159 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
160 160 | fn serialize_input(
|
161 161 | &self,
|
162 162 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
163 163 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
164 164 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
165 165 | let input = input.downcast::<crate::operation::list_spaces::ListSpacesInput>().expect("correct type");
|
166 166 | let _header_serialization_settings = _cfg
|
167 167 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
168 168 | .cloned()
|
169 169 | .unwrap_or_default();
|
170 170 | let mut request_builder = {
|
171 171 | #[allow(clippy::uninlined_format_args)]
|
172 172 | fn uri_base(
|
173 173 | _input: &crate::operation::list_spaces::ListSpacesInput,
|
174 174 | output: &mut ::std::string::String,
|
175 175 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
176 176 | use ::std::fmt::Write as _;
|
177 177 | ::std::write!(output, "/v1/spaces").expect("formatting should succeed");
|
178 178 | ::std::result::Result::Ok(())
|
179 179 | }
|
180 180 | #[allow(clippy::unnecessary_wraps)]
|
181 181 | fn update_http_builder(
|
182 182 | input: &crate::operation::list_spaces::ListSpacesInput,
|
183 - | builder: ::http::request::Builder,
|
184 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
183 + | builder: ::http_1x::request::Builder,
|
184 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
185 185 | let mut uri = ::std::string::String::new();
|
186 186 | uri_base(input, &mut uri)?;
|
187 187 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
188 188 | }
|
189 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
190 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
|
189 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
190 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
|
191 191 | builder
|
192 192 | };
|
193 193 | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_spaces::ser_list_spaces_input(&input)?);
|
194 194 | if let Some(content_length) = body.content_length() {
|
195 195 | let content_length = content_length.to_string();
|
196 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
196 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
197 197 | }
|
198 198 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
199 199 | }
|
200 200 | }
|
201 201 | #[derive(Debug)]
|
202 202 | struct ListSpacesEndpointParamsInterceptor;
|
203 203 |
|
204 204 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListSpacesEndpointParamsInterceptor {
|
205 205 | fn name(&self) -> &'static str {
|
206 206 | "ListSpacesEndpointParamsInterceptor"
|
207 207 | }
|
208 208 |
|
209 209 | fn read_before_execution(
|
210 210 | &self,
|
211 211 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
212 212 | '_,
|
213 213 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
214 214 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
215 215 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
216 216 | >,
|
217 217 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
218 218 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
219 219 | let _input = context
|
220 220 | .input()
|
221 221 | .downcast_ref::<ListSpacesInput>()
|
222 222 | .ok_or("failed to downcast to ListSpacesInput")?;
|
223 223 |
|
224 224 | let params = crate::config::endpoint::Params::builder()
|
225 225 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
226 226 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|