1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - |
|
3 - | /// Describes one specific validation failure for an input member.
|
2 + | /* StructureGenerator.kt:197 */
|
3 + | /// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
|
4 + | /* RustType.kt:516 */
|
4 5 | #[derive(
|
5 6 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
6 7 | )]
|
7 - | pub struct ValidationExceptionField {
|
8 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
8 + | pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
|
9 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
9 10 | pub path: ::std::string::String,
|
10 - | /// A detailed description of the validation failure.
|
11 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
11 12 | pub message: ::std::string::String,
|
13 + | /* StructureGenerator.kt:201 */
|
12 14 | }
|
15 + | /* StructureGenerator.kt:135 */
|
13 16 | impl ValidationExceptionField {
|
14 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
17 + | /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
18 + | /* StructureGenerator.kt:166 */
|
15 19 | pub fn path(&self) -> &str {
|
20 + | /* StructureGenerator.kt:171 */
|
16 21 | use std::ops::Deref;
|
17 22 | self.path.deref()
|
23 + | /* StructureGenerator.kt:166 */
|
18 24 | }
|
19 - | /// A detailed description of the validation failure.
|
25 + | /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
|
26 + | /* StructureGenerator.kt:166 */
|
20 27 | pub fn message(&self) -> &str {
|
28 + | /* StructureGenerator.kt:171 */
|
21 29 | use std::ops::Deref;
|
22 30 | self.message.deref()
|
31 + | /* StructureGenerator.kt:166 */
|
23 32 | }
|
33 + | /* StructureGenerator.kt:135 */
|
24 34 | }
|
35 + | /* ServerCodegenVisitor.kt:345 */
|
25 36 | impl ValidationExceptionField {
|
26 - | /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
37 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
38 + | /* ServerBuilderGenerator.kt:295 */
|
27 39 | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
40 + | /* ServerBuilderGenerator.kt:296 */
|
28 41 | crate::model::validation_exception_field::Builder::default()
|
42 + | /* ServerBuilderGenerator.kt:295 */
|
29 43 | }
|
44 + | /* ServerCodegenVisitor.kt:345 */
|
30 45 | }
|
31 46 |
|
47 + | /* ConstrainedStringGenerator.kt:82 */
|
32 48 | #[allow(missing_docs)] // documentation missing in model
|
33 - | ///
|
49 + | /// /* ConstrainedStringGenerator.kt:83 */
|
34 50 | /// This is a constrained type because its corresponding modeled Smithy shape has one or more
|
35 51 | /// [constraint traits]. Use [`ObjectKey::try_from`] to construct values of this type.
|
36 52 | ///
|
37 53 | /// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
|
38 54 | ///
|
55 + | /* RustType.kt:516 */
|
39 56 | #[derive(
|
40 57 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
41 58 | )]
|
42 - | pub struct ObjectKey(pub(crate) ::std::string::String);
|
59 + | pub /* ConstrainedStringGenerator.kt:86 */ struct ObjectKey(pub(crate) ::std::string::String);
|
60 + | /* ConstrainedStringGenerator.kt:90 */
|
43 61 | impl ObjectKey {
|
44 62 | /// Extracts a string slice containing the entire underlying `String`.
|
45 63 | pub fn as_str(&self) -> &str {
|
46 64 | &self.0
|
47 65 | }
|
48 66 |
|
49 67 | /// Returns an immutable reference to the underlying [`::std::string::String`].
|
50 68 | pub fn inner(&self) -> &::std::string::String {
|
51 69 | &self.0
|
52 70 | }
|
53 71 |
|
54 72 | /// Consumes the value, returning the underlying [`::std::string::String`].
|
55 73 | pub fn into_inner(self) -> ::std::string::String {
|
56 74 | self.0
|
57 75 | }
|
58 76 | }
|
77 + | /* TraitInfo.kt:41 */
|
59 78 | impl ObjectKey {
|
60 79 | fn check_length(
|
61 80 | string: &str,
|
62 81 | ) -> ::std::result::Result<(), crate::model::object_key::ConstraintViolation> {
|
63 82 | let length = string.chars().count();
|
64 83 |
|
65 84 | if 1 <= length {
|
66 85 | Ok(())
|
67 86 | } else {
|
68 87 | Err(crate::model::object_key::ConstraintViolation::Length(
|
69 88 | length,
|
70 89 | ))
|
71 90 | }
|
72 91 | }
|
73 92 | }
|
93 + | /* TraitInfo.kt:57 */
|
74 94 | impl ::std::convert::TryFrom<::std::string::String> for ObjectKey {
|
75 95 | type Error = crate::model::object_key::ConstraintViolation;
|
76 96 |
|
77 97 | /// Constructs a `ObjectKey` from an [`::std::string::String`], failing when the provided value does not satisfy the modeled constraints.
|
78 98 | fn try_from(value: ::std::string::String) -> ::std::result::Result<Self, Self::Error> {
|
79 99 | Self::check_length(&value)?;
|
80 100 |
|
81 101 | Ok(Self(value))
|
82 102 | }
|
83 103 | }
|
104 + | /* ConstrainedStringGenerator.kt:112 */
|
84 105 | impl crate::constrained::Constrained for ObjectKey {
|
85 106 | type Unconstrained = ::std::string::String;
|
86 107 | }
|
87 108 |
|
88 109 | impl ::std::convert::From<::std::string::String>
|
89 110 | for crate::constrained::MaybeConstrained<crate::model::ObjectKey>
|
90 111 | {
|
91 112 | fn from(value: ::std::string::String) -> Self {
|
92 113 | Self::Unconstrained(value)
|
93 114 | }
|
94 115 | }
|
95 116 |
|
96 117 | impl ::std::fmt::Display for ObjectKey {
|
97 118 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
98 119 | self.0.fmt(f)
|
99 120 | }
|
100 121 | }
|
101 122 |
|
102 123 | impl ::std::convert::From<ObjectKey> for ::std::string::String {
|
103 124 | fn from(value: ObjectKey) -> Self {
|
104 125 | value.into_inner()
|
105 126 | }
|
106 127 | }
|
107 128 |
|
129 + | /* EnumGenerator.kt:154 */
|
108 130 | #[allow(missing_docs)] // documentation missing in model
|
131 + | /* RustType.kt:516 */
|
109 132 | #[derive(
|
110 133 | ::std::clone::Clone,
|
111 134 | ::std::cmp::Eq,
|
112 135 | ::std::cmp::Ord,
|
113 136 | ::std::cmp::PartialEq,
|
114 137 | ::std::cmp::PartialOrd,
|
115 138 | ::std::fmt::Debug,
|
116 139 | ::std::hash::Hash,
|
117 140 | )]
|
118 - | pub enum BucketLocationConstraint {
|
141 + | pub /* EnumGenerator.kt:267 */ enum BucketLocationConstraint {
|
142 + | /* EnumGenerator.kt:154 */
|
119 143 | #[allow(missing_docs)] // documentation missing in model
|
144 + | /* EnumGenerator.kt:143 */
|
120 145 | UsWest2,
|
146 + | /* EnumGenerator.kt:267 */
|
121 147 | }
|
122 - | /// See [`BucketLocationConstraint`](crate::model::BucketLocationConstraint).
|
148 + | /// /* CodegenDelegator.kt:51 */See [`BucketLocationConstraint`](crate::model::BucketLocationConstraint).
|
123 149 | pub mod bucket_location_constraint {
|
124 150 | #[derive(Debug, PartialEq)]
|
125 151 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
126 152 |
|
127 153 | impl ::std::fmt::Display for ConstraintViolation {
|
128 154 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
129 155 | write!(
|
130 156 | f,
|
131 157 | r#"Value provided for 'com.amazonaws.s3#BucketLocationConstraint' failed to satisfy constraint: Member must satisfy enum value set: [us-west-2]"#
|
132 158 | )
|
133 159 | }
|
134 160 | }
|
135 161 |
|
136 162 | impl ::std::error::Error for ConstraintViolation {}
|
163 + |
|
164 + | /* ServerEnumGenerator.kt:46 */
|
137 165 | }
|
166 + | /* ServerEnumGenerator.kt:85 */
|
138 167 | impl ::std::convert::TryFrom<&str> for BucketLocationConstraint {
|
139 168 | type Error = crate::model::bucket_location_constraint::ConstraintViolation;
|
140 169 | fn try_from(
|
141 170 | s: &str,
|
142 171 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
143 172 | match s {
|
144 173 | "us-west-2" => Ok(BucketLocationConstraint::UsWest2),
|
145 174 | _ => Err(crate::model::bucket_location_constraint::ConstraintViolation(s.to_owned())),
|
146 175 | }
|
147 176 | }
|
148 177 | }
|
149 178 | impl ::std::convert::TryFrom<::std::string::String> for BucketLocationConstraint {
|
150 179 | type Error = crate::model::bucket_location_constraint::ConstraintViolation;
|
151 180 | fn try_from(
|
152 181 | s: ::std::string::String,
|
153 182 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
154 183 | {
|
155 184 | s.as_str().try_into()
|
156 185 | }
|
157 186 | }
|
187 + | /* ServerEnumGenerator.kt:145 */
|
158 188 | impl std::str::FromStr for BucketLocationConstraint {
|
159 189 | type Err = crate::model::bucket_location_constraint::ConstraintViolation;
|
160 190 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
161 191 | Self::try_from(s)
|
162 192 | }
|
163 193 | }
|
194 + | /* EnumGenerator.kt:274 */
|
164 195 | impl BucketLocationConstraint {
|
165 196 | /// Returns the `&str` value of the enum member.
|
166 197 | pub fn as_str(&self) -> &str {
|
167 198 | match self {
|
168 199 | BucketLocationConstraint::UsWest2 => "us-west-2",
|
169 200 | }
|
170 201 | }
|
171 202 | /// Returns all the `&str` representations of the enum members.
|
172 203 | pub const fn values() -> &'static [&'static str] {
|
173 204 | &["us-west-2"]
|
174 205 | }
|
175 206 | }
|
207 + | /* EnumGenerator.kt:223 */
|
176 208 | impl ::std::convert::AsRef<str> for BucketLocationConstraint {
|
177 209 | fn as_ref(&self) -> &str {
|
178 210 | self.as_str()
|
179 211 | }
|
180 212 | }
|
213 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
181 214 | impl crate::constrained::Constrained for BucketLocationConstraint {
|
182 215 | type Unconstrained = ::std::string::String;
|
183 216 | }
|
184 217 |
|
185 218 | impl ::std::convert::From<::std::string::String>
|
186 219 | for crate::constrained::MaybeConstrained<crate::model::BucketLocationConstraint>
|
187 220 | {
|
188 221 | fn from(value: ::std::string::String) -> Self {
|
189 222 | Self::Unconstrained(value)
|
190 223 | }
|
191 224 | }
|
192 225 |
|
226 + | /* EnumGenerator.kt:154 */
|
193 227 | #[allow(missing_docs)] // documentation missing in model
|
228 + | /* RustType.kt:516 */
|
194 229 | #[derive(
|
195 230 | ::std::clone::Clone,
|
196 231 | ::std::cmp::Eq,
|
197 232 | ::std::cmp::Ord,
|
198 233 | ::std::cmp::PartialEq,
|
199 234 | ::std::cmp::PartialOrd,
|
200 235 | ::std::fmt::Debug,
|
201 236 | ::std::hash::Hash,
|
202 237 | )]
|
203 - | pub enum EncodingType {
|
238 + | pub /* EnumGenerator.kt:267 */ enum EncodingType {
|
239 + | /* EnumGenerator.kt:154 */
|
204 240 | #[allow(missing_docs)] // documentation missing in model
|
241 + | /* EnumGenerator.kt:143 */
|
205 242 | Url,
|
243 + | /* EnumGenerator.kt:267 */
|
206 244 | }
|
207 - | /// See [`EncodingType`](crate::model::EncodingType).
|
245 + | /// /* CodegenDelegator.kt:51 */See [`EncodingType`](crate::model::EncodingType).
|
208 246 | pub mod encoding_type {
|
209 247 | #[derive(Debug, PartialEq)]
|
210 248 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
211 249 |
|
212 250 | impl ::std::fmt::Display for ConstraintViolation {
|
213 251 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
214 252 | write!(
|
215 253 | f,
|
216 254 | r#"Value provided for 'com.amazonaws.s3#EncodingType' failed to satisfy constraint: Member must satisfy enum value set: [url]"#
|
217 255 | )
|
218 256 | }
|
219 257 | }
|
220 258 |
|
221 259 | impl ::std::error::Error for ConstraintViolation {}
|
222 260 | impl ConstraintViolation {
|
223 261 | pub(crate) fn as_validation_exception_field(
|
224 262 | self,
|
225 263 | path: ::std::string::String,
|
226 264 | ) -> crate::model::ValidationExceptionField {
|
227 265 | crate::model::ValidationExceptionField {
|
228 266 | message: format!(
|
229 267 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [url]"#,
|
230 268 | &path
|
231 269 | ),
|
232 270 | path,
|
233 271 | }
|
234 272 | }
|
235 273 | }
|
274 + |
|
275 + | /* ServerEnumGenerator.kt:46 */
|
236 276 | }
|
277 + | /* ServerEnumGenerator.kt:85 */
|
237 278 | impl ::std::convert::TryFrom<&str> for EncodingType {
|
238 279 | type Error = crate::model::encoding_type::ConstraintViolation;
|
239 280 | fn try_from(
|
240 281 | s: &str,
|
241 282 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
242 283 | match s {
|
243 284 | "url" => Ok(EncodingType::Url),
|
244 285 | _ => Err(crate::model::encoding_type::ConstraintViolation(
|
245 286 | s.to_owned(),
|
246 287 | )),
|
247 288 | }
|
248 289 | }
|
249 290 | }
|
250 291 | impl ::std::convert::TryFrom<::std::string::String> for EncodingType {
|
251 292 | type Error = crate::model::encoding_type::ConstraintViolation;
|
252 293 | fn try_from(
|
253 294 | s: ::std::string::String,
|
254 295 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
255 296 | {
|
256 297 | s.as_str().try_into()
|
257 298 | }
|
258 299 | }
|
300 + | /* ServerEnumGenerator.kt:145 */
|
259 301 | impl std::str::FromStr for EncodingType {
|
260 302 | type Err = crate::model::encoding_type::ConstraintViolation;
|
261 303 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
262 304 | Self::try_from(s)
|
263 305 | }
|
264 306 | }
|
307 + | /* EnumGenerator.kt:274 */
|
265 308 | impl EncodingType {
|
266 309 | /// Returns the `&str` value of the enum member.
|
267 310 | pub fn as_str(&self) -> &str {
|
268 311 | match self {
|
269 312 | EncodingType::Url => "url",
|
270 313 | }
|
271 314 | }
|
272 315 | /// Returns all the `&str` representations of the enum members.
|
273 316 | pub const fn values() -> &'static [&'static str] {
|
274 317 | &["url"]
|
275 318 | }
|
276 319 | }
|
320 + | /* EnumGenerator.kt:223 */
|
277 321 | impl ::std::convert::AsRef<str> for EncodingType {
|
278 322 | fn as_ref(&self) -> &str {
|
279 323 | self.as_str()
|
280 324 | }
|
281 325 | }
|
326 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
282 327 | impl crate::constrained::Constrained for EncodingType {
|
283 328 | type Unconstrained = ::std::string::String;
|
284 329 | }
|
285 330 |
|
286 331 | impl ::std::convert::From<::std::string::String>
|
287 332 | for crate::constrained::MaybeConstrained<crate::model::EncodingType>
|
288 333 | {
|
289 334 | fn from(value: ::std::string::String) -> Self {
|
290 335 | Self::Unconstrained(value)
|
291 336 | }
|
292 337 | }
|
293 338 |
|
339 + | /* StructureGenerator.kt:197 */
|
294 340 | #[allow(missing_docs)] // documentation missing in model
|
341 + | /* RustType.kt:516 */
|
295 342 | #[derive(
|
296 343 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
297 344 | )]
|
298 - | pub struct CommonPrefix {
|
345 + | pub /* StructureGenerator.kt:201 */ struct CommonPrefix {
|
346 + | /* StructureGenerator.kt:231 */
|
299 347 | #[allow(missing_docs)] // documentation missing in model
|
300 348 | pub prefix: ::std::option::Option<::std::string::String>,
|
349 + | /* StructureGenerator.kt:201 */
|
301 350 | }
|
351 + | /* StructureGenerator.kt:135 */
|
302 352 | impl CommonPrefix {
|
353 + | /* StructureGenerator.kt:231 */
|
303 354 | #[allow(missing_docs)] // documentation missing in model
|
355 + | /* StructureGenerator.kt:166 */
|
304 356 | pub fn prefix(&self) -> ::std::option::Option<&str> {
|
357 + | /* StructureGenerator.kt:169 */
|
305 358 | self.prefix.as_deref()
|
359 + | /* StructureGenerator.kt:166 */
|
306 360 | }
|
361 + | /* StructureGenerator.kt:135 */
|
307 362 | }
|
363 + | /* ServerCodegenVisitor.kt:345 */
|
308 364 | impl CommonPrefix {
|
309 - | /// Creates a new builder-style object to manufacture [`CommonPrefix`](crate::model::CommonPrefix).
|
365 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CommonPrefix`](crate::model::CommonPrefix).
|
366 + | /* ServerBuilderGenerator.kt:295 */
|
310 367 | pub fn builder() -> crate::model::common_prefix::Builder {
|
368 + | /* ServerBuilderGenerator.kt:296 */
|
311 369 | crate::model::common_prefix::Builder::default()
|
370 + | /* ServerBuilderGenerator.kt:295 */
|
312 371 | }
|
372 + | /* ServerCodegenVisitor.kt:345 */
|
313 373 | }
|
314 374 |
|
375 + | /* StructureGenerator.kt:197 */
|
315 376 | #[allow(missing_docs)] // documentation missing in model
|
377 + | /* RustType.kt:516 */
|
316 378 | #[derive(
|
317 379 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
318 380 | )]
|
319 - | pub struct Object {
|
381 + | pub /* StructureGenerator.kt:201 */ struct Object {
|
382 + | /* StructureGenerator.kt:231 */
|
320 383 | #[allow(missing_docs)] // documentation missing in model
|
321 384 | pub key: ::std::option::Option<crate::model::ObjectKey>,
|
385 + | /* StructureGenerator.kt:231 */
|
322 386 | #[allow(missing_docs)] // documentation missing in model
|
323 387 | pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
|
388 + | /* StructureGenerator.kt:231 */
|
324 389 | #[allow(missing_docs)] // documentation missing in model
|
325 390 | pub e_tag: ::std::option::Option<::std::string::String>,
|
391 + | /* StructureGenerator.kt:231 */
|
326 392 | #[allow(missing_docs)] // documentation missing in model
|
327 393 | pub size: ::std::option::Option<i32>,
|
394 + | /* StructureGenerator.kt:231 */
|
328 395 | #[allow(missing_docs)] // documentation missing in model
|
329 396 | pub storage_class: ::std::option::Option<crate::model::ObjectStorageClass>,
|
397 + | /* StructureGenerator.kt:231 */
|
330 398 | #[allow(missing_docs)] // documentation missing in model
|
331 399 | pub owner: ::std::option::Option<crate::model::Owner>,
|
400 + | /* StructureGenerator.kt:201 */
|
332 401 | }
|
402 + | /* StructureGenerator.kt:135 */
|
333 403 | impl Object {
|
404 + | /* StructureGenerator.kt:231 */
|
334 405 | #[allow(missing_docs)] // documentation missing in model
|
406 + | /* StructureGenerator.kt:166 */
|
335 407 | pub fn key(&self) -> ::std::option::Option<&crate::model::ObjectKey> {
|
408 + | /* StructureGenerator.kt:170 */
|
336 409 | self.key.as_ref()
|
410 + | /* StructureGenerator.kt:166 */
|
337 411 | }
|
412 + | /* StructureGenerator.kt:231 */
|
338 413 | #[allow(missing_docs)] // documentation missing in model
|
414 + | /* StructureGenerator.kt:166 */
|
339 415 | pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
416 + | /* StructureGenerator.kt:170 */
|
340 417 | self.last_modified.as_ref()
|
418 + | /* StructureGenerator.kt:166 */
|
341 419 | }
|
420 + | /* StructureGenerator.kt:231 */
|
342 421 | #[allow(missing_docs)] // documentation missing in model
|
422 + | /* StructureGenerator.kt:166 */
|
343 423 | pub fn e_tag(&self) -> ::std::option::Option<&str> {
|
424 + | /* StructureGenerator.kt:169 */
|
344 425 | self.e_tag.as_deref()
|
426 + | /* StructureGenerator.kt:166 */
|
345 427 | }
|
428 + | /* StructureGenerator.kt:231 */
|
346 429 | #[allow(missing_docs)] // documentation missing in model
|
430 + | /* StructureGenerator.kt:166 */
|
347 431 | pub fn size(&self) -> ::std::option::Option<i32> {
|
432 + | /* StructureGenerator.kt:168 */
|
348 433 | self.size
|
434 + | /* StructureGenerator.kt:166 */
|
349 435 | }
|
436 + | /* StructureGenerator.kt:231 */
|
350 437 | #[allow(missing_docs)] // documentation missing in model
|
438 + | /* StructureGenerator.kt:166 */
|
351 439 | pub fn storage_class(&self) -> ::std::option::Option<&crate::model::ObjectStorageClass> {
|
440 + | /* StructureGenerator.kt:170 */
|
352 441 | self.storage_class.as_ref()
|
442 + | /* StructureGenerator.kt:166 */
|
353 443 | }
|
444 + | /* StructureGenerator.kt:231 */
|
354 445 | #[allow(missing_docs)] // documentation missing in model
|
446 + | /* StructureGenerator.kt:166 */
|
355 447 | pub fn owner(&self) -> ::std::option::Option<&crate::model::Owner> {
|
448 + | /* StructureGenerator.kt:170 */
|
356 449 | self.owner.as_ref()
|
450 + | /* StructureGenerator.kt:166 */
|
357 451 | }
|
452 + | /* StructureGenerator.kt:135 */
|
358 453 | }
|
454 + | /* ServerCodegenVisitor.kt:345 */
|
359 455 | impl Object {
|
360 - | /// Creates a new builder-style object to manufacture [`Object`](crate::model::Object).
|
456 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Object`](crate::model::Object).
|
457 + | /* ServerBuilderGenerator.kt:295 */
|
361 458 | pub fn builder() -> crate::model::object::Builder {
|
459 + | /* ServerBuilderGenerator.kt:296 */
|
362 460 | crate::model::object::Builder::default()
|
461 + | /* ServerBuilderGenerator.kt:295 */
|
363 462 | }
|
463 + | /* ServerCodegenVisitor.kt:345 */
|
364 464 | }
|
365 465 |
|
466 + | /* StructureGenerator.kt:197 */
|
366 467 | #[allow(missing_docs)] // documentation missing in model
|
468 + | /* RustType.kt:516 */
|
367 469 | #[derive(
|
368 470 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
369 471 | )]
|
370 - | pub struct Owner {
|
472 + | pub /* StructureGenerator.kt:201 */ struct Owner {
|
473 + | /* StructureGenerator.kt:231 */
|
371 474 | #[allow(missing_docs)] // documentation missing in model
|
372 475 | pub display_name: ::std::option::Option<::std::string::String>,
|
476 + | /* StructureGenerator.kt:231 */
|
373 477 | #[allow(missing_docs)] // documentation missing in model
|
374 478 | pub id: ::std::option::Option<::std::string::String>,
|
479 + | /* StructureGenerator.kt:201 */
|
375 480 | }
|
481 + | /* StructureGenerator.kt:135 */
|
376 482 | impl Owner {
|
483 + | /* StructureGenerator.kt:231 */
|
377 484 | #[allow(missing_docs)] // documentation missing in model
|
485 + | /* StructureGenerator.kt:166 */
|
378 486 | pub fn display_name(&self) -> ::std::option::Option<&str> {
|
487 + | /* StructureGenerator.kt:169 */
|
379 488 | self.display_name.as_deref()
|
489 + | /* StructureGenerator.kt:166 */
|
380 490 | }
|
491 + | /* StructureGenerator.kt:231 */
|
381 492 | #[allow(missing_docs)] // documentation missing in model
|
493 + | /* StructureGenerator.kt:166 */
|
382 494 | pub fn id(&self) -> ::std::option::Option<&str> {
|
495 + | /* StructureGenerator.kt:169 */
|
383 496 | self.id.as_deref()
|
497 + | /* StructureGenerator.kt:166 */
|
384 498 | }
|
499 + | /* StructureGenerator.kt:135 */
|
385 500 | }
|
501 + | /* ServerCodegenVisitor.kt:345 */
|
386 502 | impl Owner {
|
387 - | /// Creates a new builder-style object to manufacture [`Owner`](crate::model::Owner).
|
503 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Owner`](crate::model::Owner).
|
504 + | /* ServerBuilderGenerator.kt:295 */
|
388 505 | pub fn builder() -> crate::model::owner::Builder {
|
506 + | /* ServerBuilderGenerator.kt:296 */
|
389 507 | crate::model::owner::Builder::default()
|
508 + | /* ServerBuilderGenerator.kt:295 */
|
390 509 | }
|
510 + | /* ServerCodegenVisitor.kt:345 */
|
391 511 | }
|
392 512 |
|
513 + | /* EnumGenerator.kt:154 */
|
393 514 | #[allow(missing_docs)] // documentation missing in model
|
515 + | /* RustType.kt:516 */
|
394 516 | #[derive(
|
395 517 | ::std::clone::Clone,
|
396 518 | ::std::cmp::Eq,
|
397 519 | ::std::cmp::Ord,
|
398 520 | ::std::cmp::PartialEq,
|
399 521 | ::std::cmp::PartialOrd,
|
400 522 | ::std::fmt::Debug,
|
401 523 | ::std::hash::Hash,
|
402 524 | )]
|
403 - | pub enum ObjectStorageClass {
|
525 + | pub /* EnumGenerator.kt:267 */ enum ObjectStorageClass {
|
526 + | /* EnumGenerator.kt:154 */
|
404 527 | #[allow(missing_docs)] // documentation missing in model
|
528 + | /* EnumGenerator.kt:143 */
|
405 529 | DeepArchive,
|
530 + | /* EnumGenerator.kt:154 */
|
406 531 | #[allow(missing_docs)] // documentation missing in model
|
532 + | /* EnumGenerator.kt:143 */
|
407 533 | Glacier,
|
534 + | /* EnumGenerator.kt:154 */
|
408 535 | #[allow(missing_docs)] // documentation missing in model
|
536 + | /* EnumGenerator.kt:143 */
|
409 537 | IntelligentTiering,
|
538 + | /* EnumGenerator.kt:154 */
|
410 539 | #[allow(missing_docs)] // documentation missing in model
|
540 + | /* EnumGenerator.kt:143 */
|
411 541 | OnezoneIa,
|
542 + | /* EnumGenerator.kt:154 */
|
412 543 | #[allow(missing_docs)] // documentation missing in model
|
544 + | /* EnumGenerator.kt:143 */
|
413 545 | Outposts,
|
546 + | /* EnumGenerator.kt:154 */
|
414 547 | #[allow(missing_docs)] // documentation missing in model
|
548 + | /* EnumGenerator.kt:143 */
|
415 549 | ReducedRedundancy,
|
550 + | /* EnumGenerator.kt:154 */
|
416 551 | #[allow(missing_docs)] // documentation missing in model
|
552 + | /* EnumGenerator.kt:143 */
|
417 553 | Standard,
|
554 + | /* EnumGenerator.kt:154 */
|
418 555 | #[allow(missing_docs)] // documentation missing in model
|
556 + | /* EnumGenerator.kt:143 */
|
419 557 | StandardIa,
|
558 + | /* EnumGenerator.kt:267 */
|
420 559 | }
|
421 - | /// See [`ObjectStorageClass`](crate::model::ObjectStorageClass).
|
560 + | /// /* CodegenDelegator.kt:51 */See [`ObjectStorageClass`](crate::model::ObjectStorageClass).
|
422 561 | pub mod object_storage_class {
|
423 562 | #[derive(Debug, PartialEq)]
|
424 563 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
425 564 |
|
426 565 | impl ::std::fmt::Display for ConstraintViolation {
|
427 566 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
428 567 | write!(
|
429 568 | f,
|
430 569 | r#"Value provided for 'com.amazonaws.s3#ObjectStorageClass' failed to satisfy constraint: Member must satisfy enum value set: [STANDARD, REDUCED_REDUNDANCY, GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, OUTPOSTS]"#
|
431 570 | )
|
432 571 | }
|
433 572 | }
|
434 573 |
|
435 574 | impl ::std::error::Error for ConstraintViolation {}
|
575 + |
|
576 + | /* ServerEnumGenerator.kt:46 */
|
436 577 | }
|
578 + | /* ServerEnumGenerator.kt:85 */
|
437 579 | impl ::std::convert::TryFrom<&str> for ObjectStorageClass {
|
438 580 | type Error = crate::model::object_storage_class::ConstraintViolation;
|
439 581 | fn try_from(
|
440 582 | s: &str,
|
441 583 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
442 584 | match s {
|
443 585 | "DEEP_ARCHIVE" => Ok(ObjectStorageClass::DeepArchive),
|
444 586 | "GLACIER" => Ok(ObjectStorageClass::Glacier),
|
445 587 | "INTELLIGENT_TIERING" => Ok(ObjectStorageClass::IntelligentTiering),
|
446 588 | "ONEZONE_IA" => Ok(ObjectStorageClass::OnezoneIa),
|
447 589 | "OUTPOSTS" => Ok(ObjectStorageClass::Outposts),
|
448 590 | "REDUCED_REDUNDANCY" => Ok(ObjectStorageClass::ReducedRedundancy),
|
449 591 | "STANDARD" => Ok(ObjectStorageClass::Standard),
|
450 592 | "STANDARD_IA" => Ok(ObjectStorageClass::StandardIa),
|
451 593 | _ => Err(crate::model::object_storage_class::ConstraintViolation(
|
452 594 | s.to_owned(),
|
453 595 | )),
|
454 596 | }
|
455 597 | }
|
456 598 | }
|
457 599 | impl ::std::convert::TryFrom<::std::string::String> for ObjectStorageClass {
|
458 600 | type Error = crate::model::object_storage_class::ConstraintViolation;
|
459 601 | fn try_from(
|
460 602 | s: ::std::string::String,
|
461 603 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
462 604 | {
|
463 605 | s.as_str().try_into()
|
464 606 | }
|
465 607 | }
|
608 + | /* ServerEnumGenerator.kt:145 */
|
466 609 | impl std::str::FromStr for ObjectStorageClass {
|
467 610 | type Err = crate::model::object_storage_class::ConstraintViolation;
|
468 611 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
469 612 | Self::try_from(s)
|
470 613 | }
|
471 614 | }
|
615 + | /* EnumGenerator.kt:274 */
|
472 616 | impl ObjectStorageClass {
|
473 617 | /// Returns the `&str` value of the enum member.
|
474 618 | pub fn as_str(&self) -> &str {
|
475 619 | match self {
|
476 620 | ObjectStorageClass::DeepArchive => "DEEP_ARCHIVE",
|
477 621 | ObjectStorageClass::Glacier => "GLACIER",
|
478 622 | ObjectStorageClass::IntelligentTiering => "INTELLIGENT_TIERING",
|
479 623 | ObjectStorageClass::OnezoneIa => "ONEZONE_IA",
|
480 624 | ObjectStorageClass::Outposts => "OUTPOSTS",
|
481 625 | ObjectStorageClass::ReducedRedundancy => "REDUCED_REDUNDANCY",
|
482 626 | ObjectStorageClass::Standard => "STANDARD",
|
483 627 | ObjectStorageClass::StandardIa => "STANDARD_IA",
|
484 628 | }
|
485 629 | }
|
486 630 | /// Returns all the `&str` representations of the enum members.
|
487 631 | pub const fn values() -> &'static [&'static str] {
|
488 632 | &[
|
489 633 | "DEEP_ARCHIVE",
|
490 634 | "GLACIER",
|
491 635 | "INTELLIGENT_TIERING",
|
492 636 | "ONEZONE_IA",
|
493 637 | "OUTPOSTS",
|
494 638 | "REDUCED_REDUNDANCY",
|
495 639 | "STANDARD",
|
496 640 | "STANDARD_IA",
|
497 641 | ]
|
498 642 | }
|
499 643 | }
|
644 + | /* EnumGenerator.kt:223 */
|
500 645 | impl ::std::convert::AsRef<str> for ObjectStorageClass {
|
501 646 | fn as_ref(&self) -> &str {
|
502 647 | self.as_str()
|
503 648 | }
|
504 649 | }
|
650 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
505 651 | impl crate::constrained::Constrained for ObjectStorageClass {
|
506 652 | type Unconstrained = ::std::string::String;
|
507 653 | }
|
508 654 |
|
509 655 | impl ::std::convert::From<::std::string::String>
|
510 656 | for crate::constrained::MaybeConstrained<crate::model::ObjectStorageClass>
|
511 657 | {
|
512 658 | fn from(value: ::std::string::String) -> Self {
|
513 659 | Self::Unconstrained(value)
|
514 660 | }
|
515 661 | }
|
516 662 |
|
663 + | /* EnumGenerator.kt:154 */
|
517 664 | #[allow(missing_docs)] // documentation missing in model
|
665 + | /* RustType.kt:516 */
|
518 666 | #[derive(
|
519 667 | ::std::clone::Clone,
|
520 668 | ::std::cmp::Eq,
|
521 669 | ::std::cmp::Ord,
|
522 670 | ::std::cmp::PartialEq,
|
523 671 | ::std::cmp::PartialOrd,
|
524 672 | ::std::fmt::Debug,
|
525 673 | ::std::hash::Hash,
|
526 674 | )]
|
527 - | pub enum RequestPayer {
|
675 + | pub /* EnumGenerator.kt:267 */ enum RequestPayer {
|
676 + | /* EnumGenerator.kt:154 */
|
528 677 | #[allow(missing_docs)] // documentation missing in model
|
678 + | /* EnumGenerator.kt:143 */
|
529 679 | Requester,
|
680 + | /* EnumGenerator.kt:267 */
|
530 681 | }
|
531 - | /// See [`RequestPayer`](crate::model::RequestPayer).
|
682 + | /// /* CodegenDelegator.kt:51 */See [`RequestPayer`](crate::model::RequestPayer).
|
532 683 | pub mod request_payer {
|
533 684 | #[derive(Debug, PartialEq)]
|
534 685 | pub struct ConstraintViolation(pub(crate) ::std::string::String);
|
535 686 |
|
536 687 | impl ::std::fmt::Display for ConstraintViolation {
|
537 688 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
538 689 | write!(
|
539 690 | f,
|
540 691 | r#"Value provided for 'com.amazonaws.s3#RequestPayer' failed to satisfy constraint: Member must satisfy enum value set: [requester]"#
|
541 692 | )
|
542 693 | }
|
543 694 | }
|
544 695 |
|
545 696 | impl ::std::error::Error for ConstraintViolation {}
|
546 697 | impl ConstraintViolation {
|
547 698 | pub(crate) fn as_validation_exception_field(
|
548 699 | self,
|
549 700 | path: ::std::string::String,
|
550 701 | ) -> crate::model::ValidationExceptionField {
|
551 702 | crate::model::ValidationExceptionField {
|
552 703 | message: format!(
|
553 704 | r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [requester]"#,
|
554 705 | &path
|
555 706 | ),
|
556 707 | path,
|
557 708 | }
|
558 709 | }
|
559 710 | }
|
711 + |
|
712 + | /* ServerEnumGenerator.kt:46 */
|
560 713 | }
|
714 + | /* ServerEnumGenerator.kt:85 */
|
561 715 | impl ::std::convert::TryFrom<&str> for RequestPayer {
|
562 716 | type Error = crate::model::request_payer::ConstraintViolation;
|
563 717 | fn try_from(
|
564 718 | s: &str,
|
565 719 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
|
566 720 | match s {
|
567 721 | "requester" => Ok(RequestPayer::Requester),
|
568 722 | _ => Err(crate::model::request_payer::ConstraintViolation(
|
569 723 | s.to_owned(),
|
570 724 | )),
|
571 725 | }
|
572 726 | }
|
573 727 | }
|
574 728 | impl ::std::convert::TryFrom<::std::string::String> for RequestPayer {
|
575 729 | type Error = crate::model::request_payer::ConstraintViolation;
|
576 730 | fn try_from(
|
577 731 | s: ::std::string::String,
|
578 732 | ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
|
579 733 | {
|
580 734 | s.as_str().try_into()
|
581 735 | }
|
582 736 | }
|
737 + | /* ServerEnumGenerator.kt:145 */
|
583 738 | impl std::str::FromStr for RequestPayer {
|
584 739 | type Err = crate::model::request_payer::ConstraintViolation;
|
585 740 | fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
|
586 741 | Self::try_from(s)
|
587 742 | }
|
588 743 | }
|
744 + | /* EnumGenerator.kt:274 */
|
589 745 | impl RequestPayer {
|
590 746 | /// Returns the `&str` value of the enum member.
|
591 747 | pub fn as_str(&self) -> &str {
|
592 748 | match self {
|
593 749 | RequestPayer::Requester => "requester",
|
594 750 | }
|
595 751 | }
|
596 752 | /// Returns all the `&str` representations of the enum members.
|
597 753 | pub const fn values() -> &'static [&'static str] {
|
598 754 | &["requester"]
|
599 755 | }
|
600 756 | }
|
757 + | /* EnumGenerator.kt:223 */
|
601 758 | impl ::std::convert::AsRef<str> for RequestPayer {
|
602 759 | fn as_ref(&self) -> &str {
|
603 760 | self.as_str()
|
604 761 | }
|
605 762 | }
|
763 + | /* ConstrainedTraitForEnumGenerator.kt:36 */
|
606 764 | impl crate::constrained::Constrained for RequestPayer {
|
607 765 | type Unconstrained = ::std::string::String;
|
608 766 | }
|
609 767 |
|
610 768 | impl ::std::convert::From<::std::string::String>
|
611 769 | for crate::constrained::MaybeConstrained<crate::model::RequestPayer>
|
612 770 | {
|
613 771 | fn from(value: ::std::string::String) -> Self {
|
614 772 | Self::Unconstrained(value)
|
615 773 | }
|
616 774 | }
|
617 - | /// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
775 + | /// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
618 776 | pub mod validation_exception_field {
|
619 777 |
|
778 + | /* RustType.kt:516 */
|
620 779 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
621 - | /// Holds one variant for each of the ways the builder can fail.
|
780 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
781 + | /* RustType.kt:516 */
|
622 782 | #[non_exhaustive]
|
783 + | /* ServerBuilderConstraintViolations.kt:75 */
|
623 784 | #[allow(clippy::enum_variant_names)]
|
624 785 | pub enum ConstraintViolation {
|
625 - | /// `path` was not provided but it is required when building `ValidationExceptionField`.
|
786 + | /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
|
787 + | /* ServerBuilderConstraintViolations.kt:143 */
|
626 788 | MissingPath,
|
627 - | /// `message` was not provided but it is required when building `ValidationExceptionField`.
|
789 + | /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
|
790 + | /* ServerBuilderConstraintViolations.kt:143 */
|
628 791 | MissingMessage,
|
792 + | /* ServerBuilderConstraintViolations.kt:75 */
|
629 793 | }
|
794 + | /* ServerBuilderConstraintViolations.kt:117 */
|
630 795 | impl ::std::fmt::Display for ConstraintViolation {
|
796 + | /* ServerBuilderConstraintViolations.kt:118 */
|
631 797 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
798 + | /* ServerBuilderConstraintViolations.kt:119 */
|
632 799 | match self {
|
633 - | ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
634 - | ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
635 - | }
|
800 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
|
801 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
|
802 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
803 + | /* ServerBuilderConstraintViolations.kt:118 */
|
636 804 | }
|
805 + | /* ServerBuilderConstraintViolations.kt:117 */
|
637 806 | }
|
807 + | /* ServerBuilderConstraintViolations.kt:84 */
|
638 808 | impl ::std::error::Error for ConstraintViolation {}
|
809 + | /* ServerBuilderGenerator.kt:446 */
|
639 810 | impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
|
640 811 | type Error = ConstraintViolation;
|
641 812 |
|
642 813 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
643 814 | builder.build()
|
644 815 | }
|
645 816 | }
|
646 - | /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
817 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
818 + | /* RustType.kt:516 */
|
647 819 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
820 + | /* ServerBuilderGenerator.kt:211 */
|
648 821 | pub struct Builder {
|
822 + | /* ServerBuilderGenerator.kt:308 */
|
649 823 | pub(crate) path: ::std::option::Option<::std::string::String>,
|
824 + | /* ServerBuilderGenerator.kt:308 */
|
650 825 | pub(crate) message: ::std::option::Option<::std::string::String>,
|
826 + | /* ServerBuilderGenerator.kt:211 */
|
651 827 | }
|
828 + | /* ServerBuilderGenerator.kt:215 */
|
652 829 | impl Builder {
|
653 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
830 + | /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
831 + | /* ServerBuilderGenerator.kt:343 */
|
654 832 | pub fn path(mut self, input: ::std::string::String) -> Self {
|
655 - | self.path = Some(input);
|
833 + | /* ServerBuilderGenerator.kt:344 */
|
834 + | self.path =
|
835 + | /* ServerBuilderGenerator.kt:345 */Some(
|
836 + | /* ServerBuilderGenerator.kt:376 */input
|
837 + | /* ServerBuilderGenerator.kt:345 */)
|
838 + | /* ServerBuilderGenerator.kt:344 */;
|
656 839 | self
|
840 + | /* ServerBuilderGenerator.kt:343 */
|
657 841 | }
|
658 - | /// A detailed description of the validation failure.
|
842 + | /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
|
843 + | /* ServerBuilderGenerator.kt:343 */
|
659 844 | pub fn message(mut self, input: ::std::string::String) -> Self {
|
660 - | self.message = Some(input);
|
845 + | /* ServerBuilderGenerator.kt:344 */
|
846 + | self.message =
|
847 + | /* ServerBuilderGenerator.kt:345 */Some(
|
848 + | /* ServerBuilderGenerator.kt:376 */input
|
849 + | /* ServerBuilderGenerator.kt:345 */)
|
850 + | /* ServerBuilderGenerator.kt:344 */;
|
661 851 | self
|
852 + | /* ServerBuilderGenerator.kt:343 */
|
662 853 | }
|
663 - | /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
664 - | ///
|
854 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
855 + | /// /* ServerBuilderGenerator.kt:260 */
|
665 856 | /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
|
666 857 | ///
|
667 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
858 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
859 + | /* ServerBuilderGenerator.kt:271 */
|
668 860 | pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
669 861 | self.build_enforcing_all_constraints()
|
670 862 | }
|
863 + | /* ServerBuilderGenerator.kt:283 */
|
671 864 | fn build_enforcing_all_constraints(
|
672 865 | self,
|
673 866 | ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
|
674 - | Ok(crate::model::ValidationExceptionField {
|
675 - | path: self.path.ok_or(ConstraintViolation::MissingPath)?,
|
676 - | message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
|
677 - | })
|
867 + | /* ServerBuilderGenerator.kt:287 */
|
868 + | Ok(
|
869 + | /* ServerBuilderGenerator.kt:542 */
|
870 + | crate::model::ValidationExceptionField {
|
871 + | /* ServerBuilderGenerator.kt:546 */
|
872 + | path: self
|
873 + | .path
|
874 + | /* ServerBuilderGenerator.kt:569 */
|
875 + | .ok_or(ConstraintViolation::MissingPath)?,
|
876 + | /* ServerBuilderGenerator.kt:546 */
|
877 + | message: self
|
878 + | .message
|
879 + | /* ServerBuilderGenerator.kt:569 */
|
880 + | .ok_or(ConstraintViolation::MissingMessage)?,
|
881 + | /* ServerBuilderGenerator.kt:542 */
|
882 + | }, /* ServerBuilderGenerator.kt:287 */
|
883 + | )
|
884 + | /* ServerBuilderGenerator.kt:283 */
|
678 885 | }
|
886 + | /* ServerBuilderGenerator.kt:215 */
|
679 887 | }
|
888 + |
|
889 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
680 890 | }
|
681 - | /// See [`ObjectKey`](crate::model::ObjectKey).
|
891 + | /// /* CodegenDelegator.kt:51 */See [`ObjectKey`](crate::model::ObjectKey).
|
682 892 | pub mod object_key {
|
683 893 |
|
894 + | /* ConstrainedStringGenerator.kt:155 */
|
684 895 | #[derive(Debug, PartialEq)]
|
685 896 | pub enum ConstraintViolation {
|
686 897 | /// Error when a string doesn't satisfy its `@length` requirements.
|
687 898 | Length(usize),
|
688 899 | }
|
689 900 |
|
690 901 | impl ::std::fmt::Display for ConstraintViolation {
|
691 902 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
692 903 | let message = match self {
|
693 904 | Self::Length(length) => {
|
694 905 | format!("Value with length {} provided for 'com.amazonaws.s3#ObjectKey' failed to satisfy constraint: Member must have length greater than or equal to 1", length)
|
695 906 | }
|
696 907 | };
|
697 908 | write!(f, "{message}")
|
698 909 | }
|
699 910 | }
|
700 911 |
|
701 912 | impl ::std::error::Error for ConstraintViolation {}
|
913 + | /* ConstrainedStringGenerator.kt:180 */
|
702 914 | impl ConstraintViolation {
|
703 915 | pub(crate) fn as_validation_exception_field(
|
704 916 | self,
|
705 917 | path: ::std::string::String,
|
706 918 | ) -> crate::model::ValidationExceptionField {
|
707 919 | match self {
|
708 920 | Self::Length(length) => crate::model::ValidationExceptionField {
|
709 921 | message: format!("Value with length {} at '{}' failed to satisfy constraint: Member must have length greater than or equal to 1", length, &path),
|
710 922 | path,
|
711 923 | },
|
712 924 | }
|
713 925 | }
|
714 926 | }
|
927 + |
|
928 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
715 929 | }
|
716 - | /// See [`CommonPrefix`](crate::model::CommonPrefix).
|
930 + | /// /* ServerBuilderGenerator.kt:171 */See [`CommonPrefix`](crate::model::CommonPrefix).
|
717 931 | pub mod common_prefix {
|
718 932 |
|
933 + | /* ServerBuilderGenerator.kt:461 */
|
719 934 | impl ::std::convert::From<Builder> for crate::model::CommonPrefix {
|
720 935 | fn from(builder: Builder) -> Self {
|
721 936 | builder.build()
|
722 937 | }
|
723 938 | }
|
724 - | /// A builder for [`CommonPrefix`](crate::model::CommonPrefix).
|
939 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CommonPrefix`](crate::model::CommonPrefix).
|
940 + | /* RustType.kt:516 */
|
725 941 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
942 + | /* ServerBuilderGenerator.kt:211 */
|
726 943 | pub struct Builder {
|
944 + | /* ServerBuilderGenerator.kt:308 */
|
727 945 | pub(crate) prefix: ::std::option::Option<::std::string::String>,
|
946 + | /* ServerBuilderGenerator.kt:211 */
|
728 947 | }
|
948 + | /* ServerBuilderGenerator.kt:215 */
|
729 949 | impl Builder {
|
950 + | /* ServerBuilderGenerator.kt:331 */
|
730 951 | #[allow(missing_docs)] // documentation missing in model
|
952 + | /* ServerBuilderGenerator.kt:343 */
|
731 953 | pub fn prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
732 - | self.prefix = input;
|
954 + | /* ServerBuilderGenerator.kt:344 */
|
955 + | self.prefix =
|
956 + | /* ServerBuilderGenerator.kt:376 */input
|
957 + | /* ServerBuilderGenerator.kt:344 */;
|
733 958 | self
|
959 + | /* ServerBuilderGenerator.kt:343 */
|
734 960 | }
|
735 - | /// Consumes the builder and constructs a [`CommonPrefix`](crate::model::CommonPrefix).
|
961 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CommonPrefix`](crate::model::CommonPrefix).
|
962 + | /* ServerBuilderGenerator.kt:271 */
|
736 963 | pub fn build(self) -> crate::model::CommonPrefix {
|
737 964 | self.build_enforcing_all_constraints()
|
738 965 | }
|
966 + | /* ServerBuilderGenerator.kt:283 */
|
739 967 | fn build_enforcing_all_constraints(self) -> crate::model::CommonPrefix {
|
968 + | /* ServerBuilderGenerator.kt:542 */
|
740 969 | crate::model::CommonPrefix {
|
970 + | /* ServerBuilderGenerator.kt:546 */
|
741 971 | prefix: self.prefix,
|
972 + | /* ServerBuilderGenerator.kt:542 */
|
742 973 | }
|
974 + | /* ServerBuilderGenerator.kt:283 */
|
743 975 | }
|
976 + | /* ServerBuilderGenerator.kt:215 */
|
744 977 | }
|
978 + |
|
979 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
745 980 | }
|
746 - | /// See [`Object`](crate::model::Object).
|
981 + | /// /* ServerBuilderGenerator.kt:171 */See [`Object`](crate::model::Object).
|
747 982 | pub mod object {
|
748 983 |
|
984 + | /* ServerBuilderGenerator.kt:461 */
|
749 985 | impl ::std::convert::From<Builder> for crate::model::Object {
|
750 986 | fn from(builder: Builder) -> Self {
|
751 987 | builder.build()
|
752 988 | }
|
753 989 | }
|
754 - | /// A builder for [`Object`](crate::model::Object).
|
990 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Object`](crate::model::Object).
|
991 + | /* RustType.kt:516 */
|
755 992 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
993 + | /* ServerBuilderGenerator.kt:211 */
|
756 994 | pub struct Builder {
|
995 + | /* ServerBuilderGenerator.kt:308 */
|
757 996 | pub(crate) key: ::std::option::Option<crate::model::ObjectKey>,
|
997 + | /* ServerBuilderGenerator.kt:308 */
|
758 998 | pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
|
999 + | /* ServerBuilderGenerator.kt:308 */
|
759 1000 | pub(crate) e_tag: ::std::option::Option<::std::string::String>,
|
760 - | pub(crate) size: ::std::option::Option<i32>,
|
1001 + | /* ServerBuilderGenerator.kt:308 */ pub(crate) size: ::std::option::Option<i32>,
|
1002 + | /* ServerBuilderGenerator.kt:308 */
|
761 1003 | pub(crate) storage_class: ::std::option::Option<crate::model::ObjectStorageClass>,
|
1004 + | /* ServerBuilderGenerator.kt:308 */
|
762 1005 | pub(crate) owner: ::std::option::Option<crate::model::Owner>,
|
1006 + | /* ServerBuilderGenerator.kt:211 */
|
763 1007 | }
|
1008 + | /* ServerBuilderGenerator.kt:215 */
|
764 1009 | impl Builder {
|
1010 + | /* ServerBuilderGenerator.kt:331 */
|
765 1011 | #[allow(missing_docs)] // documentation missing in model
|
1012 + | /* ServerBuilderGenerator.kt:343 */
|
766 1013 | pub fn key(mut self, input: ::std::option::Option<crate::model::ObjectKey>) -> Self {
|
767 - | self.key = input;
|
1014 + | /* ServerBuilderGenerator.kt:344 */
|
1015 + | self.key =
|
1016 + | /* ServerBuilderGenerator.kt:376 */input
|
1017 + | /* ServerBuilderGenerator.kt:344 */;
|
768 1018 | self
|
1019 + | /* ServerBuilderGenerator.kt:343 */
|
769 1020 | }
|
1021 + | /* ServerBuilderGenerator.kt:331 */
|
770 1022 | #[allow(missing_docs)] // documentation missing in model
|
1023 + | /* ServerBuilderGenerator.kt:343 */
|
771 1024 | pub fn last_modified(
|
772 1025 | mut self,
|
773 1026 | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
774 1027 | ) -> Self {
|
775 - | self.last_modified = input;
|
1028 + | /* ServerBuilderGenerator.kt:344 */
|
1029 + | self.last_modified =
|
1030 + | /* ServerBuilderGenerator.kt:376 */input
|
1031 + | /* ServerBuilderGenerator.kt:344 */;
|
776 1032 | self
|
1033 + | /* ServerBuilderGenerator.kt:343 */
|
777 1034 | }
|
1035 + | /* ServerBuilderGenerator.kt:331 */
|
778 1036 | #[allow(missing_docs)] // documentation missing in model
|
1037 + | /* ServerBuilderGenerator.kt:343 */
|
779 1038 | pub fn e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
780 - | self.e_tag = input;
|
1039 + | /* ServerBuilderGenerator.kt:344 */
|
1040 + | self.e_tag =
|
1041 + | /* ServerBuilderGenerator.kt:376 */input
|
1042 + | /* ServerBuilderGenerator.kt:344 */;
|
781 1043 | self
|
1044 + | /* ServerBuilderGenerator.kt:343 */
|
782 1045 | }
|
1046 + | /* ServerBuilderGenerator.kt:331 */
|
783 1047 | #[allow(missing_docs)] // documentation missing in model
|
1048 + | /* ServerBuilderGenerator.kt:343 */
|
784 1049 | pub fn size(mut self, input: ::std::option::Option<i32>) -> Self {
|
785 - | self.size = input;
|
1050 + | /* ServerBuilderGenerator.kt:344 */
|
1051 + | self.size =
|
1052 + | /* ServerBuilderGenerator.kt:376 */input
|
1053 + | /* ServerBuilderGenerator.kt:344 */;
|
786 1054 | self
|
1055 + | /* ServerBuilderGenerator.kt:343 */
|
787 1056 | }
|
1057 + | /* ServerBuilderGenerator.kt:331 */
|
788 1058 | #[allow(missing_docs)] // documentation missing in model
|
1059 + | /* ServerBuilderGenerator.kt:343 */
|
789 1060 | pub fn storage_class(
|
790 1061 | mut self,
|
791 1062 | input: ::std::option::Option<crate::model::ObjectStorageClass>,
|
792 1063 | ) -> Self {
|
793 - | self.storage_class = input;
|
1064 + | /* ServerBuilderGenerator.kt:344 */
|
1065 + | self.storage_class =
|
1066 + | /* ServerBuilderGenerator.kt:376 */input
|
1067 + | /* ServerBuilderGenerator.kt:344 */;
|
794 1068 | self
|
1069 + | /* ServerBuilderGenerator.kt:343 */
|
795 1070 | }
|
1071 + | /* ServerBuilderGenerator.kt:331 */
|
796 1072 | #[allow(missing_docs)] // documentation missing in model
|
1073 + | /* ServerBuilderGenerator.kt:343 */
|
797 1074 | pub fn owner(mut self, input: ::std::option::Option<crate::model::Owner>) -> Self {
|
798 - | self.owner = input;
|
1075 + | /* ServerBuilderGenerator.kt:344 */
|
1076 + | self.owner =
|
1077 + | /* ServerBuilderGenerator.kt:376 */input
|
1078 + | /* ServerBuilderGenerator.kt:344 */;
|
799 1079 | self
|
1080 + | /* ServerBuilderGenerator.kt:343 */
|
800 1081 | }
|
801 - | /// Consumes the builder and constructs a [`Object`](crate::model::Object).
|
1082 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Object`](crate::model::Object).
|
1083 + | /* ServerBuilderGenerator.kt:271 */
|
802 1084 | pub fn build(self) -> crate::model::Object {
|
803 1085 | self.build_enforcing_all_constraints()
|
804 1086 | }
|
1087 + | /* ServerBuilderGenerator.kt:283 */
|
805 1088 | fn build_enforcing_all_constraints(self) -> crate::model::Object {
|
1089 + | /* ServerBuilderGenerator.kt:542 */
|
806 1090 | crate::model::Object {
|
1091 + | /* ServerBuilderGenerator.kt:546 */
|
807 1092 | key: self.key,
|
1093 + | /* ServerBuilderGenerator.kt:546 */
|
808 1094 | last_modified: self.last_modified,
|
1095 + | /* ServerBuilderGenerator.kt:546 */
|
809 1096 | e_tag: self.e_tag,
|
1097 + | /* ServerBuilderGenerator.kt:546 */
|
810 1098 | size: self.size,
|
1099 + | /* ServerBuilderGenerator.kt:546 */
|
811 1100 | storage_class: self.storage_class,
|
1101 + | /* ServerBuilderGenerator.kt:546 */
|
812 1102 | owner: self.owner,
|
1103 + | /* ServerBuilderGenerator.kt:542 */
|
813 1104 | }
|
1105 + | /* ServerBuilderGenerator.kt:283 */
|
814 1106 | }
|
1107 + | /* ServerBuilderGenerator.kt:215 */
|
815 1108 | }
|
1109 + |
|
1110 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
816 1111 | }
|
817 - | /// See [`Owner`](crate::model::Owner).
|
1112 + | /// /* ServerBuilderGenerator.kt:171 */See [`Owner`](crate::model::Owner).
|
818 1113 | pub mod owner {
|
819 1114 |
|
1115 + | /* ServerBuilderGenerator.kt:461 */
|
820 1116 | impl ::std::convert::From<Builder> for crate::model::Owner {
|
821 1117 | fn from(builder: Builder) -> Self {
|
822 1118 | builder.build()
|
823 1119 | }
|
824 1120 | }
|
825 - | /// A builder for [`Owner`](crate::model::Owner).
|
1121 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`Owner`](crate::model::Owner).
|
1122 + | /* RustType.kt:516 */
|
826 1123 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1124 + | /* ServerBuilderGenerator.kt:211 */
|
827 1125 | pub struct Builder {
|
1126 + | /* ServerBuilderGenerator.kt:308 */
|
828 1127 | pub(crate) display_name: ::std::option::Option<::std::string::String>,
|
1128 + | /* ServerBuilderGenerator.kt:308 */
|
829 1129 | pub(crate) id: ::std::option::Option<::std::string::String>,
|
1130 + | /* ServerBuilderGenerator.kt:211 */
|
830 1131 | }
|
1132 + | /* ServerBuilderGenerator.kt:215 */
|
831 1133 | impl Builder {
|
1134 + | /* ServerBuilderGenerator.kt:331 */
|
832 1135 | #[allow(missing_docs)] // documentation missing in model
|
1136 + | /* ServerBuilderGenerator.kt:343 */
|
833 1137 | pub fn display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
834 - | self.display_name = input;
|
1138 + | /* ServerBuilderGenerator.kt:344 */
|
1139 + | self.display_name =
|
1140 + | /* ServerBuilderGenerator.kt:376 */input
|
1141 + | /* ServerBuilderGenerator.kt:344 */;
|
835 1142 | self
|
1143 + | /* ServerBuilderGenerator.kt:343 */
|
836 1144 | }
|
1145 + | /* ServerBuilderGenerator.kt:331 */
|
837 1146 | #[allow(missing_docs)] // documentation missing in model
|
1147 + | /* ServerBuilderGenerator.kt:343 */
|
838 1148 | pub fn id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
839 - | self.id = input;
|
1149 + | /* ServerBuilderGenerator.kt:344 */
|
1150 + | self.id =
|
1151 + | /* ServerBuilderGenerator.kt:376 */input
|
1152 + | /* ServerBuilderGenerator.kt:344 */;
|
840 1153 | self
|
1154 + | /* ServerBuilderGenerator.kt:343 */
|
841 1155 | }
|
842 - | /// Consumes the builder and constructs a [`Owner`](crate::model::Owner).
|
1156 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Owner`](crate::model::Owner).
|
1157 + | /* ServerBuilderGenerator.kt:271 */
|
843 1158 | pub fn build(self) -> crate::model::Owner {
|
844 1159 | self.build_enforcing_all_constraints()
|
845 1160 | }
|
1161 + | /* ServerBuilderGenerator.kt:283 */
|
846 1162 | fn build_enforcing_all_constraints(self) -> crate::model::Owner {
|
1163 + | /* ServerBuilderGenerator.kt:542 */
|
847 1164 | crate::model::Owner {
|
1165 + | /* ServerBuilderGenerator.kt:546 */
|
848 1166 | display_name: self.display_name,
|
1167 + | /* ServerBuilderGenerator.kt:546 */
|
849 1168 | id: self.id,
|
1169 + | /* ServerBuilderGenerator.kt:542 */
|
850 1170 | }
|
1171 + | /* ServerBuilderGenerator.kt:283 */
|
851 1172 | }
|
1173 + | /* ServerBuilderGenerator.kt:215 */
|
852 1174 | }
|
1175 + |
|
1176 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
853 1177 | }
|