204 204 | let input_2 = input_2
|
205 205 | .as_ref()
|
206 206 | .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("vault_name", "cannot be empty or unset"))?;
|
207 207 | let vault_name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
|
208 208 | if vault_name.is_empty() {
|
209 209 | return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
|
210 210 | "vault_name",
|
211 211 | "cannot be empty or unset",
|
212 212 | ));
|
213 213 | }
|
214 214 | ::std::write!(
|
215 215 | output,
|
216 216 | "/{accountId}/vaults/{vaultName}/tags",
|
217 217 | accountId = account_id,
|
218 218 | vaultName = vault_name
|
219 219 | )
|
220 220 | .expect("formatting should succeed");
|
221 221 | ::std::result::Result::Ok(())
|
222 222 | }
|
223 223 | fn uri_query(
|
224 224 | _input: &crate::operation::remove_tags_from_vault::RemoveTagsFromVaultInput,
|
225 225 | mut output: &mut ::std::string::String,
|
226 226 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
227 227 | let mut query = ::aws_smithy_http::query::Writer::new(output);
|
228 228 | query.push_kv("operation", "remove");
|
229 229 | ::std::result::Result::Ok(())
|
230 230 | }
|
231 231 | #[allow(clippy::unnecessary_wraps)]
|
232 232 | fn update_http_builder(
|
233 233 | input: &crate::operation::remove_tags_from_vault::RemoveTagsFromVaultInput,
|
234 - | builder: ::http::request::Builder,
|
235 - | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
234 + | builder: ::http_1x::request::Builder,
|
235 + | ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
236 236 | let mut uri = ::std::string::String::new();
|
237 237 | uri_base(input, &mut uri)?;
|
238 238 | uri_query(input, &mut uri)?;
|
239 239 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
240 240 | }
|
241 - | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
242 - | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
|
241 + | let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
|
242 + | builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
|
243 243 | builder
|
244 244 | };
|
245 245 | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_remove_tags_from_vault::ser_remove_tags_from_vault_input(
|
246 246 | &input,
|
247 247 | )?);
|
248 248 | if let Some(content_length) = body.content_length() {
|
249 249 | let content_length = content_length.to_string();
|
250 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
250 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
251 251 | }
|
252 252 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
253 253 | }
|
254 254 | }
|
255 255 | #[derive(Debug)]
|
256 256 | struct RemoveTagsFromVaultEndpointParamsInterceptor;
|
257 257 |
|
258 258 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RemoveTagsFromVaultEndpointParamsInterceptor {
|
259 259 | fn name(&self) -> &'static str {
|
260 260 | "RemoveTagsFromVaultEndpointParamsInterceptor"
|
261 261 | }
|
262 262 |
|
263 263 | fn read_before_execution(
|
264 264 | &self,
|
265 265 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
266 266 | '_,
|
267 267 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
268 268 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
269 269 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
270 270 | >,
|
271 271 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
272 272 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
273 273 | let _input = context
|
274 274 | .input()
|
275 275 | .downcast_ref::<RemoveTagsFromVaultInput>()
|
276 276 | .ok_or("failed to downcast to RemoveTagsFromVaultInput")?;
|
277 277 |
|
278 278 | let params = crate::config::endpoint::Params::builder()
|
279 279 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
280 280 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|