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