1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* StructureGenerator.kt:197 */
|
2 3 | #[allow(missing_docs)] // documentation missing in model
|
4 + | /* RustType.kt:516 */
|
3 5 | #[derive(
|
4 6 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
5 7 | )]
|
6 - | pub struct GetObjectInput {
|
8 + | pub /* StructureGenerator.kt:201 */ struct GetObjectInput {
|
9 + | /* StructureGenerator.kt:231 */
|
7 10 | #[allow(missing_docs)] // documentation missing in model
|
8 11 | pub bucket: ::std::string::String,
|
12 + | /* StructureGenerator.kt:231 */
|
9 13 | #[allow(missing_docs)] // documentation missing in model
|
10 14 | pub key: crate::model::ObjectKey,
|
15 + | /* StructureGenerator.kt:201 */
|
11 16 | }
|
17 + | /* StructureGenerator.kt:135 */
|
12 18 | impl GetObjectInput {
|
19 + | /* StructureGenerator.kt:231 */
|
13 20 | #[allow(missing_docs)] // documentation missing in model
|
21 + | /* StructureGenerator.kt:166 */
|
14 22 | pub fn bucket(&self) -> &str {
|
23 + | /* StructureGenerator.kt:171 */
|
15 24 | use std::ops::Deref;
|
16 25 | self.bucket.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 key(&self) -> &crate::model::ObjectKey {
|
32 + | /* StructureGenerator.kt:172 */
|
20 33 | &self.key
|
34 + | /* StructureGenerator.kt:166 */
|
21 35 | }
|
36 + | /* StructureGenerator.kt:135 */
|
22 37 | }
|
38 + | /* ServerCodegenVisitor.kt:345 */
|
23 39 | impl GetObjectInput {
|
24 - | /// Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
|
40 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
|
41 + | /* ServerBuilderGenerator.kt:295 */
|
25 42 | pub fn builder() -> crate::input::get_object_input::Builder {
|
43 + | /* ServerBuilderGenerator.kt:296 */
|
26 44 | crate::input::get_object_input::Builder::default()
|
45 + | /* ServerBuilderGenerator.kt:295 */
|
27 46 | }
|
47 + | /* ServerCodegenVisitor.kt:345 */
|
28 48 | }
|
49 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
29 50 | impl crate::constrained::Constrained for crate::input::GetObjectInput {
|
30 51 | type Unconstrained = crate::input::get_object_input::Builder;
|
31 52 | }
|
32 53 |
|
54 + | /* StructureGenerator.kt:197 */
|
33 55 | #[allow(missing_docs)] // documentation missing in model
|
56 + | /* RustType.kt:516 */
|
34 57 | #[derive(
|
35 58 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
36 59 | )]
|
37 - | pub struct DeleteObjectTaggingInput {
|
60 + | pub /* StructureGenerator.kt:201 */ struct DeleteObjectTaggingInput {
|
61 + | /* StructureGenerator.kt:231 */
|
38 62 | #[allow(missing_docs)] // documentation missing in model
|
39 63 | pub bucket: ::std::string::String,
|
64 + | /* StructureGenerator.kt:231 */
|
40 65 | #[allow(missing_docs)] // documentation missing in model
|
41 66 | pub key: crate::model::ObjectKey,
|
67 + | /* StructureGenerator.kt:231 */
|
42 68 | #[allow(missing_docs)] // documentation missing in model
|
43 69 | pub version_id: ::std::option::Option<::std::string::String>,
|
70 + | /* StructureGenerator.kt:231 */
|
44 71 | #[allow(missing_docs)] // documentation missing in model
|
45 72 | pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
|
73 + | /* StructureGenerator.kt:201 */
|
46 74 | }
|
75 + | /* StructureGenerator.kt:135 */
|
47 76 | impl DeleteObjectTaggingInput {
|
77 + | /* StructureGenerator.kt:231 */
|
48 78 | #[allow(missing_docs)] // documentation missing in model
|
79 + | /* StructureGenerator.kt:166 */
|
49 80 | pub fn bucket(&self) -> &str {
|
81 + | /* StructureGenerator.kt:171 */
|
50 82 | use std::ops::Deref;
|
51 83 | self.bucket.deref()
|
84 + | /* StructureGenerator.kt:166 */
|
52 85 | }
|
86 + | /* StructureGenerator.kt:231 */
|
53 87 | #[allow(missing_docs)] // documentation missing in model
|
88 + | /* StructureGenerator.kt:166 */
|
54 89 | pub fn key(&self) -> &crate::model::ObjectKey {
|
90 + | /* StructureGenerator.kt:172 */
|
55 91 | &self.key
|
92 + | /* StructureGenerator.kt:166 */
|
56 93 | }
|
94 + | /* StructureGenerator.kt:231 */
|
57 95 | #[allow(missing_docs)] // documentation missing in model
|
96 + | /* StructureGenerator.kt:166 */
|
58 97 | pub fn version_id(&self) -> ::std::option::Option<&str> {
|
98 + | /* StructureGenerator.kt:169 */
|
59 99 | self.version_id.as_deref()
|
100 + | /* StructureGenerator.kt:166 */
|
60 101 | }
|
102 + | /* StructureGenerator.kt:231 */
|
61 103 | #[allow(missing_docs)] // documentation missing in model
|
104 + | /* StructureGenerator.kt:166 */
|
62 105 | pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
|
106 + | /* StructureGenerator.kt:169 */
|
63 107 | self.expected_bucket_owner.as_deref()
|
108 + | /* StructureGenerator.kt:166 */
|
64 109 | }
|
110 + | /* StructureGenerator.kt:135 */
|
65 111 | }
|
112 + | /* ServerCodegenVisitor.kt:345 */
|
66 113 | impl DeleteObjectTaggingInput {
|
67 - | /// Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
114 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
115 + | /* ServerBuilderGenerator.kt:295 */
|
68 116 | pub fn builder() -> crate::input::delete_object_tagging_input::Builder {
|
117 + | /* ServerBuilderGenerator.kt:296 */
|
69 118 | crate::input::delete_object_tagging_input::Builder::default()
|
119 + | /* ServerBuilderGenerator.kt:295 */
|
70 120 | }
|
121 + | /* ServerCodegenVisitor.kt:345 */
|
71 122 | }
|
123 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
72 124 | impl crate::constrained::Constrained for crate::input::DeleteObjectTaggingInput {
|
73 125 | type Unconstrained = crate::input::delete_object_tagging_input::Builder;
|
74 126 | }
|
75 127 |
|
128 + | /* StructureGenerator.kt:197 */
|
76 129 | #[allow(missing_docs)] // documentation missing in model
|
130 + | /* RustType.kt:516 */
|
77 131 | #[derive(
|
78 132 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
79 133 | )]
|
80 - | pub struct GetBucketLocationInput {
|
134 + | pub /* StructureGenerator.kt:201 */ struct GetBucketLocationInput {
|
135 + | /* StructureGenerator.kt:231 */
|
81 136 | #[allow(missing_docs)] // documentation missing in model
|
82 137 | pub bucket: ::std::string::String,
|
138 + | /* StructureGenerator.kt:201 */
|
83 139 | }
|
140 + | /* StructureGenerator.kt:135 */
|
84 141 | impl GetBucketLocationInput {
|
142 + | /* StructureGenerator.kt:231 */
|
85 143 | #[allow(missing_docs)] // documentation missing in model
|
144 + | /* StructureGenerator.kt:166 */
|
86 145 | pub fn bucket(&self) -> &str {
|
146 + | /* StructureGenerator.kt:171 */
|
87 147 | use std::ops::Deref;
|
88 148 | self.bucket.deref()
|
149 + | /* StructureGenerator.kt:166 */
|
89 150 | }
|
151 + | /* StructureGenerator.kt:135 */
|
90 152 | }
|
153 + | /* ServerCodegenVisitor.kt:345 */
|
91 154 | impl GetBucketLocationInput {
|
92 - | /// Creates a new builder-style object to manufacture [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
155 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
156 + | /* ServerBuilderGenerator.kt:295 */
|
93 157 | pub fn builder() -> crate::input::get_bucket_location_input::Builder {
|
158 + | /* ServerBuilderGenerator.kt:296 */
|
94 159 | crate::input::get_bucket_location_input::Builder::default()
|
160 + | /* ServerBuilderGenerator.kt:295 */
|
95 161 | }
|
162 + | /* ServerCodegenVisitor.kt:345 */
|
96 163 | }
|
164 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
97 165 | impl crate::constrained::Constrained for crate::input::GetBucketLocationInput {
|
98 166 | type Unconstrained = crate::input::get_bucket_location_input::Builder;
|
99 167 | }
|
100 168 |
|
169 + | /* StructureGenerator.kt:197 */
|
101 170 | #[allow(missing_docs)] // documentation missing in model
|
171 + | /* RustType.kt:516 */
|
102 172 | #[derive(
|
103 173 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
104 174 | )]
|
105 - | pub struct ListObjectsV2Input {
|
175 + | pub /* StructureGenerator.kt:201 */ struct ListObjectsV2Input {
|
176 + | /* StructureGenerator.kt:231 */
|
106 177 | #[allow(missing_docs)] // documentation missing in model
|
107 178 | pub bucket: ::std::string::String,
|
179 + | /* StructureGenerator.kt:231 */
|
108 180 | #[allow(missing_docs)] // documentation missing in model
|
109 181 | pub delimiter: ::std::option::Option<::std::string::String>,
|
182 + | /* StructureGenerator.kt:231 */
|
110 183 | #[allow(missing_docs)] // documentation missing in model
|
111 184 | pub encoding_type: ::std::option::Option<crate::model::EncodingType>,
|
185 + | /* StructureGenerator.kt:231 */
|
112 186 | #[allow(missing_docs)] // documentation missing in model
|
113 187 | pub max_keys: ::std::option::Option<i32>,
|
188 + | /* StructureGenerator.kt:231 */
|
114 189 | #[allow(missing_docs)] // documentation missing in model
|
115 190 | pub prefix: ::std::option::Option<::std::string::String>,
|
191 + | /* StructureGenerator.kt:231 */
|
116 192 | #[allow(missing_docs)] // documentation missing in model
|
117 193 | pub continuation_token: ::std::option::Option<::std::string::String>,
|
194 + | /* StructureGenerator.kt:231 */
|
118 195 | #[allow(missing_docs)] // documentation missing in model
|
119 196 | pub fetch_owner: ::std::option::Option<bool>,
|
197 + | /* StructureGenerator.kt:231 */
|
120 198 | #[allow(missing_docs)] // documentation missing in model
|
121 199 | pub start_after: ::std::option::Option<::std::string::String>,
|
200 + | /* StructureGenerator.kt:231 */
|
122 201 | #[allow(missing_docs)] // documentation missing in model
|
123 202 | pub request_payer: ::std::option::Option<crate::model::RequestPayer>,
|
203 + | /* StructureGenerator.kt:231 */
|
124 204 | #[allow(missing_docs)] // documentation missing in model
|
125 205 | pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
|
206 + | /* StructureGenerator.kt:201 */
|
126 207 | }
|
208 + | /* StructureGenerator.kt:135 */
|
127 209 | impl ListObjectsV2Input {
|
210 + | /* StructureGenerator.kt:231 */
|
128 211 | #[allow(missing_docs)] // documentation missing in model
|
212 + | /* StructureGenerator.kt:166 */
|
129 213 | pub fn bucket(&self) -> &str {
|
214 + | /* StructureGenerator.kt:171 */
|
130 215 | use std::ops::Deref;
|
131 216 | self.bucket.deref()
|
217 + | /* StructureGenerator.kt:166 */
|
132 218 | }
|
219 + | /* StructureGenerator.kt:231 */
|
133 220 | #[allow(missing_docs)] // documentation missing in model
|
221 + | /* StructureGenerator.kt:166 */
|
134 222 | pub fn delimiter(&self) -> ::std::option::Option<&str> {
|
223 + | /* StructureGenerator.kt:169 */
|
135 224 | self.delimiter.as_deref()
|
225 + | /* StructureGenerator.kt:166 */
|
136 226 | }
|
227 + | /* StructureGenerator.kt:231 */
|
137 228 | #[allow(missing_docs)] // documentation missing in model
|
229 + | /* StructureGenerator.kt:166 */
|
138 230 | pub fn encoding_type(&self) -> ::std::option::Option<&crate::model::EncodingType> {
|
231 + | /* StructureGenerator.kt:170 */
|
139 232 | self.encoding_type.as_ref()
|
233 + | /* StructureGenerator.kt:166 */
|
140 234 | }
|
235 + | /* StructureGenerator.kt:231 */
|
141 236 | #[allow(missing_docs)] // documentation missing in model
|
237 + | /* StructureGenerator.kt:166 */
|
142 238 | pub fn max_keys(&self) -> ::std::option::Option<i32> {
|
239 + | /* StructureGenerator.kt:168 */
|
143 240 | self.max_keys
|
241 + | /* StructureGenerator.kt:166 */
|
144 242 | }
|
243 + | /* StructureGenerator.kt:231 */
|
145 244 | #[allow(missing_docs)] // documentation missing in model
|
245 + | /* StructureGenerator.kt:166 */
|
146 246 | pub fn prefix(&self) -> ::std::option::Option<&str> {
|
247 + | /* StructureGenerator.kt:169 */
|
147 248 | self.prefix.as_deref()
|
249 + | /* StructureGenerator.kt:166 */
|
148 250 | }
|
251 + | /* StructureGenerator.kt:231 */
|
149 252 | #[allow(missing_docs)] // documentation missing in model
|
253 + | /* StructureGenerator.kt:166 */
|
150 254 | pub fn continuation_token(&self) -> ::std::option::Option<&str> {
|
255 + | /* StructureGenerator.kt:169 */
|
151 256 | self.continuation_token.as_deref()
|
257 + | /* StructureGenerator.kt:166 */
|
152 258 | }
|
259 + | /* StructureGenerator.kt:231 */
|
153 260 | #[allow(missing_docs)] // documentation missing in model
|
261 + | /* StructureGenerator.kt:166 */
|
154 262 | pub fn fetch_owner(&self) -> ::std::option::Option<bool> {
|
263 + | /* StructureGenerator.kt:168 */
|
155 264 | self.fetch_owner
|
265 + | /* StructureGenerator.kt:166 */
|
156 266 | }
|
267 + | /* StructureGenerator.kt:231 */
|
157 268 | #[allow(missing_docs)] // documentation missing in model
|
269 + | /* StructureGenerator.kt:166 */
|
158 270 | pub fn start_after(&self) -> ::std::option::Option<&str> {
|
271 + | /* StructureGenerator.kt:169 */
|
159 272 | self.start_after.as_deref()
|
273 + | /* StructureGenerator.kt:166 */
|
160 274 | }
|
275 + | /* StructureGenerator.kt:231 */
|
161 276 | #[allow(missing_docs)] // documentation missing in model
|
277 + | /* StructureGenerator.kt:166 */
|
162 278 | pub fn request_payer(&self) -> ::std::option::Option<&crate::model::RequestPayer> {
|
279 + | /* StructureGenerator.kt:170 */
|
163 280 | self.request_payer.as_ref()
|
281 + | /* StructureGenerator.kt:166 */
|
164 282 | }
|
283 + | /* StructureGenerator.kt:231 */
|
165 284 | #[allow(missing_docs)] // documentation missing in model
|
285 + | /* StructureGenerator.kt:166 */
|
166 286 | pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
|
287 + | /* StructureGenerator.kt:169 */
|
167 288 | self.expected_bucket_owner.as_deref()
|
289 + | /* StructureGenerator.kt:166 */
|
168 290 | }
|
291 + | /* StructureGenerator.kt:135 */
|
169 292 | }
|
293 + | /* ServerCodegenVisitor.kt:345 */
|
170 294 | impl ListObjectsV2Input {
|
171 - | /// Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
295 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
296 + | /* ServerBuilderGenerator.kt:295 */
|
172 297 | pub fn builder() -> crate::input::list_objects_v2_input::Builder {
|
298 + | /* ServerBuilderGenerator.kt:296 */
|
173 299 | crate::input::list_objects_v2_input::Builder::default()
|
300 + | /* ServerBuilderGenerator.kt:295 */
|
174 301 | }
|
302 + | /* ServerCodegenVisitor.kt:345 */
|
175 303 | }
|
304 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
176 305 | impl crate::constrained::Constrained for crate::input::ListObjectsV2Input {
|
177 306 | type Unconstrained = crate::input::list_objects_v2_input::Builder;
|
178 307 | }
|
179 - | /// See [`GetObjectInput`](crate::input::GetObjectInput).
|
308 + | /// /* ServerBuilderGenerator.kt:171 */See [`GetObjectInput`](crate::input::GetObjectInput).
|
180 309 | pub mod get_object_input {
|
181 310 |
|
311 + | /* RustType.kt:516 */
|
182 312 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
183 - | /// Holds one variant for each of the ways the builder can fail.
|
313 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
314 + | /* RustType.kt:516 */
|
184 315 | #[non_exhaustive]
|
316 + | /* ServerBuilderConstraintViolations.kt:75 */
|
185 317 | #[allow(clippy::enum_variant_names)]
|
186 318 | pub enum ConstraintViolation {
|
187 - | /// `bucket` was not provided but it is required when building `GetObjectInput`.
|
319 + | /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `GetObjectInput`.
|
320 + | /* ServerBuilderConstraintViolations.kt:143 */
|
188 321 | MissingBucket,
|
189 - | /// `key` was not provided but it is required when building `GetObjectInput`.
|
322 + | /// /* ServerBuilderConstraintViolations.kt:138 */`key` was not provided but it is required when building `GetObjectInput`.
|
323 + | /* ServerBuilderConstraintViolations.kt:143 */
|
190 324 | MissingKey,
|
191 - | /// Constraint violation occurred building member `key` when building `GetObjectInput`.
|
325 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `key` when building `GetObjectInput`.
|
326 + | /* RustType.kt:516 */
|
192 327 | #[doc(hidden)]
|
328 + | /* ServerBuilderConstraintViolations.kt:164 */
|
193 329 | Key(crate::model::object_key::ConstraintViolation),
|
330 + | /* ServerBuilderConstraintViolations.kt:75 */
|
194 331 | }
|
332 + | /* ServerBuilderConstraintViolations.kt:117 */
|
195 333 | impl ::std::fmt::Display for ConstraintViolation {
|
334 + | /* ServerBuilderConstraintViolations.kt:118 */
|
196 335 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
336 + | /* ServerBuilderConstraintViolations.kt:119 */
|
197 337 | match self {
|
198 - | ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetObjectInput`"),
|
199 - | ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `GetObjectInput`"),
|
200 - | ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `GetObjectInput`"),
|
201 - | }
|
338 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetObjectInput`"),
|
339 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `GetObjectInput`"),
|
340 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `GetObjectInput`"),
|
341 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
342 + | /* ServerBuilderConstraintViolations.kt:118 */
|
202 343 | }
|
344 + | /* ServerBuilderConstraintViolations.kt:117 */
|
203 345 | }
|
346 + | /* ServerBuilderConstraintViolations.kt:84 */
|
204 347 | impl ::std::error::Error for ConstraintViolation {}
|
348 + | /* ServerBuilderConstraintViolations.kt:171 */
|
205 349 | impl ConstraintViolation {
|
206 350 | pub(crate) fn as_validation_exception_field(
|
207 351 | self,
|
208 352 | path: ::std::string::String,
|
209 353 | ) -> crate::model::ValidationExceptionField {
|
210 354 | match self {
|
211 355 | ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
|
212 356 | message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
|
213 357 | path: path + "/Bucket",
|
214 358 | },
|
215 359 | ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
|
216 360 | message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
|
217 361 | path: path + "/Key",
|
218 362 | },
|
219 363 | ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
|
220 364 | }
|
221 365 | }
|
222 366 | }
|
367 + | /* ServerBuilderGenerator.kt:234 */
|
223 368 | impl ::std::convert::From<ConstraintViolation>
|
224 369 | for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
|
225 370 | {
|
226 371 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
227 372 | let first_validation_exception_field =
|
228 373 | constraint_violation.as_validation_exception_field("".to_owned());
|
229 374 | let validation_exception = crate::error::ValidationException {
|
230 375 | message: format!(
|
231 376 | "1 validation error detected. {}",
|
232 377 | &first_validation_exception_field.message
|
233 378 | ),
|
234 379 | field_list: Some(vec![first_validation_exception_field]),
|
235 380 | };
|
236 381 | Self::ConstraintViolation(
|
237 382 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
238 383 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
239 384 | )
|
240 385 | }
|
241 386 | }
|
387 + | /* ServerBuilderGenerator.kt:244 */
|
242 388 | impl ::std::convert::From<Builder>
|
243 389 | for crate::constrained::MaybeConstrained<crate::input::GetObjectInput>
|
244 390 | {
|
245 391 | fn from(builder: Builder) -> Self {
|
246 392 | Self::Unconstrained(builder)
|
247 393 | }
|
248 394 | }
|
395 + | /* ServerBuilderGenerator.kt:446 */
|
249 396 | impl ::std::convert::TryFrom<Builder> for crate::input::GetObjectInput {
|
250 397 | type Error = ConstraintViolation;
|
251 398 |
|
252 399 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
253 400 | builder.build()
|
254 401 | }
|
255 402 | }
|
256 - | /// A builder for [`GetObjectInput`](crate::input::GetObjectInput).
|
403 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetObjectInput`](crate::input::GetObjectInput).
|
404 + | /* RustType.kt:516 */
|
257 405 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
406 + | /* ServerBuilderGenerator.kt:211 */
|
258 407 | pub struct Builder {
|
408 + | /* ServerBuilderGenerator.kt:308 */
|
259 409 | pub(crate) bucket: ::std::option::Option<::std::string::String>,
|
410 + | /* ServerBuilderGenerator.kt:308 */
|
260 411 | pub(crate) key:
|
261 412 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
|
413 + | /* ServerBuilderGenerator.kt:211 */
|
262 414 | }
|
415 + | /* ServerBuilderGenerator.kt:215 */
|
263 416 | impl Builder {
|
417 + | /* ServerBuilderGenerator.kt:331 */
|
264 418 | #[allow(missing_docs)] // documentation missing in model
|
419 + | /* ServerBuilderGenerator.kt:343 */
|
265 420 | pub fn bucket(mut self, input: ::std::string::String) -> Self {
|
266 - | self.bucket = Some(input);
|
421 + | /* ServerBuilderGenerator.kt:344 */
|
422 + | self.bucket =
|
423 + | /* ServerBuilderGenerator.kt:345 */Some(
|
424 + | /* ServerBuilderGenerator.kt:376 */input
|
425 + | /* ServerBuilderGenerator.kt:345 */)
|
426 + | /* ServerBuilderGenerator.kt:344 */;
|
267 427 | self
|
428 + | /* ServerBuilderGenerator.kt:343 */
|
268 429 | }
|
430 + | /* ServerBuilderGenerator.kt:426 */
|
269 431 | #[allow(missing_docs)] // documentation missing in model
|
432 + | /* ServerBuilderGenerator.kt:428 */
|
270 433 | pub(crate) fn set_bucket(
|
271 434 | mut self,
|
272 435 | input: impl ::std::convert::Into<::std::string::String>,
|
273 436 | ) -> Self {
|
437 + | /* ServerBuilderGenerator.kt:429 */
|
274 438 | self.bucket = Some(input.into());
|
275 439 | self
|
440 + | /* ServerBuilderGenerator.kt:428 */
|
276 441 | }
|
442 + | /* ServerBuilderGenerator.kt:331 */
|
277 443 | #[allow(missing_docs)] // documentation missing in model
|
444 + | /* ServerBuilderGenerator.kt:343 */
|
278 445 | pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
|
279 - | self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
446 + | /* ServerBuilderGenerator.kt:344 */
|
447 + | self.key =
|
448 + | /* ServerBuilderGenerator.kt:345 */Some(
|
449 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
450 + | /* ServerBuilderGenerator.kt:345 */)
|
451 + | /* ServerBuilderGenerator.kt:344 */;
|
280 452 | self
|
453 + | /* ServerBuilderGenerator.kt:343 */
|
281 454 | }
|
455 + | /* ServerBuilderGenerator.kt:426 */
|
282 456 | #[allow(missing_docs)] // documentation missing in model
|
457 + | /* ServerBuilderGenerator.kt:428 */
|
283 458 | pub(crate) fn set_key(
|
284 459 | mut self,
|
285 460 | input: impl ::std::convert::Into<
|
286 461 | crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
|
287 462 | >,
|
288 463 | ) -> Self {
|
464 + | /* ServerBuilderGenerator.kt:429 */
|
289 465 | self.key = Some(input.into());
|
290 466 | self
|
467 + | /* ServerBuilderGenerator.kt:428 */
|
291 468 | }
|
292 - | /// Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
|
293 - | ///
|
469 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
|
470 + | /// /* ServerBuilderGenerator.kt:260 */
|
294 471 | /// The builder fails to construct a [`GetObjectInput`](crate::input::GetObjectInput) if a [`ConstraintViolation`] occurs.
|
295 472 | ///
|
296 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
473 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
474 + | /* ServerBuilderGenerator.kt:271 */
|
297 475 | pub fn build(self) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
|
298 476 | self.build_enforcing_all_constraints()
|
299 477 | }
|
478 + | /* ServerBuilderGenerator.kt:283 */
|
300 479 | fn build_enforcing_all_constraints(
|
301 480 | self,
|
302 481 | ) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
|
303 - | Ok(crate::input::GetObjectInput {
|
304 - | bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
|
482 + | /* ServerBuilderGenerator.kt:287 */
|
483 + | Ok(
|
484 + | /* ServerBuilderGenerator.kt:542 */
|
485 + | crate::input::GetObjectInput {
|
486 + | /* ServerBuilderGenerator.kt:546 */
|
487 + | bucket: self
|
488 + | .bucket
|
489 + | /* ServerBuilderGenerator.kt:569 */
|
490 + | .ok_or(ConstraintViolation::MissingBucket)?,
|
491 + | /* ServerBuilderGenerator.kt:546 */
|
305 492 | key: self
|
306 493 | .key
|
494 + | /* ServerBuilderGenerator.kt:602 */
|
307 495 | .map(|v| match v {
|
308 496 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
309 497 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
310 498 | })
|
499 + | /* ServerBuilderGenerator.kt:614 */
|
311 500 | .map(|res| res.map_err(ConstraintViolation::Key))
|
312 501 | .transpose()?
|
502 + | /* ServerBuilderGenerator.kt:569 */
|
313 503 | .ok_or(ConstraintViolation::MissingKey)?,
|
314 - | })
|
504 + | /* ServerBuilderGenerator.kt:542 */
|
505 + | }, /* ServerBuilderGenerator.kt:287 */
|
506 + | )
|
507 + | /* ServerBuilderGenerator.kt:283 */
|
315 508 | }
|
509 + | /* ServerBuilderGenerator.kt:215 */
|
316 510 | }
|
511 + |
|
512 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
317 513 | }
|
318 - | /// See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
514 + | /// /* ServerBuilderGenerator.kt:171 */See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
319 515 | pub mod delete_object_tagging_input {
|
320 516 |
|
517 + | /* RustType.kt:516 */
|
321 518 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
322 - | /// Holds one variant for each of the ways the builder can fail.
|
519 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
520 + | /* RustType.kt:516 */
|
323 521 | #[non_exhaustive]
|
522 + | /* ServerBuilderConstraintViolations.kt:75 */
|
324 523 | #[allow(clippy::enum_variant_names)]
|
325 524 | pub enum ConstraintViolation {
|
326 - | /// `bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
|
525 + | /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
|
526 + | /* ServerBuilderConstraintViolations.kt:143 */
|
327 527 | MissingBucket,
|
328 - | /// `key` was not provided but it is required when building `DeleteObjectTaggingInput`.
|
528 + | /// /* ServerBuilderConstraintViolations.kt:138 */`key` was not provided but it is required when building `DeleteObjectTaggingInput`.
|
529 + | /* ServerBuilderConstraintViolations.kt:143 */
|
329 530 | MissingKey,
|
330 - | /// Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
|
531 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
|
532 + | /* RustType.kt:516 */
|
331 533 | #[doc(hidden)]
|
534 + | /* ServerBuilderConstraintViolations.kt:164 */
|
332 535 | Key(crate::model::object_key::ConstraintViolation),
|
536 + | /* ServerBuilderConstraintViolations.kt:75 */
|
333 537 | }
|
538 + | /* ServerBuilderConstraintViolations.kt:117 */
|
334 539 | impl ::std::fmt::Display for ConstraintViolation {
|
540 + | /* ServerBuilderConstraintViolations.kt:118 */
|
335 541 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
542 + | /* ServerBuilderConstraintViolations.kt:119 */
|
336 543 | match self {
|
337 - | ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`"),
|
338 - | ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `DeleteObjectTaggingInput`"),
|
339 - | ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`"),
|
340 - | }
|
544 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`"),
|
545 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `DeleteObjectTaggingInput`"),
|
546 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`"),
|
547 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
548 + | /* ServerBuilderConstraintViolations.kt:118 */
|
341 549 | }
|
550 + | /* ServerBuilderConstraintViolations.kt:117 */
|
342 551 | }
|
552 + | /* ServerBuilderConstraintViolations.kt:84 */
|
343 553 | impl ::std::error::Error for ConstraintViolation {}
|
554 + | /* ServerBuilderConstraintViolations.kt:171 */
|
344 555 | impl ConstraintViolation {
|
345 556 | pub(crate) fn as_validation_exception_field(
|
346 557 | self,
|
347 558 | path: ::std::string::String,
|
348 559 | ) -> crate::model::ValidationExceptionField {
|
349 560 | match self {
|
350 561 | ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
|
351 562 | message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
|
352 563 | path: path + "/Bucket",
|
353 564 | },
|
354 565 | ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
|
355 566 | message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
|
356 567 | path: path + "/Key",
|
357 568 | },
|
358 569 | ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
|
359 570 | }
|
360 571 | }
|
361 572 | }
|
573 + | /* ServerBuilderGenerator.kt:234 */
|
362 574 | impl ::std::convert::From<ConstraintViolation>
|
363 575 | for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
|
364 576 | {
|
365 577 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
366 578 | let first_validation_exception_field =
|
367 579 | constraint_violation.as_validation_exception_field("".to_owned());
|
368 580 | let validation_exception = crate::error::ValidationException {
|
369 581 | message: format!(
|
370 582 | "1 validation error detected. {}",
|
371 583 | &first_validation_exception_field.message
|
372 584 | ),
|
373 585 | field_list: Some(vec![first_validation_exception_field]),
|
374 586 | };
|
375 587 | Self::ConstraintViolation(
|
376 588 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
377 589 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
378 590 | )
|
379 591 | }
|
380 592 | }
|
593 + | /* ServerBuilderGenerator.kt:244 */
|
381 594 | impl ::std::convert::From<Builder>
|
382 595 | for crate::constrained::MaybeConstrained<crate::input::DeleteObjectTaggingInput>
|
383 596 | {
|
384 597 | fn from(builder: Builder) -> Self {
|
385 598 | Self::Unconstrained(builder)
|
386 599 | }
|
387 600 | }
|
601 + | /* ServerBuilderGenerator.kt:446 */
|
388 602 | impl ::std::convert::TryFrom<Builder> for crate::input::DeleteObjectTaggingInput {
|
389 603 | type Error = ConstraintViolation;
|
390 604 |
|
391 605 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
392 606 | builder.build()
|
393 607 | }
|
394 608 | }
|
395 - | /// A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
609 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
610 + | /* RustType.kt:516 */
|
396 611 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
612 + | /* ServerBuilderGenerator.kt:211 */
|
397 613 | pub struct Builder {
|
614 + | /* ServerBuilderGenerator.kt:308 */
|
398 615 | pub(crate) bucket: ::std::option::Option<::std::string::String>,
|
616 + | /* ServerBuilderGenerator.kt:308 */
|
399 617 | pub(crate) key:
|
400 618 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
|
619 + | /* ServerBuilderGenerator.kt:308 */
|
401 620 | pub(crate) version_id: ::std::option::Option<::std::string::String>,
|
621 + | /* ServerBuilderGenerator.kt:308 */
|
402 622 | pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
|
623 + | /* ServerBuilderGenerator.kt:211 */
|
403 624 | }
|
625 + | /* ServerBuilderGenerator.kt:215 */
|
404 626 | impl Builder {
|
627 + | /* ServerBuilderGenerator.kt:331 */
|
405 628 | #[allow(missing_docs)] // documentation missing in model
|
629 + | /* ServerBuilderGenerator.kt:343 */
|
406 630 | pub fn bucket(mut self, input: ::std::string::String) -> Self {
|
407 - | self.bucket = Some(input);
|
631 + | /* ServerBuilderGenerator.kt:344 */
|
632 + | self.bucket =
|
633 + | /* ServerBuilderGenerator.kt:345 */Some(
|
634 + | /* ServerBuilderGenerator.kt:376 */input
|
635 + | /* ServerBuilderGenerator.kt:345 */)
|
636 + | /* ServerBuilderGenerator.kt:344 */;
|
408 637 | self
|
638 + | /* ServerBuilderGenerator.kt:343 */
|
409 639 | }
|
640 + | /* ServerBuilderGenerator.kt:426 */
|
410 641 | #[allow(missing_docs)] // documentation missing in model
|
642 + | /* ServerBuilderGenerator.kt:428 */
|
411 643 | pub(crate) fn set_bucket(
|
412 644 | mut self,
|
413 645 | input: impl ::std::convert::Into<::std::string::String>,
|
414 646 | ) -> Self {
|
647 + | /* ServerBuilderGenerator.kt:429 */
|
415 648 | self.bucket = Some(input.into());
|
416 649 | self
|
650 + | /* ServerBuilderGenerator.kt:428 */
|
417 651 | }
|
652 + | /* ServerBuilderGenerator.kt:331 */
|
418 653 | #[allow(missing_docs)] // documentation missing in model
|
654 + | /* ServerBuilderGenerator.kt:343 */
|
419 655 | pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
|
420 - | self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
656 + | /* ServerBuilderGenerator.kt:344 */
|
657 + | self.key =
|
658 + | /* ServerBuilderGenerator.kt:345 */Some(
|
659 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
660 + | /* ServerBuilderGenerator.kt:345 */)
|
661 + | /* ServerBuilderGenerator.kt:344 */;
|
421 662 | self
|
663 + | /* ServerBuilderGenerator.kt:343 */
|
422 664 | }
|
665 + | /* ServerBuilderGenerator.kt:426 */
|
423 666 | #[allow(missing_docs)] // documentation missing in model
|
667 + | /* ServerBuilderGenerator.kt:428 */
|
424 668 | pub(crate) fn set_key(
|
425 669 | mut self,
|
426 670 | input: impl ::std::convert::Into<
|
427 671 | crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
|
428 672 | >,
|
429 673 | ) -> Self {
|
674 + | /* ServerBuilderGenerator.kt:429 */
|
430 675 | self.key = Some(input.into());
|
431 676 | self
|
677 + | /* ServerBuilderGenerator.kt:428 */
|
432 678 | }
|
679 + | /* ServerBuilderGenerator.kt:331 */
|
433 680 | #[allow(missing_docs)] // documentation missing in model
|
681 + | /* ServerBuilderGenerator.kt:343 */
|
434 682 | pub fn version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
435 - | self.version_id = input;
|
683 + | /* ServerBuilderGenerator.kt:344 */
|
684 + | self.version_id =
|
685 + | /* ServerBuilderGenerator.kt:376 */input
|
686 + | /* ServerBuilderGenerator.kt:344 */;
|
436 687 | self
|
688 + | /* ServerBuilderGenerator.kt:343 */
|
437 689 | }
|
690 + | /* ServerBuilderGenerator.kt:426 */
|
438 691 | #[allow(missing_docs)] // documentation missing in model
|
692 + | /* ServerBuilderGenerator.kt:428 */
|
439 693 | pub(crate) fn set_version_id(
|
440 694 | mut self,
|
441 695 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
442 696 | ) -> Self {
|
697 + | /* ServerBuilderGenerator.kt:429 */
|
443 698 | self.version_id = input.map(|v| v.into());
|
444 699 | self
|
700 + | /* ServerBuilderGenerator.kt:428 */
|
445 701 | }
|
702 + | /* ServerBuilderGenerator.kt:331 */
|
446 703 | #[allow(missing_docs)] // documentation missing in model
|
704 + | /* ServerBuilderGenerator.kt:343 */
|
447 705 | pub fn expected_bucket_owner(
|
448 706 | mut self,
|
449 707 | input: ::std::option::Option<::std::string::String>,
|
450 708 | ) -> Self {
|
451 - | self.expected_bucket_owner = input;
|
709 + | /* ServerBuilderGenerator.kt:344 */
|
710 + | self.expected_bucket_owner =
|
711 + | /* ServerBuilderGenerator.kt:376 */input
|
712 + | /* ServerBuilderGenerator.kt:344 */;
|
452 713 | self
|
714 + | /* ServerBuilderGenerator.kt:343 */
|
453 715 | }
|
716 + | /* ServerBuilderGenerator.kt:426 */
|
454 717 | #[allow(missing_docs)] // documentation missing in model
|
718 + | /* ServerBuilderGenerator.kt:428 */
|
455 719 | pub(crate) fn set_expected_bucket_owner(
|
456 720 | mut self,
|
457 721 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
458 722 | ) -> Self {
|
723 + | /* ServerBuilderGenerator.kt:429 */
|
459 724 | self.expected_bucket_owner = input.map(|v| v.into());
|
460 725 | self
|
726 + | /* ServerBuilderGenerator.kt:428 */
|
461 727 | }
|
462 - | /// Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
463 - | ///
|
728 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
|
729 + | /// /* ServerBuilderGenerator.kt:260 */
|
464 730 | /// The builder fails to construct a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput) if a [`ConstraintViolation`] occurs.
|
465 731 | ///
|
466 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
732 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
733 + | /* ServerBuilderGenerator.kt:271 */
|
467 734 | pub fn build(self) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
|
468 735 | self.build_enforcing_all_constraints()
|
469 736 | }
|
737 + | /* ServerBuilderGenerator.kt:283 */
|
470 738 | fn build_enforcing_all_constraints(
|
471 739 | self,
|
472 740 | ) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
|
473 - | Ok(crate::input::DeleteObjectTaggingInput {
|
474 - | bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
|
741 + | /* ServerBuilderGenerator.kt:287 */
|
742 + | Ok(
|
743 + | /* ServerBuilderGenerator.kt:542 */
|
744 + | crate::input::DeleteObjectTaggingInput {
|
745 + | /* ServerBuilderGenerator.kt:546 */
|
746 + | bucket: self
|
747 + | .bucket
|
748 + | /* ServerBuilderGenerator.kt:569 */
|
749 + | .ok_or(ConstraintViolation::MissingBucket)?,
|
750 + | /* ServerBuilderGenerator.kt:546 */
|
475 751 | key: self
|
476 752 | .key
|
753 + | /* ServerBuilderGenerator.kt:602 */
|
477 754 | .map(|v| match v {
|
478 755 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
479 756 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
480 757 | })
|
758 + | /* ServerBuilderGenerator.kt:614 */
|
481 759 | .map(|res| res.map_err(ConstraintViolation::Key))
|
482 760 | .transpose()?
|
761 + | /* ServerBuilderGenerator.kt:569 */
|
483 762 | .ok_or(ConstraintViolation::MissingKey)?,
|
763 + | /* ServerBuilderGenerator.kt:546 */
|
484 764 | version_id: self.version_id,
|
765 + | /* ServerBuilderGenerator.kt:546 */
|
485 766 | expected_bucket_owner: self.expected_bucket_owner,
|
486 - | })
|
767 + | /* ServerBuilderGenerator.kt:542 */
|
768 + | }, /* ServerBuilderGenerator.kt:287 */
|
769 + | )
|
770 + | /* ServerBuilderGenerator.kt:283 */
|
487 771 | }
|
772 + | /* ServerBuilderGenerator.kt:215 */
|
488 773 | }
|
774 + |
|
775 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
489 776 | }
|
490 - | /// See [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
777 + | /// /* ServerBuilderGenerator.kt:171 */See [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
491 778 | pub mod get_bucket_location_input {
|
492 779 |
|
780 + | /* RustType.kt:516 */
|
493 781 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
494 - | /// Holds one variant for each of the ways the builder can fail.
|
782 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
783 + | /* RustType.kt:516 */
|
495 784 | #[non_exhaustive]
|
785 + | /* ServerBuilderConstraintViolations.kt:75 */
|
496 786 | #[allow(clippy::enum_variant_names)]
|
497 787 | pub enum ConstraintViolation {
|
498 - | /// `bucket` was not provided but it is required when building `GetBucketLocationInput`.
|
788 + | /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `GetBucketLocationInput`.
|
789 + | /* ServerBuilderConstraintViolations.kt:143 */
|
499 790 | MissingBucket,
|
791 + | /* ServerBuilderConstraintViolations.kt:75 */
|
500 792 | }
|
793 + | /* ServerBuilderConstraintViolations.kt:117 */
|
501 794 | impl ::std::fmt::Display for ConstraintViolation {
|
795 + | /* ServerBuilderConstraintViolations.kt:118 */
|
502 796 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
797 + | /* ServerBuilderConstraintViolations.kt:119 */
|
503 798 | match self {
|
504 - | ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetBucketLocationInput`"),
|
505 - | }
|
799 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetBucketLocationInput`"),
|
800 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
801 + | /* ServerBuilderConstraintViolations.kt:118 */
|
506 802 | }
|
803 + | /* ServerBuilderConstraintViolations.kt:117 */
|
507 804 | }
|
805 + | /* ServerBuilderConstraintViolations.kt:84 */
|
508 806 | impl ::std::error::Error for ConstraintViolation {}
|
807 + | /* ServerBuilderConstraintViolations.kt:171 */
|
509 808 | impl ConstraintViolation {
|
510 809 | pub(crate) fn as_validation_exception_field(
|
511 810 | self,
|
512 811 | path: ::std::string::String,
|
513 812 | ) -> crate::model::ValidationExceptionField {
|
514 813 | match self {
|
515 814 | ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
|
516 815 | message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
|
517 816 | path: path + "/Bucket",
|
518 817 | },
|
519 818 | }
|
520 819 | }
|
521 820 | }
|
821 + | /* ServerBuilderGenerator.kt:234 */
|
522 822 | impl ::std::convert::From<ConstraintViolation>
|
523 823 | for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
|
524 824 | {
|
525 825 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
526 826 | let first_validation_exception_field =
|
527 827 | constraint_violation.as_validation_exception_field("".to_owned());
|
528 828 | let validation_exception = crate::error::ValidationException {
|
529 829 | message: format!(
|
530 830 | "1 validation error detected. {}",
|
531 831 | &first_validation_exception_field.message
|
532 832 | ),
|
533 833 | field_list: Some(vec![first_validation_exception_field]),
|
534 834 | };
|
535 835 | Self::ConstraintViolation(
|
536 836 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
537 837 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
538 838 | )
|
539 839 | }
|
540 840 | }
|
841 + | /* ServerBuilderGenerator.kt:244 */
|
541 842 | impl ::std::convert::From<Builder>
|
542 843 | for crate::constrained::MaybeConstrained<crate::input::GetBucketLocationInput>
|
543 844 | {
|
544 845 | fn from(builder: Builder) -> Self {
|
545 846 | Self::Unconstrained(builder)
|
546 847 | }
|
547 848 | }
|
849 + | /* ServerBuilderGenerator.kt:446 */
|
548 850 | impl ::std::convert::TryFrom<Builder> for crate::input::GetBucketLocationInput {
|
549 851 | type Error = ConstraintViolation;
|
550 852 |
|
551 853 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
552 854 | builder.build()
|
553 855 | }
|
554 856 | }
|
555 - | /// A builder for [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
857 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
858 + | /* RustType.kt:516 */
|
556 859 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
860 + | /* ServerBuilderGenerator.kt:211 */
|
557 861 | pub struct Builder {
|
862 + | /* ServerBuilderGenerator.kt:308 */
|
558 863 | pub(crate) bucket: ::std::option::Option<::std::string::String>,
|
864 + | /* ServerBuilderGenerator.kt:211 */
|
559 865 | }
|
866 + | /* ServerBuilderGenerator.kt:215 */
|
560 867 | impl Builder {
|
868 + | /* ServerBuilderGenerator.kt:331 */
|
561 869 | #[allow(missing_docs)] // documentation missing in model
|
870 + | /* ServerBuilderGenerator.kt:343 */
|
562 871 | pub fn bucket(mut self, input: ::std::string::String) -> Self {
|
563 - | self.bucket = Some(input);
|
872 + | /* ServerBuilderGenerator.kt:344 */
|
873 + | self.bucket =
|
874 + | /* ServerBuilderGenerator.kt:345 */Some(
|
875 + | /* ServerBuilderGenerator.kt:376 */input
|
876 + | /* ServerBuilderGenerator.kt:345 */)
|
877 + | /* ServerBuilderGenerator.kt:344 */;
|
564 878 | self
|
879 + | /* ServerBuilderGenerator.kt:343 */
|
565 880 | }
|
881 + | /* ServerBuilderGenerator.kt:426 */
|
566 882 | #[allow(missing_docs)] // documentation missing in model
|
883 + | /* ServerBuilderGenerator.kt:428 */
|
567 884 | pub(crate) fn set_bucket(
|
568 885 | mut self,
|
569 886 | input: impl ::std::convert::Into<::std::string::String>,
|
570 887 | ) -> Self {
|
888 + | /* ServerBuilderGenerator.kt:429 */
|
571 889 | self.bucket = Some(input.into());
|
572 890 | self
|
891 + | /* ServerBuilderGenerator.kt:428 */
|
573 892 | }
|
574 - | /// Consumes the builder and constructs a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
575 - | ///
|
893 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
|
894 + | /// /* ServerBuilderGenerator.kt:260 */
|
576 895 | /// The builder fails to construct a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput) if a [`ConstraintViolation`] occurs.
|
577 896 | ///
|
897 + | /* ServerBuilderGenerator.kt:271 */
|
578 898 | pub fn build(self) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
|
579 899 | self.build_enforcing_all_constraints()
|
580 900 | }
|
901 + | /* ServerBuilderGenerator.kt:283 */
|
581 902 | fn build_enforcing_all_constraints(
|
582 903 | self,
|
583 904 | ) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
|
584 - | Ok(crate::input::GetBucketLocationInput {
|
585 - | bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
|
586 - | })
|
905 + | /* ServerBuilderGenerator.kt:287 */
|
906 + | Ok(
|
907 + | /* ServerBuilderGenerator.kt:542 */
|
908 + | crate::input::GetBucketLocationInput {
|
909 + | /* ServerBuilderGenerator.kt:546 */
|
910 + | bucket: self
|
911 + | .bucket
|
912 + | /* ServerBuilderGenerator.kt:569 */
|
913 + | .ok_or(ConstraintViolation::MissingBucket)?,
|
914 + | /* ServerBuilderGenerator.kt:542 */
|
915 + | }, /* ServerBuilderGenerator.kt:287 */
|
916 + | )
|
917 + | /* ServerBuilderGenerator.kt:283 */
|
587 918 | }
|
919 + | /* ServerBuilderGenerator.kt:215 */
|
588 920 | }
|
921 + |
|
922 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
589 923 | }
|
590 - | /// See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
924 + | /// /* ServerBuilderGenerator.kt:171 */See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
591 925 | pub mod list_objects_v2_input {
|
592 926 |
|
927 + | /* RustType.kt:516 */
|
593 928 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
594 - | /// Holds one variant for each of the ways the builder can fail.
|
929 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
930 + | /* RustType.kt:516 */
|
595 931 | #[non_exhaustive]
|
932 + | /* ServerBuilderConstraintViolations.kt:75 */
|
596 933 | #[allow(clippy::enum_variant_names)]
|
597 934 | pub enum ConstraintViolation {
|
598 - | /// `bucket` was not provided but it is required when building `ListObjectsV2Input`.
|
935 + | /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `ListObjectsV2Input`.
|
936 + | /* ServerBuilderConstraintViolations.kt:143 */
|
599 937 | MissingBucket,
|
600 - | /// Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
|
938 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
|
939 + | /* RustType.kt:516 */
|
601 940 | #[doc(hidden)]
|
941 + | /* ServerBuilderConstraintViolations.kt:164 */
|
602 942 | EncodingType(crate::model::encoding_type::ConstraintViolation),
|
603 - | /// Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
|
943 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
|
944 + | /* RustType.kt:516 */
|
604 945 | #[doc(hidden)]
|
946 + | /* ServerBuilderConstraintViolations.kt:164 */
|
605 947 | RequestPayer(crate::model::request_payer::ConstraintViolation),
|
948 + | /* ServerBuilderConstraintViolations.kt:75 */
|
606 949 | }
|
950 + | /* ServerBuilderConstraintViolations.kt:117 */
|
607 951 | impl ::std::fmt::Display for ConstraintViolation {
|
952 + | /* ServerBuilderConstraintViolations.kt:118 */
|
608 953 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
954 + | /* ServerBuilderConstraintViolations.kt:119 */
|
609 955 | match self {
|
610 - | ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `ListObjectsV2Input`"),
|
611 - | ConstraintViolation::EncodingType(_) => write!(f, "constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`"),
|
612 - | ConstraintViolation::RequestPayer(_) => write!(f, "constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`"),
|
613 - | }
|
956 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `ListObjectsV2Input`"),
|
957 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::EncodingType(_) => write!(f, "constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`"),
|
958 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::RequestPayer(_) => write!(f, "constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`"),
|
959 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
960 + | /* ServerBuilderConstraintViolations.kt:118 */
|
614 961 | }
|
962 + | /* ServerBuilderConstraintViolations.kt:117 */
|
615 963 | }
|
964 + | /* ServerBuilderConstraintViolations.kt:84 */
|
616 965 | impl ::std::error::Error for ConstraintViolation {}
|
966 + | /* ServerBuilderConstraintViolations.kt:171 */
|
617 967 | impl ConstraintViolation {
|
618 968 | pub(crate) fn as_validation_exception_field(
|
619 969 | self,
|
620 970 | path: ::std::string::String,
|
621 971 | ) -> crate::model::ValidationExceptionField {
|
622 972 | match self {
|
623 973 | ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
|
624 974 | message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
|
625 975 | path: path + "/Bucket",
|
626 976 | },
|
627 977 | ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
|
628 978 | ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
|
629 979 | }
|
630 980 | }
|
631 981 | }
|
982 + | /* ServerBuilderGenerator.kt:234 */
|
632 983 | impl ::std::convert::From<ConstraintViolation>
|
633 984 | for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
|
634 985 | {
|
635 986 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
636 987 | let first_validation_exception_field =
|
637 988 | constraint_violation.as_validation_exception_field("".to_owned());
|
638 989 | let validation_exception = crate::error::ValidationException {
|
639 990 | message: format!(
|
640 991 | "1 validation error detected. {}",
|
641 992 | &first_validation_exception_field.message
|
642 993 | ),
|
643 994 | field_list: Some(vec![first_validation_exception_field]),
|
644 995 | };
|
645 996 | Self::ConstraintViolation(
|
646 997 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
647 998 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
648 999 | )
|
649 1000 | }
|
650 1001 | }
|
1002 + | /* ServerBuilderGenerator.kt:244 */
|
651 1003 | impl ::std::convert::From<Builder>
|
652 1004 | for crate::constrained::MaybeConstrained<crate::input::ListObjectsV2Input>
|
653 1005 | {
|
654 1006 | fn from(builder: Builder) -> Self {
|
655 1007 | Self::Unconstrained(builder)
|
656 1008 | }
|
657 1009 | }
|
1010 + | /* ServerBuilderGenerator.kt:446 */
|
658 1011 | impl ::std::convert::TryFrom<Builder> for crate::input::ListObjectsV2Input {
|
659 1012 | type Error = ConstraintViolation;
|
660 1013 |
|
661 1014 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
662 1015 | builder.build()
|
663 1016 | }
|
664 1017 | }
|
665 - | /// A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
1018 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
1019 + | /* RustType.kt:516 */
|
666 1020 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1021 + | /* ServerBuilderGenerator.kt:211 */
|
667 1022 | pub struct Builder {
|
1023 + | /* ServerBuilderGenerator.kt:308 */
|
668 1024 | pub(crate) bucket: ::std::option::Option<::std::string::String>,
|
1025 + | /* ServerBuilderGenerator.kt:308 */
|
669 1026 | pub(crate) delimiter: ::std::option::Option<::std::string::String>,
|
1027 + | /* ServerBuilderGenerator.kt:308 */
|
670 1028 | pub(crate) encoding_type:
|
671 1029 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EncodingType>>,
|
672 - | pub(crate) max_keys: ::std::option::Option<i32>,
|
1030 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) max_keys: ::std::option::Option<i32>,
|
1031 + | /* ServerBuilderGenerator.kt:308 */
|
673 1032 | pub(crate) prefix: ::std::option::Option<::std::string::String>,
|
1033 + | /* ServerBuilderGenerator.kt:308 */
|
674 1034 | pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
|
1035 + | /* ServerBuilderGenerator.kt:308 */
|
675 1036 | pub(crate) fetch_owner: ::std::option::Option<bool>,
|
1037 + | /* ServerBuilderGenerator.kt:308 */
|
676 1038 | pub(crate) start_after: ::std::option::Option<::std::string::String>,
|
1039 + | /* ServerBuilderGenerator.kt:308 */
|
677 1040 | pub(crate) request_payer:
|
678 1041 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RequestPayer>>,
|
1042 + | /* ServerBuilderGenerator.kt:308 */
|
679 1043 | pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
|
1044 + | /* ServerBuilderGenerator.kt:211 */
|
680 1045 | }
|
1046 + | /* ServerBuilderGenerator.kt:215 */
|
681 1047 | impl Builder {
|
1048 + | /* ServerBuilderGenerator.kt:331 */
|
682 1049 | #[allow(missing_docs)] // documentation missing in model
|
1050 + | /* ServerBuilderGenerator.kt:343 */
|
683 1051 | pub fn bucket(mut self, input: ::std::string::String) -> Self {
|
684 - | self.bucket = Some(input);
|
1052 + | /* ServerBuilderGenerator.kt:344 */
|
1053 + | self.bucket =
|
1054 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1055 + | /* ServerBuilderGenerator.kt:376 */input
|
1056 + | /* ServerBuilderGenerator.kt:345 */)
|
1057 + | /* ServerBuilderGenerator.kt:344 */;
|
685 1058 | self
|
1059 + | /* ServerBuilderGenerator.kt:343 */
|
686 1060 | }
|
1061 + | /* ServerBuilderGenerator.kt:426 */
|
687 1062 | #[allow(missing_docs)] // documentation missing in model
|
1063 + | /* ServerBuilderGenerator.kt:428 */
|
688 1064 | pub(crate) fn set_bucket(
|
689 1065 | mut self,
|
690 1066 | input: impl ::std::convert::Into<::std::string::String>,
|
691 1067 | ) -> Self {
|
1068 + | /* ServerBuilderGenerator.kt:429 */
|
692 1069 | self.bucket = Some(input.into());
|
693 1070 | self
|
1071 + | /* ServerBuilderGenerator.kt:428 */
|
694 1072 | }
|
1073 + | /* ServerBuilderGenerator.kt:331 */
|
695 1074 | #[allow(missing_docs)] // documentation missing in model
|
1075 + | /* ServerBuilderGenerator.kt:343 */
|
696 1076 | pub fn delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
697 - | self.delimiter = input;
|
1077 + | /* ServerBuilderGenerator.kt:344 */
|
1078 + | self.delimiter =
|
1079 + | /* ServerBuilderGenerator.kt:376 */input
|
1080 + | /* ServerBuilderGenerator.kt:344 */;
|
698 1081 | self
|
1082 + | /* ServerBuilderGenerator.kt:343 */
|
699 1083 | }
|
1084 + | /* ServerBuilderGenerator.kt:426 */
|
700 1085 | #[allow(missing_docs)] // documentation missing in model
|
1086 + | /* ServerBuilderGenerator.kt:428 */
|
701 1087 | pub(crate) fn set_delimiter(
|
702 1088 | mut self,
|
703 1089 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
704 1090 | ) -> Self {
|
1091 + | /* ServerBuilderGenerator.kt:429 */
|
705 1092 | self.delimiter = input.map(|v| v.into());
|
706 1093 | self
|
1094 + | /* ServerBuilderGenerator.kt:428 */
|
707 1095 | }
|
1096 + | /* ServerBuilderGenerator.kt:331 */
|
708 1097 | #[allow(missing_docs)] // documentation missing in model
|
1098 + | /* ServerBuilderGenerator.kt:343 */
|
709 1099 | pub fn encoding_type(
|
710 1100 | mut self,
|
711 1101 | input: ::std::option::Option<crate::model::EncodingType>,
|
712 1102 | ) -> Self {
|
713 - | self.encoding_type = input.map(
|
714 - | #[allow(clippy::redundant_closure)]
|
715 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
716 - | );
|
1103 + | /* ServerBuilderGenerator.kt:344 */
|
1104 + | self.encoding_type =
|
1105 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1106 + | /* ServerBuilderGenerator.kt:344 */;
|
717 1107 | self
|
1108 + | /* ServerBuilderGenerator.kt:343 */
|
718 1109 | }
|
1110 + | /* ServerBuilderGenerator.kt:426 */
|
719 1111 | #[allow(missing_docs)] // documentation missing in model
|
1112 + | /* ServerBuilderGenerator.kt:428 */
|
720 1113 | pub(crate) fn set_encoding_type(
|
721 1114 | mut self,
|
722 1115 | input: Option<
|
723 1116 | impl ::std::convert::Into<
|
724 1117 | crate::constrained::MaybeConstrained<crate::model::EncodingType>,
|
725 1118 | >,
|
726 1119 | >,
|
727 1120 | ) -> Self {
|
1121 + | /* ServerBuilderGenerator.kt:429 */
|
728 1122 | self.encoding_type = input.map(|v| v.into());
|
729 1123 | self
|
1124 + | /* ServerBuilderGenerator.kt:428 */
|
730 1125 | }
|
1126 + | /* ServerBuilderGenerator.kt:331 */
|
731 1127 | #[allow(missing_docs)] // documentation missing in model
|
1128 + | /* ServerBuilderGenerator.kt:343 */
|
732 1129 | pub fn max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
|
733 - | self.max_keys = input;
|
1130 + | /* ServerBuilderGenerator.kt:344 */
|
1131 + | self.max_keys =
|
1132 + | /* ServerBuilderGenerator.kt:376 */input
|
1133 + | /* ServerBuilderGenerator.kt:344 */;
|
734 1134 | self
|
1135 + | /* ServerBuilderGenerator.kt:343 */
|
735 1136 | }
|
1137 + | /* ServerBuilderGenerator.kt:426 */
|
736 1138 | #[allow(missing_docs)] // documentation missing in model
|
1139 + | /* ServerBuilderGenerator.kt:428 */
|
737 1140 | pub(crate) fn set_max_keys(
|
738 1141 | mut self,
|
739 1142 | input: Option<impl ::std::convert::Into<i32>>,
|
740 1143 | ) -> Self {
|
1144 + | /* ServerBuilderGenerator.kt:429 */
|
741 1145 | self.max_keys = input.map(|v| v.into());
|
742 1146 | self
|
1147 + | /* ServerBuilderGenerator.kt:428 */
|
743 1148 | }
|
1149 + | /* ServerBuilderGenerator.kt:331 */
|
744 1150 | #[allow(missing_docs)] // documentation missing in model
|
1151 + | /* ServerBuilderGenerator.kt:343 */
|
745 1152 | pub fn prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
746 - | self.prefix = input;
|
1153 + | /* ServerBuilderGenerator.kt:344 */
|
1154 + | self.prefix =
|
1155 + | /* ServerBuilderGenerator.kt:376 */input
|
1156 + | /* ServerBuilderGenerator.kt:344 */;
|
747 1157 | self
|
1158 + | /* ServerBuilderGenerator.kt:343 */
|
748 1159 | }
|
1160 + | /* ServerBuilderGenerator.kt:426 */
|
749 1161 | #[allow(missing_docs)] // documentation missing in model
|
1162 + | /* ServerBuilderGenerator.kt:428 */
|
750 1163 | pub(crate) fn set_prefix(
|
751 1164 | mut self,
|
752 1165 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
753 1166 | ) -> Self {
|
1167 + | /* ServerBuilderGenerator.kt:429 */
|
754 1168 | self.prefix = input.map(|v| v.into());
|
755 1169 | self
|
1170 + | /* ServerBuilderGenerator.kt:428 */
|
756 1171 | }
|
1172 + | /* ServerBuilderGenerator.kt:331 */
|
757 1173 | #[allow(missing_docs)] // documentation missing in model
|
1174 + | /* ServerBuilderGenerator.kt:343 */
|
758 1175 | pub fn continuation_token(
|
759 1176 | mut self,
|
760 1177 | input: ::std::option::Option<::std::string::String>,
|
761 1178 | ) -> Self {
|
762 - | self.continuation_token = input;
|
1179 + | /* ServerBuilderGenerator.kt:344 */
|
1180 + | self.continuation_token =
|
1181 + | /* ServerBuilderGenerator.kt:376 */input
|
1182 + | /* ServerBuilderGenerator.kt:344 */;
|
763 1183 | self
|
1184 + | /* ServerBuilderGenerator.kt:343 */
|
764 1185 | }
|
1186 + | /* ServerBuilderGenerator.kt:426 */
|
765 1187 | #[allow(missing_docs)] // documentation missing in model
|
1188 + | /* ServerBuilderGenerator.kt:428 */
|
766 1189 | pub(crate) fn set_continuation_token(
|
767 1190 | mut self,
|
768 1191 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
769 1192 | ) -> Self {
|
1193 + | /* ServerBuilderGenerator.kt:429 */
|
770 1194 | self.continuation_token = input.map(|v| v.into());
|
771 1195 | self
|
1196 + | /* ServerBuilderGenerator.kt:428 */
|
772 1197 | }
|
1198 + | /* ServerBuilderGenerator.kt:331 */
|
773 1199 | #[allow(missing_docs)] // documentation missing in model
|
1200 + | /* ServerBuilderGenerator.kt:343 */
|
774 1201 | pub fn fetch_owner(mut self, input: ::std::option::Option<bool>) -> Self {
|
775 - | self.fetch_owner = input;
|
1202 + | /* ServerBuilderGenerator.kt:344 */
|
1203 + | self.fetch_owner =
|
1204 + | /* ServerBuilderGenerator.kt:376 */input
|
1205 + | /* ServerBuilderGenerator.kt:344 */;
|
776 1206 | self
|
1207 + | /* ServerBuilderGenerator.kt:343 */
|
777 1208 | }
|
1209 + | /* ServerBuilderGenerator.kt:426 */
|
778 1210 | #[allow(missing_docs)] // documentation missing in model
|
1211 + | /* ServerBuilderGenerator.kt:428 */
|
779 1212 | pub(crate) fn set_fetch_owner(
|
780 1213 | mut self,
|
781 1214 | input: Option<impl ::std::convert::Into<bool>>,
|
782 1215 | ) -> Self {
|
1216 + | /* ServerBuilderGenerator.kt:429 */
|
783 1217 | self.fetch_owner = input.map(|v| v.into());
|
784 1218 | self
|
1219 + | /* ServerBuilderGenerator.kt:428 */
|
785 1220 | }
|
1221 + | /* ServerBuilderGenerator.kt:331 */
|
786 1222 | #[allow(missing_docs)] // documentation missing in model
|
1223 + | /* ServerBuilderGenerator.kt:343 */
|
787 1224 | pub fn start_after(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
788 - | self.start_after = input;
|
1225 + | /* ServerBuilderGenerator.kt:344 */
|
1226 + | self.start_after =
|
1227 + | /* ServerBuilderGenerator.kt:376 */input
|
1228 + | /* ServerBuilderGenerator.kt:344 */;
|
789 1229 | self
|
1230 + | /* ServerBuilderGenerator.kt:343 */
|
790 1231 | }
|
1232 + | /* ServerBuilderGenerator.kt:426 */
|
791 1233 | #[allow(missing_docs)] // documentation missing in model
|
1234 + | /* ServerBuilderGenerator.kt:428 */
|
792 1235 | pub(crate) fn set_start_after(
|
793 1236 | mut self,
|
794 1237 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
795 1238 | ) -> Self {
|
1239 + | /* ServerBuilderGenerator.kt:429 */
|
796 1240 | self.start_after = input.map(|v| v.into());
|
797 1241 | self
|
1242 + | /* ServerBuilderGenerator.kt:428 */
|
798 1243 | }
|
1244 + | /* ServerBuilderGenerator.kt:331 */
|
799 1245 | #[allow(missing_docs)] // documentation missing in model
|
1246 + | /* ServerBuilderGenerator.kt:343 */
|
800 1247 | pub fn request_payer(
|
801 1248 | mut self,
|
802 1249 | input: ::std::option::Option<crate::model::RequestPayer>,
|
803 1250 | ) -> Self {
|
804 - | self.request_payer = input.map(
|
805 - | #[allow(clippy::redundant_closure)]
|
806 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
807 - | );
|
1251 + | /* ServerBuilderGenerator.kt:344 */
|
1252 + | self.request_payer =
|
1253 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1254 + | /* ServerBuilderGenerator.kt:344 */;
|
808 1255 | self
|
1256 + | /* ServerBuilderGenerator.kt:343 */
|
809 1257 | }
|
1258 + | /* ServerBuilderGenerator.kt:426 */
|
810 1259 | #[allow(missing_docs)] // documentation missing in model
|
1260 + | /* ServerBuilderGenerator.kt:428 */
|
811 1261 | pub(crate) fn set_request_payer(
|
812 1262 | mut self,
|
813 1263 | input: Option<
|
814 1264 | impl ::std::convert::Into<
|
815 1265 | crate::constrained::MaybeConstrained<crate::model::RequestPayer>,
|
816 1266 | >,
|
817 1267 | >,
|
818 1268 | ) -> Self {
|
1269 + | /* ServerBuilderGenerator.kt:429 */
|
819 1270 | self.request_payer = input.map(|v| v.into());
|
820 1271 | self
|
1272 + | /* ServerBuilderGenerator.kt:428 */
|
821 1273 | }
|
1274 + | /* ServerBuilderGenerator.kt:331 */
|
822 1275 | #[allow(missing_docs)] // documentation missing in model
|
1276 + | /* ServerBuilderGenerator.kt:343 */
|
823 1277 | pub fn expected_bucket_owner(
|
824 1278 | mut self,
|
825 1279 | input: ::std::option::Option<::std::string::String>,
|
826 1280 | ) -> Self {
|
827 - | self.expected_bucket_owner = input;
|
1281 + | /* ServerBuilderGenerator.kt:344 */
|
1282 + | self.expected_bucket_owner =
|
1283 + | /* ServerBuilderGenerator.kt:376 */input
|
1284 + | /* ServerBuilderGenerator.kt:344 */;
|
828 1285 | self
|
1286 + | /* ServerBuilderGenerator.kt:343 */
|
829 1287 | }
|
1288 + | /* ServerBuilderGenerator.kt:426 */
|
830 1289 | #[allow(missing_docs)] // documentation missing in model
|
1290 + | /* ServerBuilderGenerator.kt:428 */
|
831 1291 | pub(crate) fn set_expected_bucket_owner(
|
832 1292 | mut self,
|
833 1293 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
834 1294 | ) -> Self {
|
1295 + | /* ServerBuilderGenerator.kt:429 */
|
835 1296 | self.expected_bucket_owner = input.map(|v| v.into());
|
836 1297 | self
|
1298 + | /* ServerBuilderGenerator.kt:428 */
|
837 1299 | }
|
838 - | /// Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
839 - | ///
|
1300 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
|
1301 + | /// /* ServerBuilderGenerator.kt:260 */
|
840 1302 | /// The builder fails to construct a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input) if a [`ConstraintViolation`] occurs.
|
841 1303 | ///
|
842 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1304 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1305 + | /* ServerBuilderGenerator.kt:271 */
|
843 1306 | pub fn build(self) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
|
844 1307 | self.build_enforcing_all_constraints()
|
845 1308 | }
|
1309 + | /* ServerBuilderGenerator.kt:283 */
|
846 1310 | fn build_enforcing_all_constraints(
|
847 1311 | self,
|
848 1312 | ) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
|
849 - | Ok(crate::input::ListObjectsV2Input {
|
850 - | bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
|
1313 + | /* ServerBuilderGenerator.kt:287 */
|
1314 + | Ok(
|
1315 + | /* ServerBuilderGenerator.kt:542 */
|
1316 + | crate::input::ListObjectsV2Input {
|
1317 + | /* ServerBuilderGenerator.kt:546 */
|
1318 + | bucket: self
|
1319 + | .bucket
|
1320 + | /* ServerBuilderGenerator.kt:569 */
|
1321 + | .ok_or(ConstraintViolation::MissingBucket)?,
|
1322 + | /* ServerBuilderGenerator.kt:546 */
|
851 1323 | delimiter: self.delimiter,
|
1324 + | /* ServerBuilderGenerator.kt:546 */
|
852 1325 | encoding_type: self
|
853 1326 | .encoding_type
|
1327 + | /* ServerBuilderGenerator.kt:602 */
|
854 1328 | .map(|v| match v {
|
855 1329 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
856 1330 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
857 1331 | })
|
1332 + | /* ServerBuilderGenerator.kt:614 */
|
858 1333 | .map(|res| res.map_err(ConstraintViolation::EncodingType))
|
859 1334 | .transpose()?,
|
1335 + | /* ServerBuilderGenerator.kt:546 */
|
860 1336 | max_keys: self.max_keys,
|
1337 + | /* ServerBuilderGenerator.kt:546 */
|
861 1338 | prefix: self.prefix,
|
1339 + | /* ServerBuilderGenerator.kt:546 */
|
862 1340 | continuation_token: self.continuation_token,
|
1341 + | /* ServerBuilderGenerator.kt:546 */
|
863 1342 | fetch_owner: self.fetch_owner,
|
1343 + | /* ServerBuilderGenerator.kt:546 */
|
864 1344 | start_after: self.start_after,
|
1345 + | /* ServerBuilderGenerator.kt:546 */
|
865 1346 | request_payer: self
|
866 1347 | .request_payer
|
1348 + | /* ServerBuilderGenerator.kt:602 */
|
867 1349 | .map(|v| match v {
|
868 1350 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
869 1351 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
870 1352 | })
|
1353 + | /* ServerBuilderGenerator.kt:614 */
|
871 1354 | .map(|res| res.map_err(ConstraintViolation::RequestPayer))
|
872 1355 | .transpose()?,
|
1356 + | /* ServerBuilderGenerator.kt:546 */
|
873 1357 | expected_bucket_owner: self.expected_bucket_owner,
|
874 - | })
|
1358 + | /* ServerBuilderGenerator.kt:542 */
|
1359 + | }, /* ServerBuilderGenerator.kt:287 */
|
1360 + | )
|
1361 + | /* ServerBuilderGenerator.kt:283 */
|
875 1362 | }
|
1363 + | /* ServerBuilderGenerator.kt:215 */
|
876 1364 | }
|
1365 + |
|
1366 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
877 1367 | }
|