1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | /// Error type for the `RPCEcho` operation.
|
3 - | /// Each variant represents an error that can occur for the `RPCEcho` operation.
|
2 + | /// Error type for the `ReservedWordsAsMembers` operation.
|
3 + | /// Each variant represents an error that can occur for the `ReservedWordsAsMembers` operation.
|
4 4 | #[derive(::std::fmt::Debug)]
|
5 - | pub enum RPCEchoError {
|
5 + | pub enum ReservedWordsAsMembersError {
|
6 6 | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
7 7 | ValidationException(crate::error::ValidationException),
|
8 8 | }
|
9 - | impl ::std::fmt::Display for RPCEchoError {
|
9 + | impl ::std::fmt::Display for ReservedWordsAsMembersError {
|
10 10 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
11 11 | match &self {
|
12 - | RPCEchoError::ValidationException(_inner) => _inner.fmt(f),
|
12 + | ReservedWordsAsMembersError::ValidationException(_inner) => _inner.fmt(f),
|
13 13 | }
|
14 14 | }
|
15 15 | }
|
16 - | impl RPCEchoError {
|
17 - | /// Returns `true` if the error kind is `RPCEchoError::ValidationException`.
|
16 + | impl ReservedWordsAsMembersError {
|
17 + | /// Returns `true` if the error kind is `ReservedWordsAsMembersError::ValidationException`.
|
18 18 | pub fn is_validation_exception(&self) -> bool {
|
19 - | matches!(&self, RPCEchoError::ValidationException(_))
|
19 + | matches!(&self, ReservedWordsAsMembersError::ValidationException(_))
|
20 20 | }
|
21 21 | /// Returns the error name string by matching the correct variant.
|
22 22 | pub fn name(&self) -> &'static str {
|
23 23 | match &self {
|
24 - | RPCEchoError::ValidationException(_inner) => _inner.name(),
|
24 + | ReservedWordsAsMembersError::ValidationException(_inner) => _inner.name(),
|
25 25 | }
|
26 26 | }
|
27 27 | }
|
28 - | impl ::std::error::Error for RPCEchoError {
|
28 + | impl ::std::error::Error for ReservedWordsAsMembersError {
|
29 29 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
30 30 | match &self {
|
31 - | RPCEchoError::ValidationException(_inner) => Some(_inner),
|
31 + | ReservedWordsAsMembersError::ValidationException(_inner) => Some(_inner),
|
32 32 | }
|
33 33 | }
|
34 34 | }
|
35 - | impl ::std::convert::From<crate::error::ValidationException> for crate::error::RPCEchoError {
|
36 - | fn from(variant: crate::error::ValidationException) -> crate::error::RPCEchoError {
|
35 + | impl ::std::convert::From<crate::error::ValidationException>
|
36 + | for crate::error::ReservedWordsAsMembersError
|
37 + | {
|
38 + | fn from(
|
39 + | variant: crate::error::ValidationException,
|
40 + | ) -> crate::error::ReservedWordsAsMembersError {
|
37 41 | Self::ValidationException(variant)
|
38 42 | }
|
39 43 | }
|
40 44 |
|
41 - | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
42 - | #[derive(
|
43 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
44 - | )]
|
45 - | pub struct ValidationException {
|
46 - | /// A summary of the validation failure.
|
47 - | pub message: ::std::string::String,
|
48 - | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
49 - | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
45 + | /// Error type for the `ErrCollisions` operation.
|
46 + | /// Each variant represents an error that can occur for the `ErrCollisions` operation.
|
47 + | #[derive(::std::fmt::Debug)]
|
48 + | pub enum ErrCollisionsError {
|
49 + | #[allow(missing_docs)] // documentation missing in model
|
50 + | CollidingError(crate::error::CollidingError),
|
51 + | /// This will be renamed to CollidingError
|
52 + | CollidingException(crate::error::CollidingException),
|
50 53 | }
|
51 - | impl ValidationException {
|
52 - | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
53 - | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
54 - | self.field_list.as_deref()
|
54 + | impl ::std::fmt::Display for ErrCollisionsError {
|
55 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
56 + | match &self {
|
57 + | ErrCollisionsError::CollidingError(_inner) => _inner.fmt(f),
|
58 + | ErrCollisionsError::CollidingException(_inner) => _inner.fmt(f),
|
59 + | }
|
55 60 | }
|
56 61 | }
|
57 - | impl ValidationException {
|
58 - | /// Returns the error message.
|
59 - | pub fn message(&self) -> &str {
|
60 - | &self.message
|
62 + | impl ErrCollisionsError {
|
63 + | /// Returns `true` if the error kind is `ErrCollisionsError::CollidingError`.
|
64 + | pub fn is_colliding_error(&self) -> bool {
|
65 + | matches!(&self, ErrCollisionsError::CollidingError(_))
|
61 66 | }
|
62 - | #[doc(hidden)]
|
63 - | /// Returns the error name.
|
67 + | /// Returns `true` if the error kind is `ErrCollisionsError::CollidingException`.
|
68 + | pub fn is_colliding_exception(&self) -> bool {
|
69 + | matches!(&self, ErrCollisionsError::CollidingException(_))
|
70 + | }
|
71 + | /// Returns the error name string by matching the correct variant.
|
64 72 | pub fn name(&self) -> &'static str {
|
65 - | "ValidationException"
|
73 + | match &self {
|
74 + | ErrCollisionsError::CollidingError(_inner) => _inner.name(),
|
75 + | ErrCollisionsError::CollidingException(_inner) => _inner.name(),
|
76 + | }
|
66 77 | }
|
67 78 | }
|
68 - | impl ::std::fmt::Display for ValidationException {
|
69 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
70 - | ::std::write!(f, "ValidationException")?;
|
71 - | {
|
72 - | ::std::write!(f, ": {}", &self.message)?;
|
79 + | impl ::std::error::Error for ErrCollisionsError {
|
80 + | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
81 + | match &self {
|
82 + | ErrCollisionsError::CollidingError(_inner) => Some(_inner),
|
83 + | ErrCollisionsError::CollidingException(_inner) => Some(_inner),
|
73 84 | }
|
74 - | Ok(())
|
75 85 | }
|
76 86 | }
|
77 - | impl ::std::error::Error for ValidationException {}
|
78 - | impl ValidationException {
|
79 - | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
80 - | pub fn builder() -> crate::error::validation_exception::Builder {
|
81 - | crate::error::validation_exception::Builder::default()
|
87 + | impl ::std::convert::From<crate::error::CollidingError> for crate::error::ErrCollisionsError {
|
88 + | fn from(variant: crate::error::CollidingError) -> crate::error::ErrCollisionsError {
|
89 + | Self::CollidingError(variant)
|
90 + | }
|
91 + | }
|
92 + | impl ::std::convert::From<crate::error::CollidingException> for crate::error::ErrCollisionsError {
|
93 + | fn from(variant: crate::error::CollidingException) -> crate::error::ErrCollisionsError {
|
94 + | Self::CollidingException(variant)
|
82 95 | }
|
83 96 | }
|
84 97 |
|
85 98 | /// Error type for the `Match` operation.
|
86 99 | /// Each variant represents an error that can occur for the `Match` operation.
|
87 100 | #[derive(::std::fmt::Debug)]
|
88 101 | pub enum MatchError {
|
89 102 | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
90 103 | ValidationException(crate::error::ValidationException),
|
91 104 | }
|
92 105 | impl ::std::fmt::Display for MatchError {
|
93 106 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
94 107 | match &self {
|
95 108 | MatchError::ValidationException(_inner) => _inner.fmt(f),
|
96 109 | }
|
97 110 | }
|
98 111 | }
|
99 112 | impl MatchError {
|
100 113 | /// Returns `true` if the error kind is `MatchError::ValidationException`.
|
101 114 | pub fn is_validation_exception(&self) -> bool {
|
102 115 | matches!(&self, MatchError::ValidationException(_))
|
103 116 | }
|
104 117 | /// Returns the error name string by matching the correct variant.
|
105 118 | pub fn name(&self) -> &'static str {
|
106 119 | match &self {
|
107 120 | MatchError::ValidationException(_inner) => _inner.name(),
|
108 121 | }
|
109 122 | }
|
110 123 | }
|
111 124 | impl ::std::error::Error for MatchError {
|
112 125 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
113 126 | match &self {
|
114 127 | MatchError::ValidationException(_inner) => Some(_inner),
|
115 128 | }
|
116 129 | }
|
117 130 | }
|
118 131 | impl ::std::convert::From<crate::error::ValidationException> for crate::error::MatchError {
|
119 132 | fn from(variant: crate::error::ValidationException) -> crate::error::MatchError {
|
120 133 | Self::ValidationException(variant)
|
121 134 | }
|
122 135 | }
|
123 136 |
|
124 - | /// Error type for the `ErrCollisions` operation.
|
125 - | /// Each variant represents an error that can occur for the `ErrCollisions` operation.
|
137 + | /// Error type for the `RPCEcho` operation.
|
138 + | /// Each variant represents an error that can occur for the `RPCEcho` operation.
|
126 139 | #[derive(::std::fmt::Debug)]
|
127 - | pub enum ErrCollisionsError {
|
128 - | #[allow(missing_docs)] // documentation missing in model
|
129 - | CollidingError(crate::error::CollidingError),
|
130 - | /// This will be renamed to CollidingError
|
131 - | CollidingException(crate::error::CollidingException),
|
140 + | pub enum RPCEchoError {
|
141 + | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
142 + | ValidationException(crate::error::ValidationException),
|
132 143 | }
|
133 - | impl ::std::fmt::Display for ErrCollisionsError {
|
144 + | impl ::std::fmt::Display for RPCEchoError {
|
134 145 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
135 146 | match &self {
|
136 - | ErrCollisionsError::CollidingError(_inner) => _inner.fmt(f),
|
137 - | ErrCollisionsError::CollidingException(_inner) => _inner.fmt(f),
|
147 + | RPCEchoError::ValidationException(_inner) => _inner.fmt(f),
|
138 148 | }
|
139 149 | }
|
140 150 | }
|
141 - | impl ErrCollisionsError {
|
142 - | /// Returns `true` if the error kind is `ErrCollisionsError::CollidingError`.
|
143 - | pub fn is_colliding_error(&self) -> bool {
|
144 - | matches!(&self, ErrCollisionsError::CollidingError(_))
|
145 - | }
|
146 - | /// Returns `true` if the error kind is `ErrCollisionsError::CollidingException`.
|
147 - | pub fn is_colliding_exception(&self) -> bool {
|
148 - | matches!(&self, ErrCollisionsError::CollidingException(_))
|
151 + | impl RPCEchoError {
|
152 + | /// Returns `true` if the error kind is `RPCEchoError::ValidationException`.
|
153 + | pub fn is_validation_exception(&self) -> bool {
|
154 + | matches!(&self, RPCEchoError::ValidationException(_))
|
149 155 | }
|
150 156 | /// Returns the error name string by matching the correct variant.
|
151 157 | pub fn name(&self) -> &'static str {
|
152 158 | match &self {
|
153 - | ErrCollisionsError::CollidingError(_inner) => _inner.name(),
|
154 - | ErrCollisionsError::CollidingException(_inner) => _inner.name(),
|
159 + | RPCEchoError::ValidationException(_inner) => _inner.name(),
|
155 160 | }
|
156 161 | }
|
157 162 | }
|
158 - | impl ::std::error::Error for ErrCollisionsError {
|
163 + | impl ::std::error::Error for RPCEchoError {
|
159 164 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
160 165 | match &self {
|
161 - | ErrCollisionsError::CollidingError(_inner) => Some(_inner),
|
162 - | ErrCollisionsError::CollidingException(_inner) => Some(_inner),
|
166 + | RPCEchoError::ValidationException(_inner) => Some(_inner),
|
163 167 | }
|
164 168 | }
|
165 169 | }
|
166 - | impl ::std::convert::From<crate::error::CollidingError> for crate::error::ErrCollisionsError {
|
167 - | fn from(variant: crate::error::CollidingError) -> crate::error::ErrCollisionsError {
|
168 - | Self::CollidingError(variant)
|
169 - | }
|
170 - | }
|
171 - | impl ::std::convert::From<crate::error::CollidingException> for crate::error::ErrCollisionsError {
|
172 - | fn from(variant: crate::error::CollidingException) -> crate::error::ErrCollisionsError {
|
173 - | Self::CollidingException(variant)
|
170 + | impl ::std::convert::From<crate::error::ValidationException> for crate::error::RPCEchoError {
|
171 + | fn from(variant: crate::error::ValidationException) -> crate::error::RPCEchoError {
|
172 + | Self::ValidationException(variant)
|
174 173 | }
|
175 174 | }
|
176 175 |
|
177 - | /// This will be renamed to CollidingError
|
176 + | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
178 177 | #[derive(
|
179 178 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
180 179 | )]
|
181 - | pub struct CollidingException {}
|
182 - | impl CollidingException {
|
180 + | pub struct ValidationException {
|
181 + | /// A summary of the validation failure.
|
182 + | pub message: ::std::string::String,
|
183 + | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
184 + | pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
|
185 + | }
|
186 + | impl ValidationException {
|
187 + | /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
|
188 + | pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
|
189 + | self.field_list.as_deref()
|
190 + | }
|
191 + | }
|
192 + | impl ValidationException {
|
193 + | /// Returns the error message.
|
194 + | pub fn message(&self) -> &str {
|
195 + | &self.message
|
196 + | }
|
183 197 | #[doc(hidden)]
|
184 198 | /// Returns the error name.
|
185 199 | pub fn name(&self) -> &'static str {
|
186 - | "CollidingException"
|
200 + | "ValidationException"
|
187 201 | }
|
188 202 | }
|
189 - | impl ::std::fmt::Display for CollidingException {
|
203 + | impl ::std::fmt::Display for ValidationException {
|
190 204 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
191 - | ::std::write!(f, "CollidingException")?;
|
205 + | ::std::write!(f, "ValidationException")?;
|
206 + | {
|
207 + | ::std::write!(f, ": {}", &self.message)?;
|
208 + | }
|
192 209 | Ok(())
|
193 210 | }
|
194 211 | }
|
195 - | impl ::std::error::Error for CollidingException {}
|
196 - | impl CollidingException {
|
197 - | /// Creates a new builder-style object to manufacture [`CollidingException`](crate::error::CollidingException).
|
198 - | pub fn builder() -> crate::error::colliding_exception::Builder {
|
199 - | crate::error::colliding_exception::Builder::default()
|
212 + | impl ::std::error::Error for ValidationException {}
|
213 + | impl ValidationException {
|
214 + | /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
|
215 + | pub fn builder() -> crate::error::validation_exception::Builder {
|
216 + | crate::error::validation_exception::Builder::default()
|
200 217 | }
|
201 218 | }
|
202 219 |
|
203 220 | #[allow(missing_docs)] // documentation missing in model
|
204 221 | #[derive(
|
205 222 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
206 223 | )]
|
207 224 | pub struct CollidingError {}
|
208 225 | impl CollidingError {
|
209 226 | #[doc(hidden)]
|
210 227 | /// Returns the error name.
|
211 228 | pub fn name(&self) -> &'static str {
|
212 229 | "CollidingError"
|
213 230 | }
|
214 231 | }
|
215 232 | impl ::std::fmt::Display for CollidingError {
|
216 233 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
217 234 | ::std::write!(f, "CollidingError")?;
|
218 235 | Ok(())
|
219 236 | }
|
220 237 | }
|
221 238 | impl ::std::error::Error for CollidingError {}
|
222 239 | impl CollidingError {
|
223 240 | /// Creates a new builder-style object to manufacture [`CollidingError`](crate::error::CollidingError).
|
224 241 | pub fn builder() -> crate::error::colliding_error::Builder {
|
225 242 | crate::error::colliding_error::Builder::default()
|
226 243 | }
|
227 244 | }
|
228 245 |
|
229 - | /// Error type for the `ReservedWordsAsMembers` operation.
|
230 - | /// Each variant represents an error that can occur for the `ReservedWordsAsMembers` operation.
|
231 - | #[derive(::std::fmt::Debug)]
|
232 - | pub enum ReservedWordsAsMembersError {
|
233 - | /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
|
234 - | ValidationException(crate::error::ValidationException),
|
235 - | }
|
236 - | impl ::std::fmt::Display for ReservedWordsAsMembersError {
|
237 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
238 - | match &self {
|
239 - | ReservedWordsAsMembersError::ValidationException(_inner) => _inner.fmt(f),
|
240 - | }
|
241 - | }
|
242 - | }
|
243 - | impl ReservedWordsAsMembersError {
|
244 - | /// Returns `true` if the error kind is `ReservedWordsAsMembersError::ValidationException`.
|
245 - | pub fn is_validation_exception(&self) -> bool {
|
246 - | matches!(&self, ReservedWordsAsMembersError::ValidationException(_))
|
247 - | }
|
248 - | /// Returns the error name string by matching the correct variant.
|
246 + | /// This will be renamed to CollidingError
|
247 + | #[derive(
|
248 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
249 + | )]
|
250 + | pub struct CollidingException {}
|
251 + | impl CollidingException {
|
252 + | #[doc(hidden)]
|
253 + | /// Returns the error name.
|
249 254 | pub fn name(&self) -> &'static str {
|
250 - | match &self {
|
251 - | ReservedWordsAsMembersError::ValidationException(_inner) => _inner.name(),
|
252 - | }
|
255 + | "CollidingException"
|
253 256 | }
|
254 257 | }
|
255 - | impl ::std::error::Error for ReservedWordsAsMembersError {
|
256 - | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
257 - | match &self {
|
258 - | ReservedWordsAsMembersError::ValidationException(_inner) => Some(_inner),
|
259 - | }
|
258 + | impl ::std::fmt::Display for CollidingException {
|
259 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
260 + | ::std::write!(f, "CollidingException")?;
|
261 + | Ok(())
|
260 262 | }
|
261 263 | }
|
262 - | impl ::std::convert::From<crate::error::ValidationException>
|
263 - | for crate::error::ReservedWordsAsMembersError
|
264 - | {
|
265 - | fn from(
|
266 - | variant: crate::error::ValidationException,
|
267 - | ) -> crate::error::ReservedWordsAsMembersError {
|
268 - | Self::ValidationException(variant)
|
264 + | impl ::std::error::Error for CollidingException {}
|
265 + | impl CollidingException {
|
266 + | /// Creates a new builder-style object to manufacture [`CollidingException`](crate::error::CollidingException).
|
267 + | pub fn builder() -> crate::error::colliding_exception::Builder {
|
268 + | crate::error::colliding_exception::Builder::default()
|
269 269 | }
|
270 270 | }
|
271 271 | /// See [`ValidationException`](crate::error::ValidationException).
|
272 272 | pub mod validation_exception {
|
273 273 |
|
274 274 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
275 275 | /// Holds one variant for each of the ways the builder can fail.
|
276 276 | #[non_exhaustive]
|
277 277 | #[allow(clippy::enum_variant_names)]
|
278 278 | pub enum ConstraintViolation {
|