77 86 | runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
|
78 87 | }
|
79 88 | runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
|
80 89 | config_override,
|
81 90 | client_config.config.clone(),
|
82 91 | &client_config.runtime_components,
|
83 92 | ));
|
84 93 | }
|
85 94 | runtime_plugins
|
86 95 | }
|
96 + | /* OperationGenerator.kt:85 */
|
87 97 | }
|
98 + | /* OperationRuntimePluginGenerator.kt:55 */
|
88 99 | impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for StreamPokemonRadio {
|
89 100 | fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
|
90 101 | let mut cfg = ::aws_smithy_types::config_bag::Layer::new("StreamPokemonRadio");
|
91 102 |
|
92 103 | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
|
93 104 | StreamPokemonRadioRequestSerializer,
|
94 105 | ));
|
95 106 | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
|
96 107 | StreamPokemonRadioResponseDeserializer,
|
97 108 | ));
|
98 109 |
|
99 110 | cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
|
100 111 | ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
|
101 112 | ));
|
102 113 |
|
103 114 | cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
|
104 115 | "StreamPokemonRadio",
|
105 116 | "PokemonService",
|
106 117 | ));
|
107 118 |
|
108 119 | ::std::option::Option::Some(cfg.freeze())
|
109 120 | }
|
110 121 |
|
111 122 | fn runtime_components(
|
112 123 | &self,
|
113 124 | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
114 125 | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
115 126 | #[allow(unused_mut)]
|
116 127 | let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("StreamPokemonRadio")
|
117 128 | .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
|
118 129 | .with_interceptor(StreamPokemonRadioEndpointParamsInterceptor)
|
119 130 | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
|
120 131 | crate::operation::stream_pokemon_radio::StreamPokemonRadioError,
|
121 132 | >::new())
|
122 133 | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
|
123 134 | crate::operation::stream_pokemon_radio::StreamPokemonRadioError,
|
124 135 | >::new());
|
125 136 |
|
126 137 | ::std::borrow::Cow::Owned(rcb)
|
127 138 | }
|
128 139 | }
|
129 140 |
|
141 + | /* ResponseDeserializerGenerator.kt:64 */
|
130 142 | #[derive(Debug)]
|
131 143 | struct StreamPokemonRadioResponseDeserializer;
|
132 144 | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StreamPokemonRadioResponseDeserializer {
|
133 145 | fn deserialize_streaming(
|
134 146 | &self,
|
135 147 | response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
136 148 | ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
|
137 149 | #[allow(unused_mut)]
|
138 150 | let mut force_error = false;
|
139 151 |
|
140 152 | // If this is an error, defer to the non-streaming parser
|
141 153 | if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
|
142 154 | return ::std::option::Option::None;
|
143 155 | }
|
144 156 | ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
|
145 157 | crate::protocol_serde::shape_stream_pokemon_radio::de_stream_pokemon_radio_http_response(response),
|
146 158 | ))
|
147 159 | }
|
148 160 |
|
149 161 | fn deserialize_nonstreaming(
|
150 162 | &self,
|
151 163 | response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
152 164 | ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
|
153 165 | // For streaming operations, we only hit this case if its an error
|
154 166 | let body = response.body().bytes().expect("body loaded");
|
155 167 | crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_stream_pokemon_radio::de_stream_pokemon_radio_http_error(
|
156 168 | response.status().as_u16(),
|
157 169 | response.headers(),
|
158 170 | body,
|
159 171 | ))
|
160 172 | }
|
161 173 | }
|
174 + | /* RequestSerializerGenerator.kt:67 */
|
162 175 | #[derive(Debug)]
|
163 176 | struct StreamPokemonRadioRequestSerializer;
|
164 177 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StreamPokemonRadioRequestSerializer {
|
165 178 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
166 179 | fn serialize_input(
|
167 180 | &self,
|
168 181 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
169 182 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
170 183 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
171 184 | let input = input
|
172 185 | .downcast::<crate::operation::stream_pokemon_radio::StreamPokemonRadioInput>()
|
173 186 | .expect("correct type");
|
174 187 | let _header_serialization_settings = _cfg
|
175 188 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
176 189 | .cloned()
|
177 190 | .unwrap_or_default();
|
178 191 | let mut request_builder = {
|
179 192 | fn uri_base(
|
180 193 | _input: &crate::operation::stream_pokemon_radio::StreamPokemonRadioInput,
|
181 194 | output: &mut ::std::string::String,
|
182 195 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
183 196 | use ::std::fmt::Write as _;
|
184 197 | ::std::write!(output, "/radio").expect("formatting should succeed");
|
185 198 | ::std::result::Result::Ok(())
|
186 199 | }
|
187 200 | #[allow(clippy::unnecessary_wraps)]
|
188 201 | fn update_http_builder(
|
189 202 | input: &crate::operation::stream_pokemon_radio::StreamPokemonRadioInput,
|
190 203 | builder: ::http::request::Builder,
|
191 204 | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
192 205 | let mut uri = ::std::string::String::new();
|
193 206 | uri_base(input, &mut uri)?;
|
194 207 | ::std::result::Result::Ok(builder.method("GET").uri(uri))
|
195 208 | }
|
196 209 | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
197 210 | builder
|
198 211 | };
|
199 212 | let body = ::aws_smithy_types::body::SdkBody::from("");
|
200 213 |
|
201 214 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
202 215 | }
|
203 216 | }
|
217 + | /* EndpointParamsInterceptorGenerator.kt:86 */
|
204 218 | #[derive(Debug)]
|
205 219 | struct StreamPokemonRadioEndpointParamsInterceptor;
|
206 220 |
|
207 221 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StreamPokemonRadioEndpointParamsInterceptor {
|
208 222 | fn name(&self) -> &'static str {
|
209 223 | "StreamPokemonRadioEndpointParamsInterceptor"
|
210 224 | }
|
211 225 |
|
212 226 | fn read_before_execution(
|
213 227 | &self,
|
214 228 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
215 229 | '_,
|
216 230 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
217 231 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
218 232 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
219 233 | >,
|
220 234 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
221 235 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
222 236 | let _input = context
|
223 237 | .input()
|
224 238 | .downcast_ref::<StreamPokemonRadioInput>()
|
225 239 | .ok_or("failed to downcast to StreamPokemonRadioInput")?;
|
226 240 |
|
227 241 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
228 242 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
229 243 | })?;
|
230 244 | cfg.interceptor_state()
|
231 245 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
232 246 | ::std::result::Result::Ok(())
|
233 247 | }
|
234 248 | }
|
235 249 |
|
236 250 | // The get_* functions below are generated from JMESPath expressions in the
|
237 251 | // operationContextParams trait. They target the operation's input shape.
|
238 252 |
|
253 + | /* OperationErrorGenerator.kt:79 */
|
239 254 | /// Error type for the `StreamPokemonRadioError` operation.
|
255 + | /* RustType.kt:516 */
|
240 256 | #[non_exhaustive]
|
257 + | /* RustType.kt:516 */
|
241 258 | #[derive(::std::fmt::Debug)]
|
242 - | pub enum StreamPokemonRadioError {
|
259 + | pub /* OperationErrorGenerator.kt:81 */ enum StreamPokemonRadioError {
|
260 + | /* OperationErrorGenerator.kt:88 */
|
243 261 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
244 262 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
245 263 | variable wildcard pattern and check `.code()`:
|
246 264 | \
|
247 265 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
248 266 | \
|
249 267 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StreamPokemonRadioError) for what information is available for the error.")]
|
250 268 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
269 + | /* OperationErrorGenerator.kt:81 */
|
251 270 | }
|
271 + | /* OperationErrorGenerator.kt:218 */
|
252 272 | impl StreamPokemonRadioError {
|
273 + | /* OperationErrorGenerator.kt:219 */
|
253 274 | /// Creates the `StreamPokemonRadioError::Unhandled` variant from any error type.
|
254 275 | pub fn unhandled(
|
255 276 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
256 277 | ) -> Self {
|
257 278 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
258 279 | source: err.into(),
|
259 280 | meta: ::std::default::Default::default(),
|
260 281 | })
|
261 282 | }
|
262 283 |
|
263 284 | /// Creates the `StreamPokemonRadioError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
264 285 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
265 286 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
266 287 | source: err.clone().into(),
|
267 288 | meta: err,
|
268 289 | })
|
269 290 | }
|
270 - | ///
|
291 + | /// /* OperationErrorGenerator.kt:236 */
|
271 292 | /// Returns error metadata, which includes the error code, message,
|
272 293 | /// request ID, and potentially additional information.
|
273 294 | ///
|
295 + | /* OperationErrorGenerator.kt:242 */
|
274 296 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
297 + | /* OperationErrorGenerator.kt:243 */
|
275 298 | match self {
|
276 - | Self::Unhandled(e) => &e.meta,
|
299 + | /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
|
300 + | /* OperationErrorGenerator.kt:243 */
|
277 301 | }
|
302 + | /* OperationErrorGenerator.kt:242 */
|
278 303 | }
|
304 + | /* OperationErrorGenerator.kt:218 */
|
279 305 | }
|
306 + | /* OperationErrorGenerator.kt:269 */
|
280 307 | impl ::std::error::Error for StreamPokemonRadioError {
|
308 + | /* OperationErrorGenerator.kt:270 */
|
281 309 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
310 + | /* OperationErrorGenerator.kt:318 */
|
282 311 | match self {
|
283 - | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
312 + | /* OperationErrorGenerator.kt:326 */
|
313 + | Self::Unhandled(_inner) => {
|
314 + | /* OperationErrorGenerator.kt:279 */
|
315 + | ::std::option::Option::Some(&*_inner.source)
|
316 + | /* OperationErrorGenerator.kt:326 */
|
317 + | } /* OperationErrorGenerator.kt:318 */
|
284 318 | }
|
319 + | /* OperationErrorGenerator.kt:270 */
|
285 320 | }
|
321 + | /* OperationErrorGenerator.kt:269 */
|
286 322 | }
|
323 + | /* OperationErrorGenerator.kt:133 */
|
287 324 | impl ::std::fmt::Display for StreamPokemonRadioError {
|
325 + | /* OperationErrorGenerator.kt:134 */
|
288 326 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
327 + | /* OperationErrorGenerator.kt:318 */
|
289 328 | match self {
|
329 + | /* OperationErrorGenerator.kt:326 */
|
290 330 | Self::Unhandled(_inner) => {
|
331 + | /* OperationErrorGenerator.kt:139 */
|
291 332 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
292 333 | write!(f, "unhandled error ({code})")
|
293 334 | } else {
|
294 335 | f.write_str("unhandled error")
|
295 336 | }
|
296 - | }
|
337 + | /* OperationErrorGenerator.kt:326 */
|
338 + | } /* OperationErrorGenerator.kt:318 */
|
297 339 | }
|
340 + | /* OperationErrorGenerator.kt:134 */
|
298 341 | }
|
342 + | /* OperationErrorGenerator.kt:133 */
|
299 343 | }
|
344 + | /* OperationErrorGenerator.kt:182 */
|
300 345 | impl ::aws_smithy_types::retry::ProvideErrorKind for StreamPokemonRadioError {
|
346 + | /* OperationErrorGenerator.kt:186 */
|
301 347 | fn code(&self) -> ::std::option::Option<&str> {
|
348 + | /* OperationErrorGenerator.kt:187 */
|
302 349 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
350 + | /* OperationErrorGenerator.kt:186 */
|
303 351 | }
|
352 + | /* OperationErrorGenerator.kt:190 */
|
304 353 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
354 + | /* OperationErrorGenerator.kt:197 */
|
305 355 | ::std::option::Option::None
|
356 + | /* OperationErrorGenerator.kt:190 */
|
306 357 | }
|
358 + | /* OperationErrorGenerator.kt:182 */
|
307 359 | }
|
360 + | /* OperationErrorGenerator.kt:163 */
|
308 361 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StreamPokemonRadioError {
|
362 + | /* OperationErrorGenerator.kt:164 */
|
309 363 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
364 + | /* OperationErrorGenerator.kt:318 */
|
310 365 | match self {
|
311 - | Self::Unhandled(_inner) => &_inner.meta,
|
366 + | /* OperationErrorGenerator.kt:326 */
|
367 + | Self::Unhandled(_inner) => {
|
368 + | /* OperationErrorGenerator.kt:168 */
|
369 + | &_inner.meta
|
370 + | /* OperationErrorGenerator.kt:326 */
|
371 + | } /* OperationErrorGenerator.kt:318 */
|
312 372 | }
|
373 + | /* OperationErrorGenerator.kt:164 */
|
313 374 | }
|
375 + | /* OperationErrorGenerator.kt:163 */
|
314 376 | }
|
377 + | /* OperationErrorGenerator.kt:109 */
|
315 378 | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for StreamPokemonRadioError {
|
379 + | /* OperationErrorGenerator.kt:110 */
|
316 380 | fn create_unhandled_error(
|
317 381 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
318 382 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
319 383 | ) -> Self {
|
384 + | /* OperationErrorGenerator.kt:121 */
|
320 385 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
321 386 | source,
|
322 387 | meta: meta.unwrap_or_default(),
|
323 388 | })
|
389 + | /* OperationErrorGenerator.kt:110 */
|
324 390 | }
|
391 + | /* OperationErrorGenerator.kt:109 */
|
325 392 | }
|
326 393 |
|
394 + | /* CodegenDelegator.kt:255 */
|
327 395 | pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_output::StreamPokemonRadioOutput;
|
328 396 |
|
397 + | /* CodegenDelegator.kt:255 */
|
329 398 | pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_input::StreamPokemonRadioInput;
|
330 399 |
|
400 + | /* RustModule.kt:172 */
|
331 401 | mod _stream_pokemon_radio_input;
|
332 402 |
|
403 + | /* RustModule.kt:172 */
|
333 404 | mod _stream_pokemon_radio_output;
|
334 405 |
|
335 - | /// Builders
|
406 + | /// /* CodegenDelegator.kt:51 */Builders
|
336 407 | pub mod builders;
|