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 top_level: ::std::option::Option<::std::string::String>,
|
12 + | /* StructureGenerator.kt:231 */
|
9 13 | #[allow(missing_docs)] // documentation missing in model
|
10 14 | pub nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
|
11 - | pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
15 + | /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
16 + | /* StructureGenerator.kt:201 */
|
12 17 | }
|
18 + | /* StructureGenerator.kt:135 */
|
13 19 | impl ComplexError {
|
20 + | /* StructureGenerator.kt:231 */
|
14 21 | #[allow(missing_docs)] // documentation missing in model
|
22 + | /* StructureGenerator.kt:166 */
|
15 23 | pub fn top_level(&self) -> ::std::option::Option<&str> {
|
24 + | /* StructureGenerator.kt:169 */
|
16 25 | self.top_level.as_deref()
|
26 + | /* StructureGenerator.kt:166 */
|
17 27 | }
|
28 + | /* StructureGenerator.kt:231 */
|
18 29 | #[allow(missing_docs)] // documentation missing in model
|
30 + | /* StructureGenerator.kt:166 */
|
19 31 | pub fn nested(&self) -> ::std::option::Option<&crate::types::ComplexNestedErrorData> {
|
32 + | /* StructureGenerator.kt:170 */
|
20 33 | self.nested.as_ref()
|
34 + | /* StructureGenerator.kt:166 */
|
21 35 | }
|
36 + | /* StructureGenerator.kt:135 */
|
37 + | }
|
38 + | /* ErrorImplGenerator.kt:99 */
|
39 + | impl ComplexError {
|
40 + | /* ErrorImplGenerator.kt:99 */
|
22 41 | }
|
23 - | impl ComplexError {}
|
42 + | /* ErrorImplGenerator.kt:153 */
|
24 43 | impl ::std::fmt::Display for ComplexError {
|
44 + | /* ErrorImplGenerator.kt:154 */
|
25 45 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
46 + | /* ErrorImplGenerator.kt:161 */
|
26 47 | ::std::write!(f, "ComplexError")?;
|
48 + | /* ErrorImplGenerator.kt:171 */
|
27 49 | Ok(())
|
50 + | /* ErrorImplGenerator.kt:154 */
|
28 51 | }
|
52 + | /* ErrorImplGenerator.kt:153 */
|
29 53 | }
|
54 + | /* ErrorImplGenerator.kt:175 */
|
30 55 | impl ::std::error::Error for ComplexError {}
|
56 + | /* ErrorGenerator.kt:77 */
|
31 57 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ComplexError {
|
58 + | /* ErrorGenerator.kt:78 */
|
32 59 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
33 60 | &self.meta
|
34 61 | }
|
62 + | /* ErrorGenerator.kt:77 */
|
35 63 | }
|
64 + | /* ErrorGenerator.kt:81 */
|
36 65 | impl ComplexError {
|
37 - | /// Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
|
66 + | /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
|
67 + | /* BuilderGenerator.kt:175 */
|
38 68 | pub fn builder() -> crate::types::error::builders::ComplexErrorBuilder {
|
69 + | /* BuilderGenerator.kt:176 */
|
39 70 | crate::types::error::builders::ComplexErrorBuilder::default()
|
71 + | /* BuilderGenerator.kt:175 */
|
40 72 | }
|
73 + | /* ErrorGenerator.kt:81 */
|
41 74 | }
|
42 75 |
|
43 - | /// A builder for [`ComplexError`](crate::types::error::ComplexError).
|
76 + | /// /* BuilderGenerator.kt:342 */A builder for [`ComplexError`](crate::types::error::ComplexError).
|
77 + | /* RustType.kt:516 */
|
44 78 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
79 + | /* RustType.kt:516 */
|
45 80 | #[non_exhaustive]
|
81 + | /* BuilderGenerator.kt:345 */
|
46 82 | pub struct ComplexErrorBuilder {
|
47 - | pub(crate) top_level: ::std::option::Option<::std::string::String>,
|
48 - | pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
|
49 - | meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
83 + | /* BuilderGenerator.kt:275 */ pub(crate) top_level: ::std::option::Option<::std::string::String>,
|
84 + | /* BuilderGenerator.kt:275 */ pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
|
85 + | /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
86 + | /* BuilderGenerator.kt:345 */
|
50 87 | }
|
88 + | /* BuilderGenerator.kt:355 */
|
51 89 | impl ComplexErrorBuilder {
|
90 + | /* BuilderGenerator.kt:286 */
|
52 91 | #[allow(missing_docs)] // documentation missing in model
|
92 + | /* BuilderGenerator.kt:291 */
|
53 93 | pub fn top_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
94 + | /* BuilderGenerator.kt:292 */
|
54 95 | self.top_level = ::std::option::Option::Some(input.into());
|
96 + | /* BuilderGenerator.kt:293 */
|
55 97 | self
|
98 + | /* BuilderGenerator.kt:291 */
|
56 99 | }
|
100 + | /* BuilderGenerator.kt:312 */
|
57 101 | #[allow(missing_docs)] // documentation missing in model
|
102 + | /* BuilderGenerator.kt:314 */
|
58 103 | pub fn set_top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
104 + | /* BuilderGenerator.kt:315 */
|
59 105 | self.top_level = input;
|
60 106 | self
|
107 + | /* BuilderGenerator.kt:314 */
|
61 108 | }
|
109 + | /* BuilderGenerator.kt:334 */
|
62 110 | #[allow(missing_docs)] // documentation missing in model
|
111 + | /* BuilderGenerator.kt:336 */
|
63 112 | pub fn get_top_level(&self) -> &::std::option::Option<::std::string::String> {
|
113 + | /* BuilderGenerator.kt:337 */
|
64 114 | &self.top_level
|
115 + | /* BuilderGenerator.kt:336 */
|
65 116 | }
|
117 + | /* BuilderGenerator.kt:286 */
|
66 118 | #[allow(missing_docs)] // documentation missing in model
|
119 + | /* BuilderGenerator.kt:291 */
|
67 120 | pub fn nested(mut self, input: crate::types::ComplexNestedErrorData) -> Self {
|
121 + | /* BuilderGenerator.kt:292 */
|
68 122 | self.nested = ::std::option::Option::Some(input);
|
123 + | /* BuilderGenerator.kt:293 */
|
69 124 | self
|
125 + | /* BuilderGenerator.kt:291 */
|
70 126 | }
|
127 + | /* BuilderGenerator.kt:312 */
|
71 128 | #[allow(missing_docs)] // documentation missing in model
|
129 + | /* BuilderGenerator.kt:314 */
|
72 130 | pub fn set_nested(mut self, input: ::std::option::Option<crate::types::ComplexNestedErrorData>) -> Self {
|
131 + | /* BuilderGenerator.kt:315 */
|
73 132 | self.nested = input;
|
74 133 | self
|
134 + | /* BuilderGenerator.kt:314 */
|
75 135 | }
|
136 + | /* BuilderGenerator.kt:334 */
|
76 137 | #[allow(missing_docs)] // documentation missing in model
|
138 + | /* BuilderGenerator.kt:336 */
|
77 139 | pub fn get_nested(&self) -> &::std::option::Option<crate::types::ComplexNestedErrorData> {
|
140 + | /* BuilderGenerator.kt:337 */
|
78 141 | &self.nested
|
142 + | /* BuilderGenerator.kt:336 */
|
79 143 | }
|
144 + | /* ErrorGenerator.kt:101 */
|
80 145 | /// Sets error metadata
|
81 146 | pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
82 147 | self.meta = Some(meta);
|
83 148 | self
|
84 149 | }
|
85 150 |
|
86 151 | /// Sets error metadata
|
87 152 | pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
|
88 153 | self.meta = meta;
|
89 154 | self
|
90 155 | }
|
91 - | /// Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
|
156 + | /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
|
157 + | /* BuilderGenerator.kt:253 */
|
92 158 | pub fn build(self) -> crate::types::error::ComplexError {
|
159 + | /* BuilderGenerator.kt:477 */
|
93 160 | crate::types::error::ComplexError {
|
94 - | top_level: self.top_level,
|
161 + | /* BuilderGenerator.kt:481 */ top_level: self.top_level,
|
162 + | /* BuilderGenerator.kt:481 */
|
95 163 | nested: self.nested,
|
164 + | /* ErrorGenerator.kt:120 */
|
96 165 | meta: self.meta.unwrap_or_default(),
|
166 + | /* BuilderGenerator.kt:477 */
|
97 167 | }
|
168 + | /* BuilderGenerator.kt:253 */
|
98 169 | }
|
170 + | /* BuilderGenerator.kt:355 */
|
99 171 | }
|