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