1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | pub use crate::types::error::_validation_exception::ValidationException;
|
2 + | pub use crate::types::error::_access_denied_exception::AccessDeniedException;
|
3 3 |
|
4 - | pub use crate::types::error::_throttling_exception::ThrottlingException;
|
4 + | pub use crate::types::error::_internal_server_exception::InternalServerException;
|
5 5 |
|
6 - | pub use crate::types::error::_service_unavailable_exception::ServiceUnavailableException;
|
6 + | pub use crate::types::error::_throttling_exception::ThrottlingException;
|
7 7 |
|
8 - | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundException;
|
8 + | pub use crate::types::error::_validation_exception::ValidationException;
|
9 9 |
|
10 - | pub use crate::types::error::_internal_server_exception::InternalServerException;
|
10 + | pub use crate::types::error::_conflict_exception::ConflictException;
|
11 11 |
|
12 - | pub use crate::types::error::_access_denied_exception::AccessDeniedException;
|
12 + | pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundException;
|
13 13 |
|
14 14 | pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededException;
|
15 15 |
|
16 - | pub use crate::types::error::_model_timeout_exception::ModelTimeoutException;
|
16 + | pub use crate::types::error::_service_unavailable_exception::ServiceUnavailableException;
|
17 17 |
|
18 - | pub use crate::types::error::_model_stream_error_exception::ModelStreamErrorException;
|
18 + | pub use crate::types::error::_model_error_exception::ModelErrorException;
|
19 19 |
|
20 20 | pub use crate::types::error::_model_not_ready_exception::ModelNotReadyException;
|
21 21 |
|
22 - | pub use crate::types::error::_model_error_exception::ModelErrorException;
|
22 + | pub use crate::types::error::_model_timeout_exception::ModelTimeoutException;
|
23 23 |
|
24 - | /// Error type for the `ResponseStreamError` operation.
|
24 + | pub use crate::types::error::_model_stream_error_exception::ModelStreamErrorException;
|
25 + |
|
26 + | /// Error type for the `ConverseStreamOutputError` operation.
|
25 27 | #[non_exhaustive]
|
26 28 | #[derive(::std::fmt::Debug)]
|
27 - | pub enum ResponseStreamError {
|
29 + | pub enum ConverseStreamOutputError {
|
28 30 | /// <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
29 31 | InternalServerException(crate::types::error::InternalServerException),
|
30 32 | /// <p>An error occurred while streaming the response. Retry your request.</p>
|
31 33 | ModelStreamErrorException(crate::types::error::ModelStreamErrorException),
|
32 34 | /// <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
33 35 | ValidationException(crate::types::error::ValidationException),
|
34 36 | /// <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
35 37 | ThrottlingException(crate::types::error::ThrottlingException),
|
36 - | /// <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
37 - | ModelTimeoutException(crate::types::error::ModelTimeoutException),
|
38 38 | /// <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
39 39 | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
40 40 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
41 41 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
42 42 | variable wildcard pattern and check `.code()`:
|
43 43 | \
|
44 44 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
45 45 | \
|
46 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ResponseStreamError) for what information is available for the error.")]
|
46 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ConverseStreamOutputError) for what information is available for the error.")]
|
47 47 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
48 48 | }
|
49 - | impl ResponseStreamError {
|
50 - | /// Creates the `ResponseStreamError::Unhandled` variant from any error type.
|
49 + | impl ConverseStreamOutputError {
|
50 + | /// Creates the `ConverseStreamOutputError::Unhandled` variant from any error type.
|
51 51 | pub fn unhandled(
|
52 52 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
53 53 | ) -> Self {
|
54 54 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
55 55 | source: err.into(),
|
56 56 | meta: ::std::default::Default::default(),
|
57 57 | })
|
58 58 | }
|
59 59 |
|
60 - | /// Creates the `ResponseStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
60 + | /// Creates the `ConverseStreamOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
61 61 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
62 62 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
63 63 | source: err.clone().into(),
|
64 64 | meta: err,
|
65 65 | })
|
66 66 | }
|
67 67 | ///
|
68 68 | /// Returns error metadata, which includes the error code, message,
|
69 69 | /// request ID, and potentially additional information.
|
70 70 | ///
|
71 71 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
72 72 | match self {
|
73 73 | Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
74 74 | Self::ModelStreamErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
75 75 | Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
76 76 | Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
77 - | Self::ModelTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
78 77 | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
79 78 | Self::Unhandled(e) => &e.meta,
|
80 79 | }
|
81 80 | }
|
82 - | /// Returns `true` if the error kind is `ResponseStreamError::InternalServerException`.
|
81 + | /// Returns `true` if the error kind is `ConverseStreamOutputError::InternalServerException`.
|
83 82 | pub fn is_internal_server_exception(&self) -> bool {
|
84 83 | matches!(self, Self::InternalServerException(_))
|
85 84 | }
|
86 - | /// Returns `true` if the error kind is `ResponseStreamError::ModelStreamErrorException`.
|
85 + | /// Returns `true` if the error kind is `ConverseStreamOutputError::ModelStreamErrorException`.
|
87 86 | pub fn is_model_stream_error_exception(&self) -> bool {
|
88 87 | matches!(self, Self::ModelStreamErrorException(_))
|
89 88 | }
|
90 - | /// Returns `true` if the error kind is `ResponseStreamError::ValidationException`.
|
89 + | /// Returns `true` if the error kind is `ConverseStreamOutputError::ValidationException`.
|
91 90 | pub fn is_validation_exception(&self) -> bool {
|
92 91 | matches!(self, Self::ValidationException(_))
|
93 92 | }
|
94 - | /// Returns `true` if the error kind is `ResponseStreamError::ThrottlingException`.
|
93 + | /// Returns `true` if the error kind is `ConverseStreamOutputError::ThrottlingException`.
|
95 94 | pub fn is_throttling_exception(&self) -> bool {
|
96 95 | matches!(self, Self::ThrottlingException(_))
|
97 96 | }
|
98 - | /// Returns `true` if the error kind is `ResponseStreamError::ModelTimeoutException`.
|
99 - | pub fn is_model_timeout_exception(&self) -> bool {
|
100 - | matches!(self, Self::ModelTimeoutException(_))
|
101 - | }
|
102 - | /// Returns `true` if the error kind is `ResponseStreamError::ServiceUnavailableException`.
|
97 + | /// Returns `true` if the error kind is `ConverseStreamOutputError::ServiceUnavailableException`.
|
103 98 | pub fn is_service_unavailable_exception(&self) -> bool {
|
104 99 | matches!(self, Self::ServiceUnavailableException(_))
|
105 100 | }
|
106 101 | }
|
107 - | impl ::std::error::Error for ResponseStreamError {
|
102 + | impl ::std::error::Error for ConverseStreamOutputError {
|
108 103 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
109 104 | match self {
|
110 105 | Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
|
111 106 | Self::ModelStreamErrorException(_inner) => ::std::option::Option::Some(_inner),
|
112 107 | Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
|
113 108 | Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
|
114 - | Self::ModelTimeoutException(_inner) => ::std::option::Option::Some(_inner),
|
115 109 | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
116 110 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
117 111 | }
|
118 112 | }
|
119 113 | }
|
120 - | impl ::std::fmt::Display for ResponseStreamError {
|
114 + | impl ::std::fmt::Display for ConverseStreamOutputError {
|
121 115 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
122 116 | match self {
|
123 117 | Self::InternalServerException(_inner) => _inner.fmt(f),
|
124 118 | Self::ModelStreamErrorException(_inner) => _inner.fmt(f),
|
125 119 | Self::ValidationException(_inner) => _inner.fmt(f),
|
126 120 | Self::ThrottlingException(_inner) => _inner.fmt(f),
|
127 - | Self::ModelTimeoutException(_inner) => _inner.fmt(f),
|
128 121 | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
129 122 | Self::Unhandled(_inner) => {
|
130 123 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
131 124 | write!(f, "unhandled error ({code})")
|
132 125 | } else {
|
133 126 | f.write_str("unhandled error")
|
134 127 | }
|
135 128 | }
|
136 129 | }
|
137 130 | }
|
138 131 | }
|
139 - | impl ::aws_smithy_types::retry::ProvideErrorKind for ResponseStreamError {
|
132 + | impl ::aws_smithy_types::retry::ProvideErrorKind for ConverseStreamOutputError {
|
140 133 | fn code(&self) -> ::std::option::Option<&str> {
|
141 134 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
142 135 | }
|
143 136 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
144 137 | ::std::option::Option::None
|
145 138 | }
|
146 139 | }
|
147 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResponseStreamError {
|
140 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConverseStreamOutputError {
|
148 141 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
149 142 | match self {
|
150 143 | Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
151 144 | Self::ModelStreamErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
152 145 | Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
153 146 | Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
154 - | Self::ModelTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
155 147 | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
156 148 | Self::Unhandled(_inner) => &_inner.meta,
|
157 149 | }
|
158 150 | }
|
159 151 | }
|
160 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ResponseStreamError {
|
152 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ConverseStreamOutputError {
|
161 153 | fn create_unhandled_error(
|
162 154 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
163 155 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
164 156 | ) -> Self {
|
165 157 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
166 158 | source,
|
167 159 | meta: meta.unwrap_or_default(),
|
168 160 | })
|
169 161 | }
|
170 162 | }
|
171 - | impl ::aws_types::request_id::RequestId for crate::types::error::ResponseStreamError {
|
163 + | impl ::aws_types::request_id::RequestId for crate::types::error::ConverseStreamOutputError {
|
172 164 | fn request_id(&self) -> Option<&str> {
|
173 165 | self.meta().request_id()
|
174 166 | }
|
175 167 | }
|
176 168 |
|
177 - | /// Error type for the `InvokeModelWithBidirectionalStreamOutputError` operation.
|
169 + | /// Error type for the `InvokeModelWithBidirectionalStreamInputError` operation.
|
178 170 | #[non_exhaustive]
|
179 171 | #[derive(::std::fmt::Debug)]
|
180 - | pub enum InvokeModelWithBidirectionalStreamOutputError {
|
181 - | /// <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
182 - | InternalServerException(crate::types::error::InternalServerException),
|
183 - | /// <p>An error occurred while streaming the response. Retry your request.</p>
|
184 - | ModelStreamErrorException(crate::types::error::ModelStreamErrorException),
|
185 - | /// <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
186 - | ValidationException(crate::types::error::ValidationException),
|
187 - | /// <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
188 - | ThrottlingException(crate::types::error::ThrottlingException),
|
189 - | /// <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
190 - | ModelTimeoutException(crate::types::error::ModelTimeoutException),
|
191 - | /// <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
192 - | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
172 + | pub enum InvokeModelWithBidirectionalStreamInputError {
|
193 173 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
194 174 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
195 175 | variable wildcard pattern and check `.code()`:
|
196 176 | \
|
197 177 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
198 178 | \
|
199 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeModelWithBidirectionalStreamOutputError) for what information is available for the error.")]
|
179 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeModelWithBidirectionalStreamInputError) for what information is available for the error.")]
|
200 180 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
201 181 | }
|
202 - | impl InvokeModelWithBidirectionalStreamOutputError {
|
203 - | /// Creates the `InvokeModelWithBidirectionalStreamOutputError::Unhandled` variant from any error type.
|
182 + | impl InvokeModelWithBidirectionalStreamInputError {
|
183 + | /// Creates the `InvokeModelWithBidirectionalStreamInputError::Unhandled` variant from any error type.
|
204 184 | pub fn unhandled(
|
205 185 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
206 186 | ) -> Self {
|
207 187 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
208 188 | source: err.into(),
|
209 189 | meta: ::std::default::Default::default(),
|
210 190 | })
|
211 191 | }
|
212 192 |
|
213 - | /// Creates the `InvokeModelWithBidirectionalStreamOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
193 + | /// Creates the `InvokeModelWithBidirectionalStreamInputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
214 194 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
215 195 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
216 196 | source: err.clone().into(),
|
217 197 | meta: err,
|
218 198 | })
|
219 199 | }
|
220 200 | ///
|
221 201 | /// Returns error metadata, which includes the error code, message,
|
222 202 | /// request ID, and potentially additional information.
|
223 203 | ///
|
224 204 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
225 205 | match self {
|
226 - | Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
227 - | Self::ModelStreamErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
228 - | Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
229 - | Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
230 - | Self::ModelTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
231 - | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
232 206 | Self::Unhandled(e) => &e.meta,
|
233 207 | }
|
234 208 | }
|
235 - | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::InternalServerException`.
|
236 - | pub fn is_internal_server_exception(&self) -> bool {
|
237 - | matches!(self, Self::InternalServerException(_))
|
238 - | }
|
239 - | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ModelStreamErrorException`.
|
240 - | pub fn is_model_stream_error_exception(&self) -> bool {
|
241 - | matches!(self, Self::ModelStreamErrorException(_))
|
242 - | }
|
243 - | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ValidationException`.
|
244 - | pub fn is_validation_exception(&self) -> bool {
|
245 - | matches!(self, Self::ValidationException(_))
|
246 - | }
|
247 - | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ThrottlingException`.
|
248 - | pub fn is_throttling_exception(&self) -> bool {
|
249 - | matches!(self, Self::ThrottlingException(_))
|
250 - | }
|
251 - | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ModelTimeoutException`.
|
252 - | pub fn is_model_timeout_exception(&self) -> bool {
|
253 - | matches!(self, Self::ModelTimeoutException(_))
|
254 - | }
|
255 - | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ServiceUnavailableException`.
|
256 - | pub fn is_service_unavailable_exception(&self) -> bool {
|
257 - | matches!(self, Self::ServiceUnavailableException(_))
|
258 - | }
|
259 209 | }
|
260 - | impl ::std::error::Error for InvokeModelWithBidirectionalStreamOutputError {
|
210 + | impl ::std::error::Error for InvokeModelWithBidirectionalStreamInputError {
|
261 211 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
262 212 | match self {
|
263 - | Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
|
264 - | Self::ModelStreamErrorException(_inner) => ::std::option::Option::Some(_inner),
|
265 - | Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
|
266 - | Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
|
267 - | Self::ModelTimeoutException(_inner) => ::std::option::Option::Some(_inner),
|
268 - | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
269 213 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
270 214 | }
|
271 215 | }
|
272 216 | }
|
273 - | impl ::std::fmt::Display for InvokeModelWithBidirectionalStreamOutputError {
|
217 + | impl ::std::fmt::Display for InvokeModelWithBidirectionalStreamInputError {
|
274 218 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
275 219 | match self {
|
276 - | Self::InternalServerException(_inner) => _inner.fmt(f),
|
277 - | Self::ModelStreamErrorException(_inner) => _inner.fmt(f),
|
278 - | Self::ValidationException(_inner) => _inner.fmt(f),
|
279 - | Self::ThrottlingException(_inner) => _inner.fmt(f),
|
280 - | Self::ModelTimeoutException(_inner) => _inner.fmt(f),
|
281 - | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
282 220 | Self::Unhandled(_inner) => {
|
283 221 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
284 222 | write!(f, "unhandled error ({code})")
|
285 223 | } else {
|
286 224 | f.write_str("unhandled error")
|
287 225 | }
|
288 226 | }
|
289 227 | }
|
290 228 | }
|
291 229 | }
|
292 - | impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeModelWithBidirectionalStreamOutputError {
|
230 + | impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeModelWithBidirectionalStreamInputError {
|
293 231 | fn code(&self) -> ::std::option::Option<&str> {
|
294 232 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
295 233 | }
|
296 234 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
297 235 | ::std::option::Option::None
|
298 236 | }
|
299 237 | }
|
300 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeModelWithBidirectionalStreamOutputError {
|
238 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeModelWithBidirectionalStreamInputError {
|
301 239 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
302 240 | match self {
|
303 - | Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
304 - | Self::ModelStreamErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
305 - | Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
306 - | Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
307 - | Self::ModelTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
308 - | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
309 241 | Self::Unhandled(_inner) => &_inner.meta,
|
310 242 | }
|
311 243 | }
|
312 244 | }
|
313 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeModelWithBidirectionalStreamOutputError {
|
245 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeModelWithBidirectionalStreamInputError {
|
314 246 | fn create_unhandled_error(
|
315 247 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
316 248 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
317 249 | ) -> Self {
|
318 250 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
319 251 | source,
|
320 252 | meta: meta.unwrap_or_default(),
|
321 253 | })
|
322 254 | }
|
323 255 | }
|
324 - | impl ::aws_types::request_id::RequestId for crate::types::error::InvokeModelWithBidirectionalStreamOutputError {
|
256 + | impl ::aws_types::request_id::RequestId for crate::types::error::InvokeModelWithBidirectionalStreamInputError {
|
325 257 | fn request_id(&self) -> Option<&str> {
|
326 258 | self.meta().request_id()
|
327 259 | }
|
328 260 | }
|
329 261 |
|
330 - | /// Error type for the `InvokeModelWithBidirectionalStreamInputError` operation.
|
262 + | /// Error type for the `InvokeModelWithBidirectionalStreamOutputError` operation.
|
331 263 | #[non_exhaustive]
|
332 264 | #[derive(::std::fmt::Debug)]
|
333 - | pub enum InvokeModelWithBidirectionalStreamInputError {
|
265 + | pub enum InvokeModelWithBidirectionalStreamOutputError {
|
266 + | /// <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
267 + | InternalServerException(crate::types::error::InternalServerException),
|
268 + | /// <p>An error occurred while streaming the response. Retry your request.</p>
|
269 + | ModelStreamErrorException(crate::types::error::ModelStreamErrorException),
|
270 + | /// <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
271 + | ValidationException(crate::types::error::ValidationException),
|
272 + | /// <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
273 + | ThrottlingException(crate::types::error::ThrottlingException),
|
274 + | /// <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
275 + | ModelTimeoutException(crate::types::error::ModelTimeoutException),
|
276 + | /// <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
277 + | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
334 278 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
335 279 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
336 280 | variable wildcard pattern and check `.code()`:
|
337 281 | \
|
338 282 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
339 283 | \
|
340 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeModelWithBidirectionalStreamInputError) for what information is available for the error.")]
|
284 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeModelWithBidirectionalStreamOutputError) for what information is available for the error.")]
|
341 285 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
342 286 | }
|
343 - | impl InvokeModelWithBidirectionalStreamInputError {
|
344 - | /// Creates the `InvokeModelWithBidirectionalStreamInputError::Unhandled` variant from any error type.
|
287 + | impl InvokeModelWithBidirectionalStreamOutputError {
|
288 + | /// Creates the `InvokeModelWithBidirectionalStreamOutputError::Unhandled` variant from any error type.
|
345 289 | pub fn unhandled(
|
346 290 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
347 291 | ) -> Self {
|
348 292 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
349 293 | source: err.into(),
|
350 294 | meta: ::std::default::Default::default(),
|
351 295 | })
|
352 296 | }
|
353 297 |
|
354 - | /// Creates the `InvokeModelWithBidirectionalStreamInputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
298 + | /// Creates the `InvokeModelWithBidirectionalStreamOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
355 299 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
356 300 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
357 301 | source: err.clone().into(),
|
358 302 | meta: err,
|
359 303 | })
|
360 304 | }
|
361 305 | ///
|
362 306 | /// Returns error metadata, which includes the error code, message,
|
363 307 | /// request ID, and potentially additional information.
|
364 308 | ///
|
365 309 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
366 310 | match self {
|
311 + | Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
312 + | Self::ModelStreamErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
313 + | Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
314 + | Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
315 + | Self::ModelTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
316 + | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
367 317 | Self::Unhandled(e) => &e.meta,
|
368 318 | }
|
369 319 | }
|
320 + | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::InternalServerException`.
|
321 + | pub fn is_internal_server_exception(&self) -> bool {
|
322 + | matches!(self, Self::InternalServerException(_))
|
323 + | }
|
324 + | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ModelStreamErrorException`.
|
325 + | pub fn is_model_stream_error_exception(&self) -> bool {
|
326 + | matches!(self, Self::ModelStreamErrorException(_))
|
327 + | }
|
328 + | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ValidationException`.
|
329 + | pub fn is_validation_exception(&self) -> bool {
|
330 + | matches!(self, Self::ValidationException(_))
|
331 + | }
|
332 + | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ThrottlingException`.
|
333 + | pub fn is_throttling_exception(&self) -> bool {
|
334 + | matches!(self, Self::ThrottlingException(_))
|
335 + | }
|
336 + | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ModelTimeoutException`.
|
337 + | pub fn is_model_timeout_exception(&self) -> bool {
|
338 + | matches!(self, Self::ModelTimeoutException(_))
|
339 + | }
|
340 + | /// Returns `true` if the error kind is `InvokeModelWithBidirectionalStreamOutputError::ServiceUnavailableException`.
|
341 + | pub fn is_service_unavailable_exception(&self) -> bool {
|
342 + | matches!(self, Self::ServiceUnavailableException(_))
|
343 + | }
|
370 344 | }
|
371 - | impl ::std::error::Error for InvokeModelWithBidirectionalStreamInputError {
|
345 + | impl ::std::error::Error for InvokeModelWithBidirectionalStreamOutputError {
|
372 346 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
373 347 | match self {
|
348 + | Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
|
349 + | Self::ModelStreamErrorException(_inner) => ::std::option::Option::Some(_inner),
|
350 + | Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
|
351 + | Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
|
352 + | Self::ModelTimeoutException(_inner) => ::std::option::Option::Some(_inner),
|
353 + | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
374 354 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
375 355 | }
|
376 356 | }
|
377 357 | }
|
378 - | impl ::std::fmt::Display for InvokeModelWithBidirectionalStreamInputError {
|
358 + | impl ::std::fmt::Display for InvokeModelWithBidirectionalStreamOutputError {
|
379 359 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
380 360 | match self {
|
361 + | Self::InternalServerException(_inner) => _inner.fmt(f),
|
362 + | Self::ModelStreamErrorException(_inner) => _inner.fmt(f),
|
363 + | Self::ValidationException(_inner) => _inner.fmt(f),
|
364 + | Self::ThrottlingException(_inner) => _inner.fmt(f),
|
365 + | Self::ModelTimeoutException(_inner) => _inner.fmt(f),
|
366 + | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
381 367 | Self::Unhandled(_inner) => {
|
382 368 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
383 369 | write!(f, "unhandled error ({code})")
|
384 370 | } else {
|
385 371 | f.write_str("unhandled error")
|
386 372 | }
|
387 373 | }
|
388 374 | }
|
389 375 | }
|
390 376 | }
|
391 - | impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeModelWithBidirectionalStreamInputError {
|
377 + | impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeModelWithBidirectionalStreamOutputError {
|
392 378 | fn code(&self) -> ::std::option::Option<&str> {
|
393 379 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
394 380 | }
|
395 381 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
396 382 | ::std::option::Option::None
|
397 383 | }
|
398 384 | }
|
399 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeModelWithBidirectionalStreamInputError {
|
385 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeModelWithBidirectionalStreamOutputError {
|
400 386 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
401 387 | match self {
|
388 + | Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
389 + | Self::ModelStreamErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
390 + | Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
391 + | Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
392 + | Self::ModelTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
393 + | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
402 394 | Self::Unhandled(_inner) => &_inner.meta,
|
403 395 | }
|
404 396 | }
|
405 397 | }
|
406 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeModelWithBidirectionalStreamInputError {
|
398 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeModelWithBidirectionalStreamOutputError {
|
407 399 | fn create_unhandled_error(
|
408 400 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
409 401 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
410 402 | ) -> Self {
|
411 403 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
412 404 | source,
|
413 405 | meta: meta.unwrap_or_default(),
|
414 406 | })
|
415 407 | }
|
416 408 | }
|
417 - | impl ::aws_types::request_id::RequestId for crate::types::error::InvokeModelWithBidirectionalStreamInputError {
|
409 + | impl ::aws_types::request_id::RequestId for crate::types::error::InvokeModelWithBidirectionalStreamOutputError {
|
418 410 | fn request_id(&self) -> Option<&str> {
|
419 411 | self.meta().request_id()
|
420 412 | }
|
421 413 | }
|
422 414 |
|
423 - | /// Error type for the `ConverseStreamOutputError` operation.
|
415 + | /// Error type for the `ResponseStreamError` operation.
|
424 416 | #[non_exhaustive]
|
425 417 | #[derive(::std::fmt::Debug)]
|
426 - | pub enum ConverseStreamOutputError {
|
418 + | pub enum ResponseStreamError {
|
427 419 | /// <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
428 420 | InternalServerException(crate::types::error::InternalServerException),
|
429 421 | /// <p>An error occurred while streaming the response. Retry your request.</p>
|
430 422 | ModelStreamErrorException(crate::types::error::ModelStreamErrorException),
|
431 423 | /// <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
432 424 | ValidationException(crate::types::error::ValidationException),
|
433 425 | /// <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
434 426 | ThrottlingException(crate::types::error::ThrottlingException),
|
427 + | /// <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
428 + | ModelTimeoutException(crate::types::error::ModelTimeoutException),
|
435 429 | /// <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
436 430 | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
437 431 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
438 432 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
439 433 | variable wildcard pattern and check `.code()`:
|
440 434 | \
|
441 435 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
442 436 | \
|
443 - | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ConverseStreamOutputError) for what information is available for the error.")]
|
437 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ResponseStreamError) for what information is available for the error.")]
|
444 438 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
445 439 | }
|
446 - | impl ConverseStreamOutputError {
|
447 - | /// Creates the `ConverseStreamOutputError::Unhandled` variant from any error type.
|
440 + | impl ResponseStreamError {
|
441 + | /// Creates the `ResponseStreamError::Unhandled` variant from any error type.
|
448 442 | pub fn unhandled(
|
449 443 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
450 444 | ) -> Self {
|
451 445 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
452 446 | source: err.into(),
|
453 447 | meta: ::std::default::Default::default(),
|
454 448 | })
|
455 449 | }
|
456 450 |
|
457 - | /// Creates the `ConverseStreamOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
451 + | /// Creates the `ResponseStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
458 452 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
459 453 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
460 454 | source: err.clone().into(),
|
461 455 | meta: err,
|
462 456 | })
|
463 457 | }
|
464 458 | ///
|
465 459 | /// Returns error metadata, which includes the error code, message,
|
466 460 | /// request ID, and potentially additional information.
|
467 461 | ///
|
468 462 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
469 463 | match self {
|
470 464 | Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
471 465 | Self::ModelStreamErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
472 466 | Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
473 467 | Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
468 + | Self::ModelTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
474 469 | Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
475 470 | Self::Unhandled(e) => &e.meta,
|
476 471 | }
|
477 472 | }
|
478 - | /// Returns `true` if the error kind is `ConverseStreamOutputError::InternalServerException`.
|
473 + | /// Returns `true` if the error kind is `ResponseStreamError::InternalServerException`.
|
479 474 | pub fn is_internal_server_exception(&self) -> bool {
|
480 475 | matches!(self, Self::InternalServerException(_))
|
481 476 | }
|
482 - | /// Returns `true` if the error kind is `ConverseStreamOutputError::ModelStreamErrorException`.
|
477 + | /// Returns `true` if the error kind is `ResponseStreamError::ModelStreamErrorException`.
|
483 478 | pub fn is_model_stream_error_exception(&self) -> bool {
|
484 479 | matches!(self, Self::ModelStreamErrorException(_))
|
485 480 | }
|
486 - | /// Returns `true` if the error kind is `ConverseStreamOutputError::ValidationException`.
|
481 + | /// Returns `true` if the error kind is `ResponseStreamError::ValidationException`.
|
487 482 | pub fn is_validation_exception(&self) -> bool {
|
488 483 | matches!(self, Self::ValidationException(_))
|
489 484 | }
|
490 - | /// Returns `true` if the error kind is `ConverseStreamOutputError::ThrottlingException`.
|
485 + | /// Returns `true` if the error kind is `ResponseStreamError::ThrottlingException`.
|
491 486 | pub fn is_throttling_exception(&self) -> bool {
|
492 487 | matches!(self, Self::ThrottlingException(_))
|
493 488 | }
|
494 - | /// Returns `true` if the error kind is `ConverseStreamOutputError::ServiceUnavailableException`.
|
489 + | /// Returns `true` if the error kind is `ResponseStreamError::ModelTimeoutException`.
|
490 + | pub fn is_model_timeout_exception(&self) -> bool {
|
491 + | matches!(self, Self::ModelTimeoutException(_))
|
492 + | }
|
493 + | /// Returns `true` if the error kind is `ResponseStreamError::ServiceUnavailableException`.
|
495 494 | pub fn is_service_unavailable_exception(&self) -> bool {
|
496 495 | matches!(self, Self::ServiceUnavailableException(_))
|
497 496 | }
|
498 497 | }
|
499 - | impl ::std::error::Error for ConverseStreamOutputError {
|
498 + | impl ::std::error::Error for ResponseStreamError {
|
500 499 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
501 500 | match self {
|
502 501 | Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
|
503 502 | Self::ModelStreamErrorException(_inner) => ::std::option::Option::Some(_inner),
|
504 503 | Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
|
505 504 | Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
|
505 + | Self::ModelTimeoutException(_inner) => ::std::option::Option::Some(_inner),
|
506 506 | Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
|
507 507 | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
508 508 | }
|
509 509 | }
|
510 510 | }
|
511 - | impl ::std::fmt::Display for ConverseStreamOutputError {
|
511 + | impl ::std::fmt::Display for ResponseStreamError {
|
512 512 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
513 513 | match self {
|
514 514 | Self::InternalServerException(_inner) => _inner.fmt(f),
|
515 515 | Self::ModelStreamErrorException(_inner) => _inner.fmt(f),
|
516 516 | Self::ValidationException(_inner) => _inner.fmt(f),
|
517 517 | Self::ThrottlingException(_inner) => _inner.fmt(f),
|
518 + | Self::ModelTimeoutException(_inner) => _inner.fmt(f),
|
518 519 | Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
|
519 520 | Self::Unhandled(_inner) => {
|
520 521 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
521 522 | write!(f, "unhandled error ({code})")
|
522 523 | } else {
|
523 524 | f.write_str("unhandled error")
|
524 525 | }
|
525 526 | }
|
526 527 | }
|
527 528 | }
|
528 529 | }
|
529 - | impl ::aws_smithy_types::retry::ProvideErrorKind for ConverseStreamOutputError {
|
530 + | impl ::aws_smithy_types::retry::ProvideErrorKind for ResponseStreamError {
|
530 531 | fn code(&self) -> ::std::option::Option<&str> {
|
531 532 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
532 533 | }
|
533 534 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
534 535 | ::std::option::Option::None
|
535 536 | }
|
536 537 | }
|
537 - | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConverseStreamOutputError {
|
538 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResponseStreamError {
|
538 539 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
539 540 | match self {
|
540 541 | Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
541 542 | Self::ModelStreamErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
542 543 | Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
543 544 | Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
545 + | Self::ModelTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
544 546 | Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
545 547 | Self::Unhandled(_inner) => &_inner.meta,
|
546 548 | }
|
547 549 | }
|
548 550 | }
|
549 - | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ConverseStreamOutputError {
|
551 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ResponseStreamError {
|
550 552 | fn create_unhandled_error(
|
551 553 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
552 554 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
553 555 | ) -> Self {
|
554 556 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
555 557 | source,
|
556 558 | meta: meta.unwrap_or_default(),
|
557 559 | })
|
558 560 | }
|
559 561 | }
|
560 - | impl ::aws_types::request_id::RequestId for crate::types::error::ConverseStreamOutputError {
|
562 + | impl ::aws_types::request_id::RequestId for crate::types::error::ResponseStreamError {
|
561 563 | fn request_id(&self) -> Option<&str> {
|
562 564 | self.meta().request_id()
|
563 565 | }
|
564 566 | }
|
565 567 |
|
566 - | pub use crate::types::error::_conflict_exception::ConflictException;
|
567 - |
|
568 568 | mod _access_denied_exception;
|
569 569 |
|
570 570 | mod _conflict_exception;
|
571 571 |
|
572 572 | mod _internal_server_exception;
|
573 573 |
|
574 574 | mod _model_error_exception;
|
575 575 |
|
576 576 | mod _model_not_ready_exception;
|
577 577 |
|