1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(missing_docs)] // documentation missing in model
|
3 + | #[non_exhaustive]
|
4 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 + | pub struct Defaults {
|
6 + | #[allow(missing_docs)] // documentation missing in model
|
7 + | pub default_string: ::std::string::String,
|
8 + | #[allow(missing_docs)] // documentation missing in model
|
9 + | pub default_boolean: bool,
|
10 + | #[allow(missing_docs)] // documentation missing in model
|
11 + | pub default_list: ::std::vec::Vec<::std::string::String>,
|
12 + | #[allow(missing_docs)] // documentation missing in model
|
13 + | pub default_document_map: ::aws_smithy_types::Document,
|
14 + | #[allow(missing_docs)] // documentation missing in model
|
15 + | pub default_document_string: ::aws_smithy_types::Document,
|
16 + | #[allow(missing_docs)] // documentation missing in model
|
17 + | pub default_document_boolean: ::aws_smithy_types::Document,
|
18 + | #[allow(missing_docs)] // documentation missing in model
|
19 + | pub default_document_list: ::aws_smithy_types::Document,
|
20 + | #[allow(missing_docs)] // documentation missing in model
|
21 + | pub default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
|
22 + | #[allow(missing_docs)] // documentation missing in model
|
23 + | pub default_timestamp: ::aws_smithy_types::DateTime,
|
24 + | #[allow(missing_docs)] // documentation missing in model
|
25 + | pub default_blob: ::aws_smithy_types::Blob,
|
26 + | #[allow(missing_docs)] // documentation missing in model
|
27 + | pub default_byte: i8,
|
28 + | #[allow(missing_docs)] // documentation missing in model
|
29 + | pub default_short: i16,
|
30 + | #[allow(missing_docs)] // documentation missing in model
|
31 + | pub default_integer: i32,
|
32 + | #[allow(missing_docs)] // documentation missing in model
|
33 + | pub default_long: i64,
|
34 + | #[allow(missing_docs)] // documentation missing in model
|
35 + | pub default_float: f32,
|
36 + | #[allow(missing_docs)] // documentation missing in model
|
37 + | pub default_double: f64,
|
38 + | #[allow(missing_docs)] // documentation missing in model
|
39 + | pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
40 + | #[allow(missing_docs)] // documentation missing in model
|
41 + | pub default_enum: crate::types::TestEnum,
|
42 + | #[allow(missing_docs)] // documentation missing in model
|
43 + | pub default_int_enum: i32,
|
44 + | #[allow(missing_docs)] // documentation missing in model
|
45 + | pub empty_string: ::std::string::String,
|
46 + | #[allow(missing_docs)] // documentation missing in model
|
47 + | pub false_boolean: bool,
|
48 + | #[allow(missing_docs)] // documentation missing in model
|
49 + | pub empty_blob: ::aws_smithy_types::Blob,
|
50 + | #[allow(missing_docs)] // documentation missing in model
|
51 + | pub zero_byte: i8,
|
52 + | #[allow(missing_docs)] // documentation missing in model
|
53 + | pub zero_short: i16,
|
54 + | #[allow(missing_docs)] // documentation missing in model
|
55 + | pub zero_integer: i32,
|
56 + | #[allow(missing_docs)] // documentation missing in model
|
57 + | pub zero_long: i64,
|
58 + | #[allow(missing_docs)] // documentation missing in model
|
59 + | pub zero_float: f32,
|
60 + | #[allow(missing_docs)] // documentation missing in model
|
61 + | pub zero_double: f64,
|
62 + | }
|
63 + | impl Defaults {
|
64 + | #[allow(missing_docs)] // documentation missing in model
|
65 + | pub fn default_string(&self) -> &str {
|
66 + | use std::ops::Deref;
|
67 + | self.default_string.deref()
|
68 + | }
|
69 + | #[allow(missing_docs)] // documentation missing in model
|
70 + | pub fn default_boolean(&self) -> bool {
|
71 + | self.default_boolean
|
72 + | }
|
73 + | #[allow(missing_docs)] // documentation missing in model
|
74 + | pub fn default_list(&self) -> &[::std::string::String] {
|
75 + | use std::ops::Deref;
|
76 + | self.default_list.deref()
|
77 + | }
|
78 + | #[allow(missing_docs)] // documentation missing in model
|
79 + | pub fn default_document_map(&self) -> &::aws_smithy_types::Document {
|
80 + | &self.default_document_map
|
81 + | }
|
82 + | #[allow(missing_docs)] // documentation missing in model
|
83 + | pub fn default_document_string(&self) -> &::aws_smithy_types::Document {
|
84 + | &self.default_document_string
|
85 + | }
|
86 + | #[allow(missing_docs)] // documentation missing in model
|
87 + | pub fn default_document_boolean(&self) -> &::aws_smithy_types::Document {
|
88 + | &self.default_document_boolean
|
89 + | }
|
90 + | #[allow(missing_docs)] // documentation missing in model
|
91 + | pub fn default_document_list(&self) -> &::aws_smithy_types::Document {
|
92 + | &self.default_document_list
|
93 + | }
|
94 + | #[allow(missing_docs)] // documentation missing in model
|
95 + | pub fn default_null_document(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
|
96 + | self.default_null_document.as_ref()
|
97 + | }
|
98 + | #[allow(missing_docs)] // documentation missing in model
|
99 + | pub fn default_timestamp(&self) -> &::aws_smithy_types::DateTime {
|
100 + | &self.default_timestamp
|
101 + | }
|
102 + | #[allow(missing_docs)] // documentation missing in model
|
103 + | pub fn default_blob(&self) -> &::aws_smithy_types::Blob {
|
104 + | &self.default_blob
|
105 + | }
|
106 + | #[allow(missing_docs)] // documentation missing in model
|
107 + | pub fn default_byte(&self) -> i8 {
|
108 + | self.default_byte
|
109 + | }
|
110 + | #[allow(missing_docs)] // documentation missing in model
|
111 + | pub fn default_short(&self) -> i16 {
|
112 + | self.default_short
|
113 + | }
|
114 + | #[allow(missing_docs)] // documentation missing in model
|
115 + | pub fn default_integer(&self) -> i32 {
|
116 + | self.default_integer
|
117 + | }
|
118 + | #[allow(missing_docs)] // documentation missing in model
|
119 + | pub fn default_long(&self) -> i64 {
|
120 + | self.default_long
|
121 + | }
|
122 + | #[allow(missing_docs)] // documentation missing in model
|
123 + | pub fn default_float(&self) -> f32 {
|
124 + | self.default_float
|
125 + | }
|
126 + | #[allow(missing_docs)] // documentation missing in model
|
127 + | pub fn default_double(&self) -> f64 {
|
128 + | self.default_double
|
129 + | }
|
130 + | #[allow(missing_docs)] // documentation missing in model
|
131 + | pub fn default_map(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
132 + | &self.default_map
|
133 + | }
|
134 + | #[allow(missing_docs)] // documentation missing in model
|
135 + | pub fn default_enum(&self) -> &crate::types::TestEnum {
|
136 + | &self.default_enum
|
137 + | }
|
138 + | #[allow(missing_docs)] // documentation missing in model
|
139 + | pub fn default_int_enum(&self) -> i32 {
|
140 + | self.default_int_enum
|
141 + | }
|
142 + | #[allow(missing_docs)] // documentation missing in model
|
143 + | pub fn empty_string(&self) -> &str {
|
144 + | use std::ops::Deref;
|
145 + | self.empty_string.deref()
|
146 + | }
|
147 + | #[allow(missing_docs)] // documentation missing in model
|
148 + | pub fn false_boolean(&self) -> bool {
|
149 + | self.false_boolean
|
150 + | }
|
151 + | #[allow(missing_docs)] // documentation missing in model
|
152 + | pub fn empty_blob(&self) -> &::aws_smithy_types::Blob {
|
153 + | &self.empty_blob
|
154 + | }
|
155 + | #[allow(missing_docs)] // documentation missing in model
|
156 + | pub fn zero_byte(&self) -> i8 {
|
157 + | self.zero_byte
|
158 + | }
|
159 + | #[allow(missing_docs)] // documentation missing in model
|
160 + | pub fn zero_short(&self) -> i16 {
|
161 + | self.zero_short
|
162 + | }
|
163 + | #[allow(missing_docs)] // documentation missing in model
|
164 + | pub fn zero_integer(&self) -> i32 {
|
165 + | self.zero_integer
|
166 + | }
|
167 + | #[allow(missing_docs)] // documentation missing in model
|
168 + | pub fn zero_long(&self) -> i64 {
|
169 + | self.zero_long
|
170 + | }
|
171 + | #[allow(missing_docs)] // documentation missing in model
|
172 + | pub fn zero_float(&self) -> f32 {
|
173 + | self.zero_float
|
174 + | }
|
175 + | #[allow(missing_docs)] // documentation missing in model
|
176 + | pub fn zero_double(&self) -> f64 {
|
177 + | self.zero_double
|
178 + | }
|
179 + | }
|
180 + | impl Defaults {
|
181 + | /// Creates a new builder-style object to manufacture [`Defaults`](crate::types::Defaults).
|
182 + | pub fn builder() -> crate::types::builders::DefaultsBuilder {
|
183 + | crate::types::builders::DefaultsBuilder::default()
|
184 + | }
|
185 + | }
|
186 + |
|
187 + | /// A builder for [`Defaults`](crate::types::Defaults).
|
188 + | #[non_exhaustive]
|
189 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
190 + | pub struct DefaultsBuilder {
|
191 + | pub(crate) default_string: ::std::option::Option<::std::string::String>,
|
192 + | pub(crate) default_boolean: ::std::option::Option<bool>,
|
193 + | pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
194 + | pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
|
195 + | pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
|
196 + | pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
|
197 + | pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
|
198 + | pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
|
199 + | pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
200 + | pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
201 + | pub(crate) default_byte: ::std::option::Option<i8>,
|
202 + | pub(crate) default_short: ::std::option::Option<i16>,
|
203 + | pub(crate) default_integer: ::std::option::Option<i32>,
|
204 + | pub(crate) default_long: ::std::option::Option<i64>,
|
205 + | pub(crate) default_float: ::std::option::Option<f32>,
|
206 + | pub(crate) default_double: ::std::option::Option<f64>,
|
207 + | pub(crate) default_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
208 + | pub(crate) default_enum: ::std::option::Option<crate::types::TestEnum>,
|
209 + | pub(crate) default_int_enum: ::std::option::Option<i32>,
|
210 + | pub(crate) empty_string: ::std::option::Option<::std::string::String>,
|
211 + | pub(crate) false_boolean: ::std::option::Option<bool>,
|
212 + | pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
213 + | pub(crate) zero_byte: ::std::option::Option<i8>,
|
214 + | pub(crate) zero_short: ::std::option::Option<i16>,
|
215 + | pub(crate) zero_integer: ::std::option::Option<i32>,
|
216 + | pub(crate) zero_long: ::std::option::Option<i64>,
|
217 + | pub(crate) zero_float: ::std::option::Option<f32>,
|
218 + | pub(crate) zero_double: ::std::option::Option<f64>,
|
219 + | }
|
220 + | impl DefaultsBuilder {
|
221 + | #[allow(missing_docs)] // documentation missing in model
|
222 + | pub fn default_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
223 + | self.default_string = ::std::option::Option::Some(input.into());
|
224 + | self
|
225 + | }
|
226 + | #[allow(missing_docs)] // documentation missing in model
|
227 + | pub fn set_default_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
228 + | self.default_string = input;
|
229 + | self
|
230 + | }
|
231 + | #[allow(missing_docs)] // documentation missing in model
|
232 + | pub fn get_default_string(&self) -> &::std::option::Option<::std::string::String> {
|
233 + | &self.default_string
|
234 + | }
|
235 + | #[allow(missing_docs)] // documentation missing in model
|
236 + | pub fn default_boolean(mut self, input: bool) -> Self {
|
237 + | self.default_boolean = ::std::option::Option::Some(input);
|
238 + | self
|
239 + | }
|
240 + | #[allow(missing_docs)] // documentation missing in model
|
241 + | pub fn set_default_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
|
242 + | self.default_boolean = input;
|
243 + | self
|
244 + | }
|
245 + | #[allow(missing_docs)] // documentation missing in model
|
246 + | pub fn get_default_boolean(&self) -> &::std::option::Option<bool> {
|
247 + | &self.default_boolean
|
248 + | }
|
249 + | /// Appends an item to `default_list`.
|
250 + | ///
|
251 + | /// To override the contents of this collection use [`set_default_list`](Self::set_default_list).
|
252 + | ///
|
253 + | pub fn default_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
254 + | let mut v = self.default_list.unwrap_or_default();
|
255 + | v.push(input.into());
|
256 + | self.default_list = ::std::option::Option::Some(v);
|
257 + | self
|
258 + | }
|
259 + | #[allow(missing_docs)] // documentation missing in model
|
260 + | pub fn set_default_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
261 + | self.default_list = input;
|
262 + | self
|
263 + | }
|
264 + | #[allow(missing_docs)] // documentation missing in model
|
265 + | pub fn get_default_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
266 + | &self.default_list
|
267 + | }
|
268 + | #[allow(missing_docs)] // documentation missing in model
|
269 + | pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
|
270 + | self.default_document_map = ::std::option::Option::Some(input);
|
271 + | self
|
272 + | }
|
273 + | #[allow(missing_docs)] // documentation missing in model
|
274 + | pub fn set_default_document_map(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
|
275 + | self.default_document_map = input;
|
276 + | self
|
277 + | }
|
278 + | #[allow(missing_docs)] // documentation missing in model
|
279 + | pub fn get_default_document_map(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
|
280 + | &self.default_document_map
|
281 + | }
|
282 + | #[allow(missing_docs)] // documentation missing in model
|
283 + | pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
|
284 + | self.default_document_string = ::std::option::Option::Some(input);
|
285 + | self
|
286 + | }
|
287 + | #[allow(missing_docs)] // documentation missing in model
|
288 + | pub fn set_default_document_string(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
|
289 + | self.default_document_string = input;
|
290 + | self
|
291 + | }
|
292 + | #[allow(missing_docs)] // documentation missing in model
|
293 + | pub fn get_default_document_string(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
|
294 + | &self.default_document_string
|
295 + | }
|
296 + | #[allow(missing_docs)] // documentation missing in model
|
297 + | pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
|
298 + | self.default_document_boolean = ::std::option::Option::Some(input);
|
299 + | self
|
300 + | }
|
301 + | #[allow(missing_docs)] // documentation missing in model
|
302 + | pub fn set_default_document_boolean(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
|
303 + | self.default_document_boolean = input;
|
304 + | self
|
305 + | }
|
306 + | #[allow(missing_docs)] // documentation missing in model
|
307 + | pub fn get_default_document_boolean(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
|
308 + | &self.default_document_boolean
|
309 + | }
|
310 + | #[allow(missing_docs)] // documentation missing in model
|
311 + | pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
|
312 + | self.default_document_list = ::std::option::Option::Some(input);
|
313 + | self
|
314 + | }
|
315 + | #[allow(missing_docs)] // documentation missing in model
|
316 + | pub fn set_default_document_list(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
|
317 + | self.default_document_list = input;
|
318 + | self
|
319 + | }
|
320 + | #[allow(missing_docs)] // documentation missing in model
|
321 + | pub fn get_default_document_list(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
|
322 + | &self.default_document_list
|
323 + | }
|
324 + | #[allow(missing_docs)] // documentation missing in model
|
325 + | pub fn default_null_document(mut self, input: ::aws_smithy_types::Document) -> Self {
|
326 + | self.default_null_document = ::std::option::Option::Some(input);
|
327 + | self
|
328 + | }
|
329 + | #[allow(missing_docs)] // documentation missing in model
|
330 + | pub fn set_default_null_document(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
|
331 + | self.default_null_document = input;
|
332 + | self
|
333 + | }
|
334 + | #[allow(missing_docs)] // documentation missing in model
|
335 + | pub fn get_default_null_document(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
|
336 + | &self.default_null_document
|
337 + | }
|
338 + | #[allow(missing_docs)] // documentation missing in model
|
339 + | pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
340 + | self.default_timestamp = ::std::option::Option::Some(input);
|
341 + | self
|
342 + | }
|
343 + | #[allow(missing_docs)] // documentation missing in model
|
344 + | pub fn set_default_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
345 + | self.default_timestamp = input;
|
346 + | self
|
347 + | }
|
348 + | #[allow(missing_docs)] // documentation missing in model
|
349 + | pub fn get_default_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
350 + | &self.default_timestamp
|
351 + | }
|
352 + | #[allow(missing_docs)] // documentation missing in model
|
353 + | pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
354 + | self.default_blob = ::std::option::Option::Some(input);
|
355 + | self
|
356 + | }
|
357 + | #[allow(missing_docs)] // documentation missing in model
|
358 + | pub fn set_default_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
|
359 + | self.default_blob = input;
|
360 + | self
|
361 + | }
|
362 + | #[allow(missing_docs)] // documentation missing in model
|
363 + | pub fn get_default_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
|
364 + | &self.default_blob
|
365 + | }
|
366 + | #[allow(missing_docs)] // documentation missing in model
|
367 + | pub fn default_byte(mut self, input: i8) -> Self {
|
368 + | self.default_byte = ::std::option::Option::Some(input);
|
369 + | self
|
370 + | }
|
371 + | #[allow(missing_docs)] // documentation missing in model
|
372 + | pub fn set_default_byte(mut self, input: ::std::option::Option<i8>) -> Self {
|
373 + | self.default_byte = input;
|
374 + | self
|
375 + | }
|
376 + | #[allow(missing_docs)] // documentation missing in model
|
377 + | pub fn get_default_byte(&self) -> &::std::option::Option<i8> {
|
378 + | &self.default_byte
|
379 + | }
|
380 + | #[allow(missing_docs)] // documentation missing in model
|
381 + | pub fn default_short(mut self, input: i16) -> Self {
|
382 + | self.default_short = ::std::option::Option::Some(input);
|
383 + | self
|
384 + | }
|
385 + | #[allow(missing_docs)] // documentation missing in model
|
386 + | pub fn set_default_short(mut self, input: ::std::option::Option<i16>) -> Self {
|
387 + | self.default_short = input;
|
388 + | self
|
389 + | }
|
390 + | #[allow(missing_docs)] // documentation missing in model
|
391 + | pub fn get_default_short(&self) -> &::std::option::Option<i16> {
|
392 + | &self.default_short
|
393 + | }
|
394 + | #[allow(missing_docs)] // documentation missing in model
|
395 + | pub fn default_integer(mut self, input: i32) -> Self {
|
396 + | self.default_integer = ::std::option::Option::Some(input);
|
397 + | self
|
398 + | }
|
399 + | #[allow(missing_docs)] // documentation missing in model
|
400 + | pub fn set_default_integer(mut self, input: ::std::option::Option<i32>) -> Self {
|
401 + | self.default_integer = input;
|
402 + | self
|
403 + | }
|
404 + | #[allow(missing_docs)] // documentation missing in model
|
405 + | pub fn get_default_integer(&self) -> &::std::option::Option<i32> {
|
406 + | &self.default_integer
|
407 + | }
|
408 + | #[allow(missing_docs)] // documentation missing in model
|
409 + | pub fn default_long(mut self, input: i64) -> Self {
|
410 + | self.default_long = ::std::option::Option::Some(input);
|
411 + | self
|
412 + | }
|
413 + | #[allow(missing_docs)] // documentation missing in model
|
414 + | pub fn set_default_long(mut self, input: ::std::option::Option<i64>) -> Self {
|
415 + | self.default_long = input;
|
416 + | self
|
417 + | }
|
418 + | #[allow(missing_docs)] // documentation missing in model
|
419 + | pub fn get_default_long(&self) -> &::std::option::Option<i64> {
|
420 + | &self.default_long
|
421 + | }
|
422 + | #[allow(missing_docs)] // documentation missing in model
|
423 + | pub fn default_float(mut self, input: f32) -> Self {
|
424 + | self.default_float = ::std::option::Option::Some(input);
|
425 + | self
|
426 + | }
|
427 + | #[allow(missing_docs)] // documentation missing in model
|
428 + | pub fn set_default_float(mut self, input: ::std::option::Option<f32>) -> Self {
|
429 + | self.default_float = input;
|
430 + | self
|
431 + | }
|
432 + | #[allow(missing_docs)] // documentation missing in model
|
433 + | pub fn get_default_float(&self) -> &::std::option::Option<f32> {
|
434 + | &self.default_float
|
435 + | }
|
436 + | #[allow(missing_docs)] // documentation missing in model
|
437 + | pub fn default_double(mut self, input: f64) -> Self {
|
438 + | self.default_double = ::std::option::Option::Some(input);
|
439 + | self
|
440 + | }
|
441 + | #[allow(missing_docs)] // documentation missing in model
|
442 + | pub fn set_default_double(mut self, input: ::std::option::Option<f64>) -> Self {
|
443 + | self.default_double = input;
|
444 + | self
|
445 + | }
|
446 + | #[allow(missing_docs)] // documentation missing in model
|
447 + | pub fn get_default_double(&self) -> &::std::option::Option<f64> {
|
448 + | &self.default_double
|
449 + | }
|
450 + | /// Adds a key-value pair to `default_map`.
|
451 + | ///
|
452 + | /// To override the contents of this collection use [`set_default_map`](Self::set_default_map).
|
453 + | ///
|
454 + | pub fn default_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
|
455 + | let mut hash_map = self.default_map.unwrap_or_default();
|
456 + | hash_map.insert(k.into(), v.into());
|
457 + | self.default_map = ::std::option::Option::Some(hash_map);
|
458 + | self
|
459 + | }
|
460 + | #[allow(missing_docs)] // documentation missing in model
|
461 + | pub fn set_default_map(
|
462 + | mut self,
|
463 + | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
464 + | ) -> Self {
|
465 + | self.default_map = input;
|
466 + | self
|
467 + | }
|
468 + | #[allow(missing_docs)] // documentation missing in model
|
469 + | pub fn get_default_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
|
470 + | &self.default_map
|
471 + | }
|
472 + | #[allow(missing_docs)] // documentation missing in model
|
473 + | pub fn default_enum(mut self, input: crate::types::TestEnum) -> Self {
|
474 + | self.default_enum = ::std::option::Option::Some(input);
|
475 + | self
|
476 + | }
|
477 + | #[allow(missing_docs)] // documentation missing in model
|
478 + | pub fn set_default_enum(mut self, input: ::std::option::Option<crate::types::TestEnum>) -> Self {
|
479 + | self.default_enum = input;
|
480 + | self
|
481 + | }
|
482 + | #[allow(missing_docs)] // documentation missing in model
|
483 + | pub fn get_default_enum(&self) -> &::std::option::Option<crate::types::TestEnum> {
|
484 + | &self.default_enum
|
485 + | }
|
486 + | #[allow(missing_docs)] // documentation missing in model
|
487 + | pub fn default_int_enum(mut self, input: i32) -> Self {
|
488 + | self.default_int_enum = ::std::option::Option::Some(input);
|
489 + | self
|
490 + | }
|
491 + | #[allow(missing_docs)] // documentation missing in model
|
492 + | pub fn set_default_int_enum(mut self, input: ::std::option::Option<i32>) -> Self {
|
493 + | self.default_int_enum = input;
|
494 + | self
|
495 + | }
|
496 + | #[allow(missing_docs)] // documentation missing in model
|
497 + | pub fn get_default_int_enum(&self) -> &::std::option::Option<i32> {
|
498 + | &self.default_int_enum
|
499 + | }
|
500 + | #[allow(missing_docs)] // documentation missing in model
|
501 + | pub fn empty_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
502 + | self.empty_string = ::std::option::Option::Some(input.into());
|
503 + | self
|
504 + | }
|
505 + | #[allow(missing_docs)] // documentation missing in model
|
506 + | pub fn set_empty_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
507 + | self.empty_string = input;
|
508 + | self
|
509 + | }
|
510 + | #[allow(missing_docs)] // documentation missing in model
|
511 + | pub fn get_empty_string(&self) -> &::std::option::Option<::std::string::String> {
|
512 + | &self.empty_string
|
513 + | }
|
514 + | #[allow(missing_docs)] // documentation missing in model
|
515 + | pub fn false_boolean(mut self, input: bool) -> Self {
|
516 + | self.false_boolean = ::std::option::Option::Some(input);
|
517 + | self
|
518 + | }
|
519 + | #[allow(missing_docs)] // documentation missing in model
|
520 + | pub fn set_false_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
|
521 + | self.false_boolean = input;
|
522 + | self
|
523 + | }
|
524 + | #[allow(missing_docs)] // documentation missing in model
|
525 + | pub fn get_false_boolean(&self) -> &::std::option::Option<bool> {
|
526 + | &self.false_boolean
|
527 + | }
|
528 + | #[allow(missing_docs)] // documentation missing in model
|
529 + | pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
530 + | self.empty_blob = ::std::option::Option::Some(input);
|
531 + | self
|
532 + | }
|
533 + | #[allow(missing_docs)] // documentation missing in model
|
534 + | pub fn set_empty_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
|
535 + | self.empty_blob = input;
|
536 + | self
|
537 + | }
|
538 + | #[allow(missing_docs)] // documentation missing in model
|
539 + | pub fn get_empty_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
|
540 + | &self.empty_blob
|
541 + | }
|
542 + | #[allow(missing_docs)] // documentation missing in model
|
543 + | pub fn zero_byte(mut self, input: i8) -> Self {
|
544 + | self.zero_byte = ::std::option::Option::Some(input);
|
545 + | self
|
546 + | }
|
547 + | #[allow(missing_docs)] // documentation missing in model
|
548 + | pub fn set_zero_byte(mut self, input: ::std::option::Option<i8>) -> Self {
|
549 + | self.zero_byte = input;
|
550 + | self
|
551 + | }
|
552 + | #[allow(missing_docs)] // documentation missing in model
|
553 + | pub fn get_zero_byte(&self) -> &::std::option::Option<i8> {
|
554 + | &self.zero_byte
|
555 + | }
|
556 + | #[allow(missing_docs)] // documentation missing in model
|
557 + | pub fn zero_short(mut self, input: i16) -> Self {
|
558 + | self.zero_short = ::std::option::Option::Some(input);
|
559 + | self
|
560 + | }
|
561 + | #[allow(missing_docs)] // documentation missing in model
|
562 + | pub fn set_zero_short(mut self, input: ::std::option::Option<i16>) -> Self {
|
563 + | self.zero_short = input;
|
564 + | self
|
565 + | }
|
566 + | #[allow(missing_docs)] // documentation missing in model
|
567 + | pub fn get_zero_short(&self) -> &::std::option::Option<i16> {
|
568 + | &self.zero_short
|
569 + | }
|
570 + | #[allow(missing_docs)] // documentation missing in model
|
571 + | pub fn zero_integer(mut self, input: i32) -> Self {
|
572 + | self.zero_integer = ::std::option::Option::Some(input);
|
573 + | self
|
574 + | }
|
575 + | #[allow(missing_docs)] // documentation missing in model
|
576 + | pub fn set_zero_integer(mut self, input: ::std::option::Option<i32>) -> Self {
|
577 + | self.zero_integer = input;
|
578 + | self
|
579 + | }
|
580 + | #[allow(missing_docs)] // documentation missing in model
|
581 + | pub fn get_zero_integer(&self) -> &::std::option::Option<i32> {
|
582 + | &self.zero_integer
|
583 + | }
|
584 + | #[allow(missing_docs)] // documentation missing in model
|
585 + | pub fn zero_long(mut self, input: i64) -> Self {
|
586 + | self.zero_long = ::std::option::Option::Some(input);
|
587 + | self
|
588 + | }
|
589 + | #[allow(missing_docs)] // documentation missing in model
|
590 + | pub fn set_zero_long(mut self, input: ::std::option::Option<i64>) -> Self {
|
591 + | self.zero_long = input;
|
592 + | self
|
593 + | }
|
594 + | #[allow(missing_docs)] // documentation missing in model
|
595 + | pub fn get_zero_long(&self) -> &::std::option::Option<i64> {
|
596 + | &self.zero_long
|
597 + | }
|
598 + | #[allow(missing_docs)] // documentation missing in model
|
599 + | pub fn zero_float(mut self, input: f32) -> Self {
|
600 + | self.zero_float = ::std::option::Option::Some(input);
|
601 + | self
|
602 + | }
|
603 + | #[allow(missing_docs)] // documentation missing in model
|
604 + | pub fn set_zero_float(mut self, input: ::std::option::Option<f32>) -> Self {
|
605 + | self.zero_float = input;
|
606 + | self
|
607 + | }
|
608 + | #[allow(missing_docs)] // documentation missing in model
|
609 + | pub fn get_zero_float(&self) -> &::std::option::Option<f32> {
|
610 + | &self.zero_float
|
611 + | }
|
612 + | #[allow(missing_docs)] // documentation missing in model
|
613 + | pub fn zero_double(mut self, input: f64) -> Self {
|
614 + | self.zero_double = ::std::option::Option::Some(input);
|
615 + | self
|
616 + | }
|
617 + | #[allow(missing_docs)] // documentation missing in model
|
618 + | pub fn set_zero_double(mut self, input: ::std::option::Option<f64>) -> Self {
|
619 + | self.zero_double = input;
|
620 + | self
|
621 + | }
|
622 + | #[allow(missing_docs)] // documentation missing in model
|
623 + | pub fn get_zero_double(&self) -> &::std::option::Option<f64> {
|
624 + | &self.zero_double
|
625 + | }
|
626 + | /// Consumes the builder and constructs a [`Defaults`](crate::types::Defaults).
|
627 + | pub fn build(self) -> crate::types::Defaults {
|
628 + | crate::types::Defaults {
|
629 + | default_string: self.default_string.unwrap_or_else(|| "hi".to_owned()),
|
630 + | default_boolean: self.default_boolean.unwrap_or(true),
|
631 + | default_list: self.default_list.unwrap_or_default(),
|
632 + | default_document_map: self.default_document_map.unwrap_or_else(|| {
|
633 + | let json_bytes = br#"{}"#;
|
634 + | let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
|
635 + | ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
|
636 + | }),
|
637 + | default_document_string: self.default_document_string.unwrap_or_else(|| {
|
638 + | let json_bytes = br#""hi""#;
|
639 + | let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
|
640 + | ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
|
641 + | }),
|
642 + | default_document_boolean: self.default_document_boolean.unwrap_or_else(|| {
|
643 + | let json_bytes = br#"true"#;
|
644 + | let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
|
645 + | ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
|
646 + | }),
|
647 + | default_document_list: self.default_document_list.unwrap_or_else(|| {
|
648 + | let json_bytes = br#"[]"#;
|
649 + | let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
|
650 + | ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
|
651 + | }),
|
652 + | default_null_document: self.default_null_document,
|
653 + | default_timestamp: self
|
654 + | .default_timestamp
|
655 + | .unwrap_or_else(|| ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)),
|
656 + | default_blob: self.default_blob.unwrap_or_else(|| ::aws_smithy_types::Blob::new("abc")),
|
657 + | default_byte: self.default_byte.unwrap_or(1),
|
658 + | default_short: self.default_short.unwrap_or(1),
|
659 + | default_integer: self.default_integer.unwrap_or(10),
|
660 + | default_long: self.default_long.unwrap_or(100),
|
661 + | default_float: self.default_float.unwrap_or(1.0_f32),
|
662 + | default_double: self.default_double.unwrap_or(1.0_f64),
|
663 + | default_map: self.default_map.unwrap_or_default(),
|
664 + | default_enum: self
|
665 + | .default_enum
|
666 + | .unwrap_or("FOO".parse::<crate::types::TestEnum>().expect("static value validated to member")),
|
667 + | default_int_enum: self.default_int_enum.unwrap_or(1),
|
668 + | empty_string: self.empty_string.unwrap_or_default(),
|
669 + | false_boolean: self.false_boolean.unwrap_or_default(),
|
670 + | empty_blob: self.empty_blob.unwrap_or_default(),
|
671 + | zero_byte: self.zero_byte.unwrap_or_default(),
|
672 + | zero_short: self.zero_short.unwrap_or_default(),
|
673 + | zero_integer: self.zero_integer.unwrap_or_default(),
|
674 + | zero_long: self.zero_long.unwrap_or_default(),
|
675 + | zero_float: self.zero_float.unwrap_or(0.0_f32),
|
676 + | zero_double: self.zero_double.unwrap_or(0.0_f64),
|
677 + | }
|
678 + | }
|
679 + | }
|