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