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::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4 + | pub struct HttpQueryParamsOnlyOperationInput {
|
5 + | #[allow(missing_docs)] // documentation missing in model
|
6 + | pub query_map: ::std::option::Option<
|
7 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
8 + | >,
|
9 + | }
|
10 + | impl HttpQueryParamsOnlyOperationInput {
|
11 + | #[allow(missing_docs)] // documentation missing in model
|
12 + | pub fn query_map(
|
13 + | &self,
|
14 + | ) -> ::std::option::Option<
|
15 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
16 + | > {
|
17 + | self.query_map.as_ref()
|
18 + | }
|
19 + | }
|
20 + | impl HttpQueryParamsOnlyOperationInput {
|
21 + | /// Creates a new builder-style object to manufacture [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
22 + | pub fn builder() -> crate::input::http_query_params_only_operation_input::Builder {
|
23 + | crate::input::http_query_params_only_operation_input::Builder::default()
|
24 + | }
|
25 + | }
|
26 + | impl crate::constrained::Constrained for crate::input::HttpQueryParamsOnlyOperationInput {
|
27 + | type Unconstrained = crate::input::http_query_params_only_operation_input::Builder;
|
28 + | }
|
29 + |
|
30 + | #[allow(missing_docs)] // documentation missing in model
|
31 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
32 + | pub struct QueryPrecedenceInput {
|
33 + | #[allow(missing_docs)] // documentation missing in model
|
34 + | pub foo: ::std::option::Option<::std::string::String>,
|
35 + | #[allow(missing_docs)] // documentation missing in model
|
36 + | pub baz: ::std::option::Option<
|
37 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
38 + | >,
|
39 + | }
|
40 + | impl QueryPrecedenceInput {
|
41 + | #[allow(missing_docs)] // documentation missing in model
|
42 + | pub fn foo(&self) -> ::std::option::Option<&str> {
|
43 + | self.foo.as_deref()
|
44 + | }
|
45 + | #[allow(missing_docs)] // documentation missing in model
|
46 + | pub fn baz(
|
47 + | &self,
|
48 + | ) -> ::std::option::Option<
|
49 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
50 + | > {
|
51 + | self.baz.as_ref()
|
52 + | }
|
53 + | }
|
54 + | impl QueryPrecedenceInput {
|
55 + | /// Creates a new builder-style object to manufacture [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
56 + | pub fn builder() -> crate::input::query_precedence_input::Builder {
|
57 + | crate::input::query_precedence_input::Builder::default()
|
58 + | }
|
59 + | }
|
60 + | impl crate::constrained::Constrained for crate::input::QueryPrecedenceInput {
|
61 + | type Unconstrained = crate::input::query_precedence_input::Builder;
|
62 + | }
|
63 + |
|
64 + | #[allow(missing_docs)] // documentation missing in model
|
65 + | #[derive(
|
66 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
67 + | )]
|
68 + | pub struct EmptyStructWithContentOnWireOpInput {}
|
69 + | impl EmptyStructWithContentOnWireOpInput {
|
70 + | /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
71 + | pub fn builder() -> crate::input::empty_struct_with_content_on_wire_op_input::Builder {
|
72 + | crate::input::empty_struct_with_content_on_wire_op_input::Builder::default()
|
73 + | }
|
74 + | }
|
75 + | impl crate::constrained::Constrained for crate::input::EmptyStructWithContentOnWireOpInput {
|
76 + | type Unconstrained = crate::input::empty_struct_with_content_on_wire_op_input::Builder;
|
77 + | }
|
78 + |
|
79 + | #[allow(missing_docs)] // documentation missing in model
|
80 + | #[derive(
|
81 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
82 + | )]
|
83 + | pub struct CaseInsensitiveErrorOperationInput {}
|
84 + | impl CaseInsensitiveErrorOperationInput {
|
85 + | /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
86 + | pub fn builder() -> crate::input::case_insensitive_error_operation_input::Builder {
|
87 + | crate::input::case_insensitive_error_operation_input::Builder::default()
|
88 + | }
|
89 + | }
|
90 + | impl crate::constrained::Constrained for crate::input::CaseInsensitiveErrorOperationInput {
|
91 + | type Unconstrained = crate::input::case_insensitive_error_operation_input::Builder;
|
92 + | }
|
93 + |
|
94 + | #[allow(missing_docs)] // documentation missing in model
|
95 + | #[derive(
|
96 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
97 + | )]
|
98 + | pub struct NullInNonSparseInput {}
|
99 + | impl NullInNonSparseInput {
|
100 + | /// Creates a new builder-style object to manufacture [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
101 + | pub fn builder() -> crate::input::null_in_non_sparse_input::Builder {
|
102 + | crate::input::null_in_non_sparse_input::Builder::default()
|
103 + | }
|
104 + | }
|
105 + | impl crate::constrained::Constrained for crate::input::NullInNonSparseInput {
|
106 + | type Unconstrained = crate::input::null_in_non_sparse_input::Builder;
|
107 + | }
|
108 + |
|
109 + | #[allow(missing_docs)] // documentation missing in model
|
110 + | #[derive(
|
111 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
112 + | )]
|
113 + | pub struct EscapedStringValuesInput {
|
114 + | #[allow(missing_docs)] // documentation missing in model
|
115 + | pub r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
116 + | #[allow(missing_docs)] // documentation missing in model
|
117 + | pub some_string: ::std::option::Option<::std::string::String>,
|
118 + | }
|
119 + | impl EscapedStringValuesInput {
|
120 + | #[allow(missing_docs)] // documentation missing in model
|
121 + | pub fn r#enum(&self) -> ::std::option::Option<&crate::model::EnumWithEscapedChars> {
|
122 + | self.r#enum.as_ref()
|
123 + | }
|
124 + | #[allow(missing_docs)] // documentation missing in model
|
125 + | pub fn some_string(&self) -> ::std::option::Option<&str> {
|
126 + | self.some_string.as_deref()
|
127 + | }
|
128 + | }
|
129 + | impl EscapedStringValuesInput {
|
130 + | /// Creates a new builder-style object to manufacture [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
131 + | pub fn builder() -> crate::input::escaped_string_values_input::Builder {
|
132 + | crate::input::escaped_string_values_input::Builder::default()
|
133 + | }
|
134 + | }
|
135 + | impl crate::constrained::Constrained for crate::input::EscapedStringValuesInput {
|
136 + | type Unconstrained = crate::input::escaped_string_values_input::Builder;
|
137 + | }
|
138 + |
|
139 + | #[allow(missing_docs)] // documentation missing in model
|
140 + | #[derive(
|
141 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
142 + | )]
|
143 + | pub struct PrimitiveIntOpInput {
|
144 + | #[allow(missing_docs)] // documentation missing in model
|
145 + | pub value: i32,
|
146 + | }
|
147 + | impl PrimitiveIntOpInput {
|
148 + | #[allow(missing_docs)] // documentation missing in model
|
149 + | pub fn value(&self) -> i32 {
|
150 + | self.value
|
151 + | }
|
152 + | }
|
153 + | impl PrimitiveIntOpInput {
|
154 + | /// Creates a new builder-style object to manufacture [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
|
155 + | pub fn builder() -> crate::input::primitive_int_op_input::Builder {
|
156 + | crate::input::primitive_int_op_input::Builder::default()
|
157 + | }
|
158 + | }
|
159 + | impl crate::constrained::Constrained for crate::input::PrimitiveIntOpInput {
|
160 + | type Unconstrained = crate::input::primitive_int_op_input::Builder;
|
161 + | }
|
162 + |
|
163 + | #[allow(missing_docs)] // documentation missing in model
|
164 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
165 + | pub struct MapWithEnumKeyOpInput {
|
166 + | #[allow(missing_docs)] // documentation missing in model
|
167 + | pub map: ::std::option::Option<
|
168 + | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
169 + | >,
|
170 + | }
|
171 + | impl MapWithEnumKeyOpInput {
|
172 + | #[allow(missing_docs)] // documentation missing in model
|
173 + | pub fn map(
|
174 + | &self,
|
175 + | ) -> ::std::option::Option<
|
176 + | &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
177 + | > {
|
178 + | self.map.as_ref()
|
179 + | }
|
180 + | }
|
181 + | impl MapWithEnumKeyOpInput {
|
182 + | /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
183 + | pub fn builder() -> crate::input::map_with_enum_key_op_input::Builder {
|
184 + | crate::input::map_with_enum_key_op_input::Builder::default()
|
185 + | }
|
186 + | }
|
187 + | impl crate::constrained::Constrained for crate::input::MapWithEnumKeyOpInput {
|
188 + | type Unconstrained = crate::input::map_with_enum_key_op_input::Builder;
|
189 + | }
|
190 + |
|
191 + | #[allow(missing_docs)] // documentation missing in model
|
192 + | #[derive(
|
193 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
194 + | )]
|
195 + | pub struct StatusResponseInput {}
|
196 + | impl StatusResponseInput {
|
197 + | /// Creates a new builder-style object to manufacture [`StatusResponseInput`](crate::input::StatusResponseInput).
|
198 + | pub fn builder() -> crate::input::status_response_input::Builder {
|
199 + | crate::input::status_response_input::Builder::default()
|
200 + | }
|
201 + | }
|
202 + | impl crate::constrained::Constrained for crate::input::StatusResponseInput {
|
203 + | type Unconstrained = crate::input::status_response_input::Builder;
|
204 + | }
|
205 + |
|
206 + | #[allow(missing_docs)] // documentation missing in model
|
207 + | #[derive(
|
208 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
209 + | )]
|
210 + | pub struct EnumQueryInput {
|
211 + | #[allow(missing_docs)] // documentation missing in model
|
212 + | pub r#enum: crate::model::StringEnum,
|
213 + | }
|
214 + | impl EnumQueryInput {
|
215 + | #[allow(missing_docs)] // documentation missing in model
|
216 + | pub fn r#enum(&self) -> &crate::model::StringEnum {
|
217 + | &self.r#enum
|
218 + | }
|
219 + | }
|
220 + | impl EnumQueryInput {
|
221 + | /// Creates a new builder-style object to manufacture [`EnumQueryInput`](crate::input::EnumQueryInput).
|
222 + | pub fn builder() -> crate::input::enum_query_input::Builder {
|
223 + | crate::input::enum_query_input::Builder::default()
|
224 + | }
|
225 + | }
|
226 + | impl crate::constrained::Constrained for crate::input::EnumQueryInput {
|
227 + | type Unconstrained = crate::input::enum_query_input::Builder;
|
228 + | }
|
229 + |
|
230 + | #[allow(missing_docs)] // documentation missing in model
|
231 + | #[derive(
|
232 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
233 + | )]
|
234 + | pub struct PrimitiveIntHeaderInput {}
|
235 + | impl PrimitiveIntHeaderInput {
|
236 + | /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
237 + | pub fn builder() -> crate::input::primitive_int_header_input::Builder {
|
238 + | crate::input::primitive_int_header_input::Builder::default()
|
239 + | }
|
240 + | }
|
241 + | impl crate::constrained::Constrained for crate::input::PrimitiveIntHeaderInput {
|
242 + | type Unconstrained = crate::input::primitive_int_header_input::Builder;
|
243 + | }
|
244 + |
|
245 + | #[allow(missing_docs)] // documentation missing in model
|
246 + | #[derive(
|
247 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
248 + | )]
|
249 + | pub struct StringPayloadInput {
|
250 + | #[allow(missing_docs)] // documentation missing in model
|
251 + | pub payload: ::std::option::Option<::std::string::String>,
|
252 + | }
|
253 + | impl StringPayloadInput {
|
254 + | #[allow(missing_docs)] // documentation missing in model
|
255 + | pub fn payload(&self) -> ::std::option::Option<&str> {
|
256 + | self.payload.as_deref()
|
257 + | }
|
258 + | }
|
259 + | impl StringPayloadInput {
|
260 + | /// Creates a new builder-style object to manufacture [`StringPayloadInput`](crate::input::StringPayloadInput).
|
261 + | pub fn builder() -> crate::input::string_payload_input::Builder {
|
262 + | crate::input::string_payload_input::Builder::default()
|
263 + | }
|
264 + | }
|
265 + | impl crate::constrained::Constrained for crate::input::StringPayloadInput {
|
266 + | type Unconstrained = crate::input::string_payload_input::Builder;
|
267 + | }
|
268 + | /// See [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
269 + | pub mod http_query_params_only_operation_input {
|
270 + |
|
271 + | impl ::std::convert::From<Builder> for crate::input::HttpQueryParamsOnlyOperationInput {
|
272 + | fn from(builder: Builder) -> Self {
|
273 + | builder.build()
|
274 + | }
|
275 + | }
|
276 + | /// A builder for [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
277 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
278 + | pub struct Builder {
|
279 + | pub(crate) query_map: ::std::option::Option<
|
280 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
281 + | >,
|
282 + | }
|
283 + | impl Builder {
|
284 + | #[allow(missing_docs)] // documentation missing in model
|
285 + | pub fn query_map(
|
286 + | mut self,
|
287 + | input: ::std::option::Option<
|
288 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
289 + | >,
|
290 + | ) -> Self {
|
291 + | self.query_map = input;
|
292 + | self
|
293 + | }
|
294 + | #[allow(missing_docs)] // documentation missing in model
|
295 + | pub(crate) fn set_query_map(
|
296 + | mut self,
|
297 + | input: Option<
|
298 + | impl ::std::convert::Into<
|
299 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
300 + | >,
|
301 + | >,
|
302 + | ) -> Self {
|
303 + | self.query_map = input.map(|v| v.into());
|
304 + | self
|
305 + | }
|
306 + | /// Consumes the builder and constructs a [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput).
|
307 + | pub fn build(self) -> crate::input::HttpQueryParamsOnlyOperationInput {
|
308 + | self.build_enforcing_all_constraints()
|
309 + | }
|
310 + | fn build_enforcing_all_constraints(
|
311 + | self,
|
312 + | ) -> crate::input::HttpQueryParamsOnlyOperationInput {
|
313 + | crate::input::HttpQueryParamsOnlyOperationInput {
|
314 + | query_map: self.query_map,
|
315 + | }
|
316 + | }
|
317 + | }
|
318 + | }
|
319 + | /// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
320 + | pub mod query_precedence_input {
|
321 + |
|
322 + | impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
|
323 + | fn from(builder: Builder) -> Self {
|
324 + | builder.build()
|
325 + | }
|
326 + | }
|
327 + | /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
328 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
329 + | pub struct Builder {
|
330 + | pub(crate) foo: ::std::option::Option<::std::string::String>,
|
331 + | pub(crate) baz: ::std::option::Option<
|
332 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
333 + | >,
|
334 + | }
|
335 + | impl Builder {
|
336 + | #[allow(missing_docs)] // documentation missing in model
|
337 + | pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
338 + | self.foo = input;
|
339 + | self
|
340 + | }
|
341 + | #[allow(missing_docs)] // documentation missing in model
|
342 + | pub(crate) fn set_foo(
|
343 + | mut self,
|
344 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
345 + | ) -> Self {
|
346 + | self.foo = input.map(|v| v.into());
|
347 + | self
|
348 + | }
|
349 + | #[allow(missing_docs)] // documentation missing in model
|
350 + | pub fn baz(
|
351 + | mut self,
|
352 + | input: ::std::option::Option<
|
353 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
354 + | >,
|
355 + | ) -> Self {
|
356 + | self.baz = input;
|
357 + | self
|
358 + | }
|
359 + | #[allow(missing_docs)] // documentation missing in model
|
360 + | pub(crate) fn set_baz(
|
361 + | mut self,
|
362 + | input: Option<
|
363 + | impl ::std::convert::Into<
|
364 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
365 + | >,
|
366 + | >,
|
367 + | ) -> Self {
|
368 + | self.baz = input.map(|v| v.into());
|
369 + | self
|
370 + | }
|
371 + | /// Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
|
372 + | pub fn build(self) -> crate::input::QueryPrecedenceInput {
|
373 + | self.build_enforcing_all_constraints()
|
374 + | }
|
375 + | fn build_enforcing_all_constraints(self) -> crate::input::QueryPrecedenceInput {
|
376 + | crate::input::QueryPrecedenceInput {
|
377 + | foo: self.foo,
|
378 + | baz: self.baz,
|
379 + | }
|
380 + | }
|
381 + | }
|
382 + | }
|
383 + | /// See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
384 + | pub mod empty_struct_with_content_on_wire_op_input {
|
385 + |
|
386 + | impl ::std::convert::From<Builder> for crate::input::EmptyStructWithContentOnWireOpInput {
|
387 + | fn from(builder: Builder) -> Self {
|
388 + | builder.build()
|
389 + | }
|
390 + | }
|
391 + | /// A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
392 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
393 + | pub struct Builder {}
|
394 + | impl Builder {
|
395 + | /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
|
396 + | pub fn build(self) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
397 + | self.build_enforcing_all_constraints()
|
398 + | }
|
399 + | fn build_enforcing_all_constraints(
|
400 + | self,
|
401 + | ) -> crate::input::EmptyStructWithContentOnWireOpInput {
|
402 + | crate::input::EmptyStructWithContentOnWireOpInput {}
|
403 + | }
|
404 + | }
|
405 + | }
|
406 + | /// See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
407 + | pub mod case_insensitive_error_operation_input {
|
408 + |
|
409 + | impl ::std::convert::From<Builder> for crate::input::CaseInsensitiveErrorOperationInput {
|
410 + | fn from(builder: Builder) -> Self {
|
411 + | builder.build()
|
412 + | }
|
413 + | }
|
414 + | /// A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
415 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
416 + | pub struct Builder {}
|
417 + | impl Builder {
|
418 + | /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
|
419 + | pub fn build(self) -> crate::input::CaseInsensitiveErrorOperationInput {
|
420 + | self.build_enforcing_all_constraints()
|
421 + | }
|
422 + | fn build_enforcing_all_constraints(
|
423 + | self,
|
424 + | ) -> crate::input::CaseInsensitiveErrorOperationInput {
|
425 + | crate::input::CaseInsensitiveErrorOperationInput {}
|
426 + | }
|
427 + | }
|
428 + | }
|
429 + | /// See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
430 + | pub mod null_in_non_sparse_input {
|
431 + |
|
432 + | impl ::std::convert::From<Builder> for crate::input::NullInNonSparseInput {
|
433 + | fn from(builder: Builder) -> Self {
|
434 + | builder.build()
|
435 + | }
|
436 + | }
|
437 + | /// A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
438 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
439 + | pub struct Builder {}
|
440 + | impl Builder {
|
441 + | /// Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
|
442 + | pub fn build(self) -> crate::input::NullInNonSparseInput {
|
443 + | self.build_enforcing_all_constraints()
|
444 + | }
|
445 + | fn build_enforcing_all_constraints(self) -> crate::input::NullInNonSparseInput {
|
446 + | crate::input::NullInNonSparseInput {}
|
447 + | }
|
448 + | }
|
449 + | }
|
450 + | /// See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
451 + | pub mod escaped_string_values_input {
|
452 + |
|
453 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
454 + | /// Holds one variant for each of the ways the builder can fail.
|
455 + | #[non_exhaustive]
|
456 + | #[allow(clippy::enum_variant_names)]
|
457 + | pub enum ConstraintViolation {
|
458 + | /// Constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`.
|
459 + | #[doc(hidden)]
|
460 + | Enum(crate::model::enum_with_escaped_chars::ConstraintViolation),
|
461 + | }
|
462 + | impl ::std::fmt::Display for ConstraintViolation {
|
463 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
464 + | match self {
|
465 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`"),
|
466 + | }
|
467 + | }
|
468 + | }
|
469 + | impl ::std::error::Error for ConstraintViolation {}
|
470 + | impl ConstraintViolation {
|
471 + | pub(crate) fn as_validation_exception_field(
|
472 + | self,
|
473 + | path: ::std::string::String,
|
474 + | ) -> crate::model::ValidationExceptionField {
|
475 + | match self {
|
476 + | ConstraintViolation::Enum(inner) => {
|
477 + | inner.as_validation_exception_field(path + "/enum")
|
478 + | }
|
479 + | }
|
480 + | }
|
481 + | }
|
482 + | impl ::std::convert::From<ConstraintViolation>
|
483 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
484 + | {
|
485 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
486 + | let first_validation_exception_field =
|
487 + | constraint_violation.as_validation_exception_field("".to_owned());
|
488 + | let validation_exception = crate::error::ValidationException {
|
489 + | message: format!(
|
490 + | "1 validation error detected. {}",
|
491 + | &first_validation_exception_field.message
|
492 + | ),
|
493 + | field_list: Some(vec![first_validation_exception_field]),
|
494 + | };
|
495 + | Self::ConstraintViolation(
|
496 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
497 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
498 + | )
|
499 + | }
|
500 + | }
|
501 + | impl ::std::convert::From<Builder>
|
502 + | for crate::constrained::MaybeConstrained<crate::input::EscapedStringValuesInput>
|
503 + | {
|
504 + | fn from(builder: Builder) -> Self {
|
505 + | Self::Unconstrained(builder)
|
506 + | }
|
507 + | }
|
508 + | impl ::std::convert::TryFrom<Builder> for crate::input::EscapedStringValuesInput {
|
509 + | type Error = ConstraintViolation;
|
510 + |
|
511 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
512 + | builder.build()
|
513 + | }
|
514 + | }
|
515 + | /// A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
516 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
517 + | pub struct Builder {
|
518 + | pub(crate) r#enum: ::std::option::Option<
|
519 + | crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
|
520 + | >,
|
521 + | pub(crate) some_string: ::std::option::Option<::std::string::String>,
|
522 + | }
|
523 + | impl Builder {
|
524 + | #[allow(missing_docs)] // documentation missing in model
|
525 + | pub fn r#enum(
|
526 + | mut self,
|
527 + | input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
|
528 + | ) -> Self {
|
529 + | self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
|
530 + | self
|
531 + | }
|
532 + | #[allow(missing_docs)] // documentation missing in model
|
533 + | pub(crate) fn set_enum(
|
534 + | mut self,
|
535 + | input: Option<
|
536 + | impl ::std::convert::Into<
|
537 + | crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
|
538 + | >,
|
539 + | >,
|
540 + | ) -> Self {
|
541 + | self.r#enum = input.map(|v| v.into());
|
542 + | self
|
543 + | }
|
544 + | #[allow(missing_docs)] // documentation missing in model
|
545 + | pub fn some_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
546 + | self.some_string = input;
|
547 + | self
|
548 + | }
|
549 + | #[allow(missing_docs)] // documentation missing in model
|
550 + | pub(crate) fn set_some_string(
|
551 + | mut self,
|
552 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
553 + | ) -> Self {
|
554 + | self.some_string = input.map(|v| v.into());
|
555 + | self
|
556 + | }
|
557 + | /// Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
|
558 + | ///
|
559 + | /// The builder fails to construct a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) if a [`ConstraintViolation`] occurs.
|
560 + | ///
|
561 + | pub fn build(self) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
|
562 + | self.build_enforcing_all_constraints()
|
563 + | }
|
564 + | fn build_enforcing_all_constraints(
|
565 + | self,
|
566 + | ) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
|
567 + | Ok(crate::input::EscapedStringValuesInput {
|
568 + | r#enum: self
|
569 + | .r#enum
|
570 + | .map(|v| match v {
|
571 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
572 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
573 + | })
|
574 + | .map(|res| res.map_err(ConstraintViolation::Enum))
|
575 + | .transpose()?,
|
576 + | some_string: self.some_string,
|
577 + | })
|
578 + | }
|
579 + | }
|
580 + | }
|
581 + | /// See [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
|
582 + | pub mod primitive_int_op_input {
|
583 + |
|
584 + | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntOpInput {
|
585 + | fn from(builder: Builder) -> Self {
|
586 + | builder.build()
|
587 + | }
|
588 + | }
|
589 + | /// A builder for [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
|
590 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
591 + | pub struct Builder {
|
592 + | pub(crate) value: ::std::option::Option<i32>,
|
593 + | }
|
594 + | impl Builder {
|
595 + | #[allow(missing_docs)] // documentation missing in model
|
596 + | pub fn value(mut self, input: i32) -> Self {
|
597 + | self.value = Some(input);
|
598 + | self
|
599 + | }
|
600 + | #[allow(missing_docs)] // documentation missing in model
|
601 + | pub(crate) fn set_value(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
602 + | self.value = Some(input.into());
|
603 + | self
|
604 + | }
|
605 + | /// Consumes the builder and constructs a [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
|
606 + | pub fn build(self) -> crate::input::PrimitiveIntOpInput {
|
607 + | self.build_enforcing_all_constraints()
|
608 + | }
|
609 + | fn build_enforcing_all_constraints(self) -> crate::input::PrimitiveIntOpInput {
|
610 + | crate::input::PrimitiveIntOpInput {
|
611 + | value: self.value.unwrap_or(0i32),
|
612 + | }
|
613 + | }
|
614 + | }
|
615 + | }
|
616 + | /// See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
617 + | pub mod map_with_enum_key_op_input {
|
618 + |
|
619 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
620 + | /// Holds one variant for each of the ways the builder can fail.
|
621 + | #[non_exhaustive]
|
622 + | #[allow(clippy::enum_variant_names)]
|
623 + | pub enum ConstraintViolation {
|
624 + | /// Constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`.
|
625 + | #[doc(hidden)]
|
626 + | Map(crate::model::map_with_enum_key::ConstraintViolation),
|
627 + | }
|
628 + | impl ::std::fmt::Display for ConstraintViolation {
|
629 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
630 + | match self {
|
631 + | ConstraintViolation::Map(_) => write!(f, "constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`"),
|
632 + | }
|
633 + | }
|
634 + | }
|
635 + | impl ::std::error::Error for ConstraintViolation {}
|
636 + | impl ConstraintViolation {
|
637 + | pub(crate) fn as_validation_exception_field(
|
638 + | self,
|
639 + | path: ::std::string::String,
|
640 + | ) -> crate::model::ValidationExceptionField {
|
641 + | match self {
|
642 + | ConstraintViolation::Map(inner) => {
|
643 + | inner.as_validation_exception_field(path + "/map")
|
644 + | }
|
645 + | }
|
646 + | }
|
647 + | }
|
648 + | impl ::std::convert::From<ConstraintViolation>
|
649 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
650 + | {
|
651 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
652 + | let first_validation_exception_field =
|
653 + | constraint_violation.as_validation_exception_field("".to_owned());
|
654 + | let validation_exception = crate::error::ValidationException {
|
655 + | message: format!(
|
656 + | "1 validation error detected. {}",
|
657 + | &first_validation_exception_field.message
|
658 + | ),
|
659 + | field_list: Some(vec![first_validation_exception_field]),
|
660 + | };
|
661 + | Self::ConstraintViolation(
|
662 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
663 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
664 + | )
|
665 + | }
|
666 + | }
|
667 + | impl ::std::convert::From<Builder>
|
668 + | for crate::constrained::MaybeConstrained<crate::input::MapWithEnumKeyOpInput>
|
669 + | {
|
670 + | fn from(builder: Builder) -> Self {
|
671 + | Self::Unconstrained(builder)
|
672 + | }
|
673 + | }
|
674 + | impl ::std::convert::TryFrom<Builder> for crate::input::MapWithEnumKeyOpInput {
|
675 + | type Error = ConstraintViolation;
|
676 + |
|
677 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
678 + | builder.build()
|
679 + | }
|
680 + | }
|
681 + | /// A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
682 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
683 + | pub struct Builder {
|
684 + | pub(crate) map: ::std::option::Option<
|
685 + | crate::constrained::MaybeConstrained<
|
686 + | crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained,
|
687 + | >,
|
688 + | >,
|
689 + | }
|
690 + | impl Builder {
|
691 + | #[allow(missing_docs)] // documentation missing in model
|
692 + | pub fn map(
|
693 + | mut self,
|
694 + | input: ::std::option::Option<
|
695 + | ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
|
696 + | >,
|
697 + | ) -> Self {
|
698 + | self.map = input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
699 + | self
|
700 + | }
|
701 + | #[allow(missing_docs)] // documentation missing in model
|
702 + | pub(crate) fn set_map(
|
703 + | mut self,
|
704 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained>>>,
|
705 + | ) -> Self {
|
706 + | self.map = input.map(|v| v.into());
|
707 + | self
|
708 + | }
|
709 + | /// Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
|
710 + | ///
|
711 + | /// The builder fails to construct a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) if a [`ConstraintViolation`] occurs.
|
712 + | ///
|
713 + | pub fn build(self) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
|
714 + | self.build_enforcing_all_constraints()
|
715 + | }
|
716 + | fn build_enforcing_all_constraints(
|
717 + | self,
|
718 + | ) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
|
719 + | Ok(crate::input::MapWithEnumKeyOpInput {
|
720 + | map: self
|
721 + | .map
|
722 + | .map(|v| match v {
|
723 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
724 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
725 + | })
|
726 + | .map(|res| res.map(|v| v.into()).map_err(ConstraintViolation::Map))
|
727 + | .transpose()?,
|
728 + | })
|
729 + | }
|
730 + | }
|
731 + | }
|
732 + | /// See [`StatusResponseInput`](crate::input::StatusResponseInput).
|
733 + | pub mod status_response_input {
|
734 + |
|
735 + | impl ::std::convert::From<Builder> for crate::input::StatusResponseInput {
|
736 + | fn from(builder: Builder) -> Self {
|
737 + | builder.build()
|
738 + | }
|
739 + | }
|
740 + | /// A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
|
741 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
742 + | pub struct Builder {}
|
743 + | impl Builder {
|
744 + | /// Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
|
745 + | pub fn build(self) -> crate::input::StatusResponseInput {
|
746 + | self.build_enforcing_all_constraints()
|
747 + | }
|
748 + | fn build_enforcing_all_constraints(self) -> crate::input::StatusResponseInput {
|
749 + | crate::input::StatusResponseInput {}
|
750 + | }
|
751 + | }
|
752 + | }
|
753 + | /// See [`EnumQueryInput`](crate::input::EnumQueryInput).
|
754 + | pub mod enum_query_input {
|
755 + |
|
756 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
757 + | /// Holds one variant for each of the ways the builder can fail.
|
758 + | #[non_exhaustive]
|
759 + | #[allow(clippy::enum_variant_names)]
|
760 + | pub enum ConstraintViolation {
|
761 + | /// `r#enum` was not provided but it is required when building `EnumQueryInput`.
|
762 + | MissingEnum,
|
763 + | /// Constraint violation occurred building member `r#enum` when building `EnumQueryInput`.
|
764 + | #[doc(hidden)]
|
765 + | Enum(crate::model::string_enum::ConstraintViolation),
|
766 + | }
|
767 + | impl ::std::fmt::Display for ConstraintViolation {
|
768 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
769 + | match self {
|
770 + | ConstraintViolation::MissingEnum => write!(f, "`r#enum` was not provided but it is required when building `EnumQueryInput`"),
|
771 + | ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EnumQueryInput`"),
|
772 + | }
|
773 + | }
|
774 + | }
|
775 + | impl ::std::error::Error for ConstraintViolation {}
|
776 + | impl ConstraintViolation {
|
777 + | pub(crate) fn as_validation_exception_field(
|
778 + | self,
|
779 + | path: ::std::string::String,
|
780 + | ) -> crate::model::ValidationExceptionField {
|
781 + | match self {
|
782 + | ConstraintViolation::MissingEnum => crate::model::ValidationExceptionField {
|
783 + | message: format!(
|
784 + | "Value at '{}/enum' failed to satisfy constraint: Member must not be null",
|
785 + | path
|
786 + | ),
|
787 + | path: path + "/enum",
|
788 + | },
|
789 + | ConstraintViolation::Enum(inner) => {
|
790 + | inner.as_validation_exception_field(path + "/enum")
|
791 + | }
|
792 + | }
|
793 + | }
|
794 + | }
|
795 + | impl ::std::convert::From<ConstraintViolation>
|
796 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
797 + | {
|
798 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
799 + | let first_validation_exception_field =
|
800 + | constraint_violation.as_validation_exception_field("".to_owned());
|
801 + | let validation_exception = crate::error::ValidationException {
|
802 + | message: format!(
|
803 + | "1 validation error detected. {}",
|
804 + | &first_validation_exception_field.message
|
805 + | ),
|
806 + | field_list: Some(vec![first_validation_exception_field]),
|
807 + | };
|
808 + | Self::ConstraintViolation(
|
809 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
810 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
811 + | )
|
812 + | }
|
813 + | }
|
814 + | impl ::std::convert::From<Builder>
|
815 + | for crate::constrained::MaybeConstrained<crate::input::EnumQueryInput>
|
816 + | {
|
817 + | fn from(builder: Builder) -> Self {
|
818 + | Self::Unconstrained(builder)
|
819 + | }
|
820 + | }
|
821 + | impl ::std::convert::TryFrom<Builder> for crate::input::EnumQueryInput {
|
822 + | type Error = ConstraintViolation;
|
823 + |
|
824 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
825 + | builder.build()
|
826 + | }
|
827 + | }
|
828 + | /// A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
|
829 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
830 + | pub struct Builder {
|
831 + | pub(crate) r#enum:
|
832 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::StringEnum>>,
|
833 + | }
|
834 + | impl Builder {
|
835 + | #[allow(missing_docs)] // documentation missing in model
|
836 + | pub fn r#enum(mut self, input: crate::model::StringEnum) -> Self {
|
837 + | self.r#enum = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
838 + | self
|
839 + | }
|
840 + | #[allow(missing_docs)] // documentation missing in model
|
841 + | pub(crate) fn set_enum(
|
842 + | mut self,
|
843 + | input: impl ::std::convert::Into<
|
844 + | crate::constrained::MaybeConstrained<crate::model::StringEnum>,
|
845 + | >,
|
846 + | ) -> Self {
|
847 + | self.r#enum = Some(input.into());
|
848 + | self
|
849 + | }
|
850 + | /// Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
|
851 + | ///
|
852 + | /// The builder fails to construct a [`EnumQueryInput`](crate::input::EnumQueryInput) if a [`ConstraintViolation`] occurs.
|
853 + | ///
|
854 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
855 + | pub fn build(self) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
856 + | self.build_enforcing_all_constraints()
|
857 + | }
|
858 + | fn build_enforcing_all_constraints(
|
859 + | self,
|
860 + | ) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
|
861 + | Ok(crate::input::EnumQueryInput {
|
862 + | r#enum: self
|
863 + | .r#enum
|
864 + | .map(|v| match v {
|
865 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
866 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
867 + | })
|
868 + | .map(|res| res.map_err(ConstraintViolation::Enum))
|
869 + | .transpose()?
|
870 + | .ok_or(ConstraintViolation::MissingEnum)?,
|
871 + | })
|
872 + | }
|
873 + | }
|
874 + | }
|
875 + | /// See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
876 + | pub mod primitive_int_header_input {
|
877 + |
|
878 + | impl ::std::convert::From<Builder> for crate::input::PrimitiveIntHeaderInput {
|
879 + | fn from(builder: Builder) -> Self {
|
880 + | builder.build()
|
881 + | }
|
882 + | }
|
883 + | /// A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
884 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
885 + | pub struct Builder {}
|
886 + | impl Builder {
|
887 + | /// Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
|
888 + | pub fn build(self) -> crate::input::PrimitiveIntHeaderInput {
|
889 + | self.build_enforcing_all_constraints()
|
890 + | }
|
891 + | fn build_enforcing_all_constraints(self) -> crate::input::PrimitiveIntHeaderInput {
|
892 + | crate::input::PrimitiveIntHeaderInput {}
|
893 + | }
|
894 + | }
|
895 + | }
|
896 + | /// See [`StringPayloadInput`](crate::input::StringPayloadInput).
|
897 + | pub mod string_payload_input {
|
898 + |
|
899 + | impl ::std::convert::From<Builder> for crate::input::StringPayloadInput {
|
900 + | fn from(builder: Builder) -> Self {
|
901 + | builder.build()
|
902 + | }
|
903 + | }
|
904 + | /// A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
|
905 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
906 + | pub struct Builder {
|
907 + | pub(crate) payload: ::std::option::Option<::std::string::String>,
|
908 + | }
|
909 + | impl Builder {
|
910 + | #[allow(missing_docs)] // documentation missing in model
|
911 + | pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
912 + | self.payload = input;
|
913 + | self
|
914 + | }
|
915 + | #[allow(missing_docs)] // documentation missing in model
|
916 + | pub(crate) fn set_payload(
|
917 + | mut self,
|
918 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
919 + | ) -> Self {
|
920 + | self.payload = input.map(|v| v.into());
|
921 + | self
|
922 + | }
|
923 + | /// Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
|
924 + | pub fn build(self) -> crate::input::StringPayloadInput {
|
925 + | self.build_enforcing_all_constraints()
|
926 + | }
|
927 + | fn build_enforcing_all_constraints(self) -> crate::input::StringPayloadInput {
|
928 + | crate::input::StringPayloadInput {
|
929 + | payload: self.payload,
|
930 + | }
|
931 + | }
|
932 + | }
|
933 + | }
|