92 92 | PutBucketEncryptionResponseDeserializer,
|
93 93 | ));
|
94 94 |
|
95 95 | cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
|
96 96 | ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
|
97 97 | ));
|
98 98 |
|
99 99 | cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("PutBucketEncryption", "s3"));
|
100 100 | let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
|
101 101 | signing_options.double_uri_encode = false;
|
102 102 | signing_options.content_sha256_header = true;
|
103 103 | signing_options.normalize_uri_path = false;
|
104 104 | signing_options.payload_override = None;
|
105 105 |
|
106 106 | cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
|
107 107 | signing_options,
|
108 108 | ..::std::default::Default::default()
|
109 109 | });
|
110 110 | cfg.store_put(crate::s3_express::checksum::provide_default_checksum_algorithm());
|
111 111 |
|
112 112 | ::std::option::Option::Some(cfg.freeze())
|
113 113 | }
|
114 114 |
|
115 115 | fn runtime_components(
|
116 116 | &self,
|
117 117 | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
118 118 | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
119 119 | #[allow(unused_mut)]
|
120 120 | let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("PutBucketEncryption")
|
121 121 | .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
|
122 - | .with_interceptor(PutBucketEncryptionEndpointParamsInterceptor)
|
123 - | .with_interceptor(crate::http_request_checksum::RequestChecksumInterceptor::new(
|
124 - | |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
|
122 + | .with_interceptor(PutBucketEncryptionEndpointParamsInterceptor)
|
123 + | .with_interceptor(crate::http_request_checksum::RequestChecksumInterceptor::new(|input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
|
125 124 | let input: &crate::operation::put_bucket_encryption::PutBucketEncryptionInput = input.downcast_ref().expect("correct type");
|
126 125 | let checksum_algorithm = input.checksum_algorithm();
|
127 126 | let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str()).or(Some("md5"));
|
128 - | let checksum_algorithm = match checksum_algorithm {
|
127 + | let checksum_algorithm = match checksum_algorithm {
|
129 128 | Some(algo) => Some(
|
130 129 | algo.parse::<::aws_smithy_checksums::ChecksumAlgorithm>()
|
131 - | .map_err(::aws_smithy_types::error::operation::BuildError::other)?,
|
130 + | .map_err(::aws_smithy_types::error::operation::BuildError::other)?
|
132 131 | ),
|
133 132 | None => None,
|
134 133 | };
|
135 134 | ::std::result::Result::<_, ::aws_smithy_runtime_api::box_error::BoxError>::Ok(checksum_algorithm)
|
136 - | },
|
137 - | ))
|
138 - | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
|
139 - | crate::operation::put_bucket_encryption::PutBucketEncryptionError,
|
140 - | >::new())
|
141 - | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
|
142 - | crate::operation::put_bucket_encryption::PutBucketEncryptionError,
|
143 - | >::new())
|
144 - | .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
|
145 - | crate::operation::put_bucket_encryption::PutBucketEncryptionError,
|
146 - | >::new());
|
135 + | }))
|
136 + | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::put_bucket_encryption::PutBucketEncryptionError>::new())
|
137 + | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::put_bucket_encryption::PutBucketEncryptionError>::new())
|
138 + | .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::put_bucket_encryption::PutBucketEncryptionError>::builder().transient_errors({
|
139 + | let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
|
140 + | transient_errors.push("InternalError");
|
141 + | ::std::borrow::Cow::Owned(transient_errors)
|
142 + | }).build());
|
147 143 |
|
148 144 | ::std::borrow::Cow::Owned(rcb)
|
149 145 | }
|
150 146 | }
|
151 147 |
|
152 148 | #[derive(Debug)]
|
153 149 | struct PutBucketEncryptionResponseDeserializer;
|
154 150 | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutBucketEncryptionResponseDeserializer {
|
155 151 | fn deserialize_nonstreaming(
|
156 152 | &self,
|
157 153 | response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
158 154 | ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
|
159 155 | let (success, status) = (response.status().is_success(), response.status().as_u16());
|
160 156 | let headers = response.headers();
|
161 157 | let body = response.body().bytes().expect("body loaded");
|
162 158 | #[allow(unused_mut)]
|
163 159 | let mut force_error = false;
|
164 160 | ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
|
165 161 | if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
|
166 162 | force_error = true;
|
167 163 | }
|
168 164 | ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
|
169 165 | let parse_result = if !success && status != 200 || force_error {
|
170 166 | crate::protocol_serde::shape_put_bucket_encryption::de_put_bucket_encryption_http_error(status, headers, body)
|
171 167 | } else {
|
172 168 | crate::protocol_serde::shape_put_bucket_encryption::de_put_bucket_encryption_http_response(status, headers, body)
|
173 169 | };
|
174 170 | crate::protocol_serde::type_erase_result(parse_result)
|
175 171 | }
|
176 172 | }
|