1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// <p>You do not have sufficient access to perform this action.</p>
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */<p>You do not have sufficient access to perform this action.</p>
|
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 AccessDeniedError {
|
8 + | pub /* StructureGenerator.kt:201 */ struct AccessDeniedError {
|
9 + | /* StructureGenerator.kt:231 */
|
7 10 | #[allow(missing_docs)] // documentation missing in model
|
8 11 | pub message: ::std::option::Option<::std::string::String>,
|
9 - | /// <p>The reason for the exception.</p>
|
12 + | /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
|
10 13 | pub reason: crate::types::AccessDeniedExceptionReason,
|
11 - | pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
14 + | /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
15 + | /* StructureGenerator.kt:201 */
|
12 16 | }
|
17 + | /* StructureGenerator.kt:135 */
|
13 18 | impl AccessDeniedError {
|
14 - | /// <p>The reason for the exception.</p>
|
19 + | /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
|
20 + | /* StructureGenerator.kt:166 */
|
15 21 | pub fn reason(&self) -> &crate::types::AccessDeniedExceptionReason {
|
22 + | /* StructureGenerator.kt:172 */
|
16 23 | &self.reason
|
24 + | /* StructureGenerator.kt:166 */
|
17 25 | }
|
26 + | /* StructureGenerator.kt:135 */
|
18 27 | }
|
28 + | /* ErrorImplGenerator.kt:99 */
|
19 29 | impl AccessDeniedError {
|
30 + | /* ErrorImplGenerator.kt:128 */
|
20 31 | /// Returns the error message.
|
21 32 | pub fn message(&self) -> ::std::option::Option<&str> {
|
22 33 | self.message.as_deref()
|
23 34 | }
|
35 + | /* ErrorImplGenerator.kt:99 */
|
24 36 | }
|
37 + | /* ErrorImplGenerator.kt:153 */
|
25 38 | impl ::std::fmt::Display for AccessDeniedError {
|
39 + | /* ErrorImplGenerator.kt:154 */
|
26 40 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
41 + | /* ErrorImplGenerator.kt:161 */
|
27 42 | ::std::write!(f, "AccessDeniedError [AccessDeniedException]")?;
|
43 + | /* ErrorImplGenerator.kt:166 */
|
28 44 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
45 + | /* ErrorImplGenerator.kt:166 */
|
29 46 | {
|
47 + | /* ErrorImplGenerator.kt:167 */
|
30 48 | ::std::write!(f, ": {}", inner_1)?;
|
49 + | /* ErrorImplGenerator.kt:166 */
|
31 50 | }
|
51 + | /* ErrorImplGenerator.kt:166 */
|
32 52 | }
|
53 + | /* ErrorImplGenerator.kt:171 */
|
33 54 | Ok(())
|
55 + | /* ErrorImplGenerator.kt:154 */
|
34 56 | }
|
57 + | /* ErrorImplGenerator.kt:153 */
|
35 58 | }
|
59 + | /* ErrorImplGenerator.kt:175 */
|
36 60 | impl ::std::error::Error for AccessDeniedError {}
|
61 + | /* ErrorGenerator.kt:77 */
|
37 62 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AccessDeniedError {
|
63 + | /* ErrorGenerator.kt:78 */
|
38 64 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
39 65 | &self.meta
|
40 66 | }
|
67 + | /* ErrorGenerator.kt:77 */
|
41 68 | }
|
69 + | /* ErrorGenerator.kt:81 */
|
42 70 | impl AccessDeniedError {
|
43 - | /// Creates a new builder-style object to manufacture [`AccessDeniedError`](crate::types::error::AccessDeniedError).
|
71 + | /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`AccessDeniedError`](crate::types::error::AccessDeniedError).
|
72 + | /* BuilderGenerator.kt:175 */
|
44 73 | pub fn builder() -> crate::types::error::builders::AccessDeniedErrorBuilder {
|
74 + | /* BuilderGenerator.kt:176 */
|
45 75 | crate::types::error::builders::AccessDeniedErrorBuilder::default()
|
76 + | /* BuilderGenerator.kt:175 */
|
46 77 | }
|
78 + | /* ErrorGenerator.kt:81 */
|
47 79 | }
|
48 80 |
|
49 - | /// A builder for [`AccessDeniedError`](crate::types::error::AccessDeniedError).
|
81 + | /// /* BuilderGenerator.kt:342 */A builder for [`AccessDeniedError`](crate::types::error::AccessDeniedError).
|
82 + | /* RustType.kt:516 */
|
50 83 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
84 + | /* RustType.kt:516 */
|
51 85 | #[non_exhaustive]
|
86 + | /* BuilderGenerator.kt:345 */
|
52 87 | pub struct AccessDeniedErrorBuilder {
|
53 - | pub(crate) message: ::std::option::Option<::std::string::String>,
|
54 - | pub(crate) reason: ::std::option::Option<crate::types::AccessDeniedExceptionReason>,
|
55 - | meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
88 + | /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
|
89 + | /* BuilderGenerator.kt:275 */ pub(crate) reason: ::std::option::Option<crate::types::AccessDeniedExceptionReason>,
|
90 + | /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
91 + | /* BuilderGenerator.kt:345 */
|
56 92 | }
|
93 + | /* BuilderGenerator.kt:355 */
|
57 94 | impl AccessDeniedErrorBuilder {
|
95 + | /* BuilderGenerator.kt:286 */
|
58 96 | #[allow(missing_docs)] // documentation missing in model
|
97 + | /* BuilderGenerator.kt:291 */
|
59 98 | pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
99 + | /* BuilderGenerator.kt:292 */
|
60 100 | self.message = ::std::option::Option::Some(input.into());
|
101 + | /* BuilderGenerator.kt:293 */
|
61 102 | self
|
103 + | /* BuilderGenerator.kt:291 */
|
62 104 | }
|
105 + | /* BuilderGenerator.kt:312 */
|
63 106 | #[allow(missing_docs)] // documentation missing in model
|
107 + | /* BuilderGenerator.kt:314 */
|
64 108 | pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
109 + | /* BuilderGenerator.kt:315 */
|
65 110 | self.message = input;
|
66 111 | self
|
112 + | /* BuilderGenerator.kt:314 */
|
67 113 | }
|
114 + | /* BuilderGenerator.kt:334 */
|
68 115 | #[allow(missing_docs)] // documentation missing in model
|
116 + | /* BuilderGenerator.kt:336 */
|
69 117 | pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
|
118 + | /* BuilderGenerator.kt:337 */
|
70 119 | &self.message
|
120 + | /* BuilderGenerator.kt:336 */
|
71 121 | }
|
72 - | /// <p>The reason for the exception.</p>
|
73 - | /// This field is required.
|
122 + | /// /* BuilderGenerator.kt:286 */<p>The reason for the exception.</p>
|
123 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
124 + | /* BuilderGenerator.kt:291 */
|
74 125 | pub fn reason(mut self, input: crate::types::AccessDeniedExceptionReason) -> Self {
|
126 + | /* BuilderGenerator.kt:292 */
|
75 127 | self.reason = ::std::option::Option::Some(input);
|
128 + | /* BuilderGenerator.kt:293 */
|
76 129 | self
|
130 + | /* BuilderGenerator.kt:291 */
|
77 131 | }
|
78 - | /// <p>The reason for the exception.</p>
|
132 + | /// /* BuilderGenerator.kt:312 */<p>The reason for the exception.</p>
|
133 + | /* BuilderGenerator.kt:314 */
|
79 134 | pub fn set_reason(mut self, input: ::std::option::Option<crate::types::AccessDeniedExceptionReason>) -> Self {
|
135 + | /* BuilderGenerator.kt:315 */
|
80 136 | self.reason = input;
|
81 137 | self
|
138 + | /* BuilderGenerator.kt:314 */
|
82 139 | }
|
83 - | /// <p>The reason for the exception.</p>
|
140 + | /// /* BuilderGenerator.kt:334 */<p>The reason for the exception.</p>
|
141 + | /* BuilderGenerator.kt:336 */
|
84 142 | pub fn get_reason(&self) -> &::std::option::Option<crate::types::AccessDeniedExceptionReason> {
|
143 + | /* BuilderGenerator.kt:337 */
|
85 144 | &self.reason
|
145 + | /* BuilderGenerator.kt:336 */
|
86 146 | }
|
147 + | /* ErrorGenerator.kt:101 */
|
87 148 | /// Sets error metadata
|
88 149 | pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
89 150 | self.meta = Some(meta);
|
90 151 | self
|
91 152 | }
|
92 153 |
|
93 154 | /// Sets error metadata
|
94 155 | pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
|
95 156 | self.meta = meta;
|
96 157 | self
|
97 158 | }
|
98 - | /// Consumes the builder and constructs a [`AccessDeniedError`](crate::types::error::AccessDeniedError).
|
99 - | /// This method will fail if any of the following fields are not set:
|
100 - | /// - [`reason`](crate::types::error::builders::AccessDeniedErrorBuilder::reason)
|
159 + | /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`AccessDeniedError`](crate::types::error::AccessDeniedError).
|
160 + | /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
|
161 + | /// /* BuilderGenerator.kt:246 */- [`reason`](crate::types::error::builders::AccessDeniedErrorBuilder::reason)
|
162 + | /* BuilderGenerator.kt:253 */
|
101 163 | pub fn build(self) -> ::std::result::Result<crate::types::error::AccessDeniedError, ::aws_smithy_types::error::operation::BuildError> {
|
102 - | ::std::result::Result::Ok(crate::types::error::AccessDeniedError {
|
103 - | message: self.message,
|
104 - | reason: self.reason.ok_or_else(|| {
|
105 - | ::aws_smithy_types::error::operation::BuildError::missing_field(
|
106 - | "reason",
|
107 - | "reason was not specified but it is required when building AccessDeniedError",
|
108 - | )
|
109 - | })?,
|
110 - | meta: self.meta.unwrap_or_default(),
|
111 - | })
|
112 - | }
|
164 + | /* BuilderGenerator.kt:254 */
|
165 + | ::std::result::Result::Ok(
|
166 + | /* BuilderGenerator.kt:477 */crate::types::error::AccessDeniedError {
|
167 + | /* BuilderGenerator.kt:481 */message: self.message
|
168 + | ,
|
169 + | /* BuilderGenerator.kt:481 */reason: self.reason
|
170 + | /* BuilderGenerator.kt:494 */.ok_or_else(||
|
171 + | /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("reason", "reason was not specified but it is required when building AccessDeniedError")
|
172 + | /* BuilderGenerator.kt:494 */)?
|
173 + | ,
|
174 + | /* ErrorGenerator.kt:120 */meta: self.meta.unwrap_or_default(),
|
175 + | /* BuilderGenerator.kt:477 */}
|
176 + | /* BuilderGenerator.kt:254 */)
|
177 + | /* BuilderGenerator.kt:253 */
|
178 + | }
|
179 + | /* BuilderGenerator.kt:355 */
|
113 180 | }
|