1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// This error is thrown when a request is invalid.
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
|
4 + | /* RustType.kt:516 */
|
4 5 | #[non_exhaustive]
|
6 + | /* RustType.kt:516 */
|
5 7 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 - | pub struct ComplexError {
|
8 + | pub /* StructureGenerator.kt:201 */ struct ComplexError {
|
9 + | /* StructureGenerator.kt:231 */
|
7 10 | #[allow(missing_docs)] // documentation missing in model
|
8 11 | pub header: ::std::option::Option<::std::string::String>,
|
12 + | /* StructureGenerator.kt:231 */
|
9 13 | #[allow(missing_docs)] // documentation missing in model
|
10 14 | pub top_level: ::std::option::Option<::std::string::String>,
|
15 + | /* StructureGenerator.kt:231 */
|
11 16 | #[allow(missing_docs)] // documentation missing in model
|
12 17 | pub nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
|
18 + | /* StructureGenerator.kt:231 */
|
13 19 | #[allow(missing_docs)] // documentation missing in model
|
14 20 | pub message: ::std::option::Option<::std::string::String>,
|
15 - | pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
21 + | /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
22 + | /* StructureGenerator.kt:201 */
|
16 23 | }
|
24 + | /* StructureGenerator.kt:135 */
|
17 25 | impl ComplexError {
|
26 + | /* StructureGenerator.kt:231 */
|
18 27 | #[allow(missing_docs)] // documentation missing in model
|
28 + | /* StructureGenerator.kt:166 */
|
19 29 | pub fn header(&self) -> ::std::option::Option<&str> {
|
30 + | /* StructureGenerator.kt:169 */
|
20 31 | self.header.as_deref()
|
32 + | /* StructureGenerator.kt:166 */
|
21 33 | }
|
34 + | /* StructureGenerator.kt:231 */
|
22 35 | #[allow(missing_docs)] // documentation missing in model
|
36 + | /* StructureGenerator.kt:166 */
|
23 37 | pub fn top_level(&self) -> ::std::option::Option<&str> {
|
38 + | /* StructureGenerator.kt:169 */
|
24 39 | self.top_level.as_deref()
|
40 + | /* StructureGenerator.kt:166 */
|
25 41 | }
|
42 + | /* StructureGenerator.kt:231 */
|
26 43 | #[allow(missing_docs)] // documentation missing in model
|
44 + | /* StructureGenerator.kt:166 */
|
27 45 | pub fn nested(&self) -> ::std::option::Option<&crate::types::ComplexNestedErrorData> {
|
46 + | /* StructureGenerator.kt:170 */
|
28 47 | self.nested.as_ref()
|
48 + | /* StructureGenerator.kt:166 */
|
29 49 | }
|
50 + | /* StructureGenerator.kt:135 */
|
30 51 | }
|
52 + | /* ErrorImplGenerator.kt:99 */
|
31 53 | impl ComplexError {
|
54 + | /* ErrorImplGenerator.kt:128 */
|
32 55 | /// Returns the error message.
|
33 56 | pub fn message(&self) -> ::std::option::Option<&str> {
|
34 57 | self.message.as_deref()
|
35 58 | }
|
59 + | /* ErrorImplGenerator.kt:99 */
|
36 60 | }
|
61 + | /* ErrorImplGenerator.kt:153 */
|
37 62 | impl ::std::fmt::Display for ComplexError {
|
63 + | /* ErrorImplGenerator.kt:154 */
|
38 64 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
65 + | /* ErrorImplGenerator.kt:161 */
|
39 66 | ::std::write!(f, "ComplexError")?;
|
67 + | /* ErrorImplGenerator.kt:166 */
|
40 68 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
69 + | /* ErrorImplGenerator.kt:166 */
|
41 70 | {
|
71 + | /* ErrorImplGenerator.kt:167 */
|
42 72 | ::std::write!(f, ": {}", inner_1)?;
|
73 + | /* ErrorImplGenerator.kt:166 */
|
43 74 | }
|
75 + | /* ErrorImplGenerator.kt:166 */
|
44 76 | }
|
77 + | /* ErrorImplGenerator.kt:171 */
|
45 78 | Ok(())
|
79 + | /* ErrorImplGenerator.kt:154 */
|
46 80 | }
|
81 + | /* ErrorImplGenerator.kt:153 */
|
47 82 | }
|
83 + | /* ErrorImplGenerator.kt:175 */
|
48 84 | impl ::std::error::Error for ComplexError {}
|
85 + | /* ErrorGenerator.kt:77 */
|
49 86 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ComplexError {
|
87 + | /* ErrorGenerator.kt:78 */
|
50 88 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
51 89 | &self.meta
|
52 90 | }
|
91 + | /* ErrorGenerator.kt:77 */
|
53 92 | }
|
93 + | /* ErrorGenerator.kt:81 */
|
54 94 | impl ComplexError {
|
55 - | /// Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
|
95 + | /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
|
96 + | /* BuilderGenerator.kt:175 */
|
56 97 | pub fn builder() -> crate::types::error::builders::ComplexErrorBuilder {
|
98 + | /* BuilderGenerator.kt:176 */
|
57 99 | crate::types::error::builders::ComplexErrorBuilder::default()
|
100 + | /* BuilderGenerator.kt:175 */
|
58 101 | }
|
102 + | /* ErrorGenerator.kt:81 */
|
59 103 | }
|
60 104 |
|
61 - | /// A builder for [`ComplexError`](crate::types::error::ComplexError).
|
105 + | /// /* BuilderGenerator.kt:342 */A builder for [`ComplexError`](crate::types::error::ComplexError).
|
106 + | /* RustType.kt:516 */
|
62 107 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
108 + | /* RustType.kt:516 */
|
63 109 | #[non_exhaustive]
|
110 + | /* BuilderGenerator.kt:345 */
|
64 111 | pub struct ComplexErrorBuilder {
|
65 - | pub(crate) header: ::std::option::Option<::std::string::String>,
|
66 - | pub(crate) top_level: ::std::option::Option<::std::string::String>,
|
67 - | pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
|
68 - | pub(crate) message: ::std::option::Option<::std::string::String>,
|
69 - | meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
112 + | /* BuilderGenerator.kt:275 */ pub(crate) header: ::std::option::Option<::std::string::String>,
|
113 + | /* BuilderGenerator.kt:275 */ pub(crate) top_level: ::std::option::Option<::std::string::String>,
|
114 + | /* BuilderGenerator.kt:275 */ pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
|
115 + | /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
|
116 + | /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
117 + | /* BuilderGenerator.kt:345 */
|
70 118 | }
|
119 + | /* BuilderGenerator.kt:355 */
|
71 120 | impl ComplexErrorBuilder {
|
121 + | /* BuilderGenerator.kt:286 */
|
72 122 | #[allow(missing_docs)] // documentation missing in model
|
123 + | /* BuilderGenerator.kt:291 */
|
73 124 | pub fn header(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
125 + | /* BuilderGenerator.kt:292 */
|
74 126 | self.header = ::std::option::Option::Some(input.into());
|
127 + | /* BuilderGenerator.kt:293 */
|
75 128 | self
|
129 + | /* BuilderGenerator.kt:291 */
|
76 130 | }
|
131 + | /* BuilderGenerator.kt:312 */
|
77 132 | #[allow(missing_docs)] // documentation missing in model
|
133 + | /* BuilderGenerator.kt:314 */
|
78 134 | pub fn set_header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
135 + | /* BuilderGenerator.kt:315 */
|
79 136 | self.header = input;
|
80 137 | self
|
138 + | /* BuilderGenerator.kt:314 */
|
81 139 | }
|
140 + | /* BuilderGenerator.kt:334 */
|
82 141 | #[allow(missing_docs)] // documentation missing in model
|
142 + | /* BuilderGenerator.kt:336 */
|
83 143 | pub fn get_header(&self) -> &::std::option::Option<::std::string::String> {
|
144 + | /* BuilderGenerator.kt:337 */
|
84 145 | &self.header
|
146 + | /* BuilderGenerator.kt:336 */
|
85 147 | }
|
148 + | /* BuilderGenerator.kt:286 */
|
86 149 | #[allow(missing_docs)] // documentation missing in model
|
150 + | /* BuilderGenerator.kt:291 */
|
87 151 | pub fn top_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
152 + | /* BuilderGenerator.kt:292 */
|
88 153 | self.top_level = ::std::option::Option::Some(input.into());
|
154 + | /* BuilderGenerator.kt:293 */
|
89 155 | self
|
156 + | /* BuilderGenerator.kt:291 */
|
90 157 | }
|
158 + | /* BuilderGenerator.kt:312 */
|
91 159 | #[allow(missing_docs)] // documentation missing in model
|
160 + | /* BuilderGenerator.kt:314 */
|
92 161 | pub fn set_top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
162 + | /* BuilderGenerator.kt:315 */
|
93 163 | self.top_level = input;
|
94 164 | self
|
165 + | /* BuilderGenerator.kt:314 */
|
95 166 | }
|
167 + | /* BuilderGenerator.kt:334 */
|
96 168 | #[allow(missing_docs)] // documentation missing in model
|
169 + | /* BuilderGenerator.kt:336 */
|
97 170 | pub fn get_top_level(&self) -> &::std::option::Option<::std::string::String> {
|
171 + | /* BuilderGenerator.kt:337 */
|
98 172 | &self.top_level
|
173 + | /* BuilderGenerator.kt:336 */
|
99 174 | }
|
175 + | /* BuilderGenerator.kt:286 */
|
100 176 | #[allow(missing_docs)] // documentation missing in model
|
177 + | /* BuilderGenerator.kt:291 */
|
101 178 | pub fn nested(mut self, input: crate::types::ComplexNestedErrorData) -> Self {
|
179 + | /* BuilderGenerator.kt:292 */
|
102 180 | self.nested = ::std::option::Option::Some(input);
|
181 + | /* BuilderGenerator.kt:293 */
|
103 182 | self
|
183 + | /* BuilderGenerator.kt:291 */
|
104 184 | }
|
185 + | /* BuilderGenerator.kt:312 */
|
105 186 | #[allow(missing_docs)] // documentation missing in model
|
187 + | /* BuilderGenerator.kt:314 */
|
106 188 | pub fn set_nested(mut self, input: ::std::option::Option<crate::types::ComplexNestedErrorData>) -> Self {
|
189 + | /* BuilderGenerator.kt:315 */
|
107 190 | self.nested = input;
|
108 191 | self
|
192 + | /* BuilderGenerator.kt:314 */
|
109 193 | }
|
194 + | /* BuilderGenerator.kt:334 */
|
110 195 | #[allow(missing_docs)] // documentation missing in model
|
196 + | /* BuilderGenerator.kt:336 */
|
111 197 | pub fn get_nested(&self) -> &::std::option::Option<crate::types::ComplexNestedErrorData> {
|
198 + | /* BuilderGenerator.kt:337 */
|
112 199 | &self.nested
|
200 + | /* BuilderGenerator.kt:336 */
|
113 201 | }
|
202 + | /* BuilderGenerator.kt:286 */
|
114 203 | #[allow(missing_docs)] // documentation missing in model
|
204 + | /* BuilderGenerator.kt:291 */
|
115 205 | pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
206 + | /* BuilderGenerator.kt:292 */
|
116 207 | self.message = ::std::option::Option::Some(input.into());
|
208 + | /* BuilderGenerator.kt:293 */
|
117 209 | self
|
210 + | /* BuilderGenerator.kt:291 */
|
118 211 | }
|
212 + | /* BuilderGenerator.kt:312 */
|
119 213 | #[allow(missing_docs)] // documentation missing in model
|
214 + | /* BuilderGenerator.kt:314 */
|
120 215 | pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
216 + | /* BuilderGenerator.kt:315 */
|
121 217 | self.message = input;
|
122 218 | self
|
219 + | /* BuilderGenerator.kt:314 */
|
123 220 | }
|
221 + | /* BuilderGenerator.kt:334 */
|
124 222 | #[allow(missing_docs)] // documentation missing in model
|
223 + | /* BuilderGenerator.kt:336 */
|
125 224 | pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
|
225 + | /* BuilderGenerator.kt:337 */
|
126 226 | &self.message
|
227 + | /* BuilderGenerator.kt:336 */
|
127 228 | }
|
229 + | /* ErrorGenerator.kt:101 */
|
128 230 | /// Sets error metadata
|
129 231 | pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
130 232 | self.meta = Some(meta);
|
131 233 | self
|
132 234 | }
|
133 235 |
|
134 236 | /// Sets error metadata
|
135 237 | pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
|
136 238 | self.meta = meta;
|
137 239 | self
|
138 240 | }
|
139 - | /// Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
|
241 + | /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
|
242 + | /* BuilderGenerator.kt:253 */
|
140 243 | pub fn build(self) -> crate::types::error::ComplexError {
|
244 + | /* BuilderGenerator.kt:477 */
|
141 245 | crate::types::error::ComplexError {
|
142 - | header: self.header,
|
246 + | /* BuilderGenerator.kt:481 */ header: self.header,
|
247 + | /* BuilderGenerator.kt:481 */
|
143 248 | top_level: self.top_level,
|
249 + | /* BuilderGenerator.kt:481 */
|
144 250 | nested: self.nested,
|
251 + | /* BuilderGenerator.kt:481 */
|
145 252 | message: self.message,
|
253 + | /* ErrorGenerator.kt:120 */
|
146 254 | meta: self.meta.unwrap_or_default(),
|
255 + | /* BuilderGenerator.kt:477 */
|
147 256 | }
|
257 + | /* BuilderGenerator.kt:253 */
|
148 258 | }
|
259 + | /* BuilderGenerator.kt:355 */
|
149 260 | }
|