1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | #[allow(missing_docs)] // documentation missing in model
|
3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct NestedStructuresInput {
|
6 6 | #[allow(missing_docs)] // documentation missing in model
|
7 7 | pub nested: ::std::option::Option<crate::types::StructArg>,
|
8 8 | }
|
9 9 | impl NestedStructuresInput {
|
10 10 | #[allow(missing_docs)] // documentation missing in model
|
11 11 | pub fn nested(&self) -> ::std::option::Option<&crate::types::StructArg> {
|
12 12 | self.nested.as_ref()
|
13 13 | }
|
14 14 | }
|
15 15 | static NESTEDSTRUCTURESINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
16 16 | "aws.protocoltests.ec2.synthetic#NestedStructuresInput",
|
17 17 | "aws.protocoltests.ec2.synthetic",
|
18 18 | "NestedStructuresInput",
|
19 19 | );
|
20 20 | static NESTEDSTRUCTURESINPUT_MEMBER_NESTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
21 21 | ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "aws.protocoltests.ec2.synthetic#NestedStructuresInput$Nested",
|
23 23 | "aws.protocoltests.ec2.synthetic",
|
24 24 | "NestedStructuresInput",
|
25 25 | ),
|
26 26 | ::aws_smithy_schema::ShapeType::Structure,
|
27 - | "nested",
|
27 + | "Nested",
|
28 28 | 0,
|
29 29 | );
|
30 30 | static NESTEDSTRUCTURESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
31 31 | NESTEDSTRUCTURESINPUT_SCHEMA_ID,
|
32 32 | ::aws_smithy_schema::ShapeType::Structure,
|
33 33 | &[&NESTEDSTRUCTURESINPUT_MEMBER_NESTED],
|
34 34 | );
|
35 35 | impl NestedStructuresInput {
|
36 36 | /// The schema for this shape.
|
37 37 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &NESTEDSTRUCTURESINPUT_SCHEMA;
|
38 38 | }
|
39 39 | impl ::aws_smithy_schema::serde::SerializableStruct for NestedStructuresInput {
|
40 40 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
41 41 | fn serialize_members(
|
42 42 | &self,
|
43 43 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
44 44 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
45 45 | if let Some(ref val) = self.nested {
|
46 46 | ser.write_struct(&NESTEDSTRUCTURESINPUT_MEMBER_NESTED, val)?;
|
47 47 | }
|
48 48 | Ok(())
|
49 49 | }
|
50 50 | }
|
51 51 | impl NestedStructuresInput {
|
52 52 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
53 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
54 - | deserializer: &mut D,
|
53 + | pub fn deserialize(
|
54 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
55 55 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
56 56 | #[allow(unused_variables, unused_mut)]
|
57 57 | let mut builder = Self::builder();
|
58 58 | #[allow(
|
59 59 | unused_variables,
|
60 60 | unreachable_code,
|
61 61 | clippy::single_match,
|
62 62 | clippy::match_single_binding,
|
63 63 | clippy::diverging_sub_expression
|
64 64 | )]
|
65 - | deserializer.read_struct(&NESTEDSTRUCTURESINPUT_SCHEMA, (), |_, member, deser| {
|
65 + | deserializer.read_struct(&NESTEDSTRUCTURESINPUT_SCHEMA, &mut |member, deser| {
|
66 66 | match member.member_index() {
|
67 67 | Some(0) => {
|
68 68 | builder.nested = Some(crate::types::StructArg::deserialize(deser)?);
|
69 69 | }
|
70 70 | _ => {}
|
71 71 | }
|
72 72 | Ok(())
|
73 73 | })?;
|
74 74 | builder
|
75 75 | .build()
|
76 76 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
77 77 | }
|
78 78 | }
|
79 + | impl NestedStructuresInput {
|
80 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
81 + | pub fn deserialize_with_response(
|
82 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
83 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
84 + | _status: u16,
|
85 + | _body: &[u8],
|
86 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
87 + | Self::deserialize(deserializer)
|
88 + | }
|
89 + | }
|
79 90 | impl NestedStructuresInput {
|
80 91 | /// Creates a new builder-style object to manufacture [`NestedStructuresInput`](crate::operation::nested_structures::NestedStructuresInput).
|
81 92 | pub fn builder() -> crate::operation::nested_structures::builders::NestedStructuresInputBuilder {
|
82 93 | crate::operation::nested_structures::builders::NestedStructuresInputBuilder::default()
|
83 94 | }
|
84 95 | }
|
85 96 |
|
86 97 | /// A builder for [`NestedStructuresInput`](crate::operation::nested_structures::NestedStructuresInput).
|
87 98 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
88 99 | #[non_exhaustive]
|
89 100 | pub struct NestedStructuresInputBuilder {
|
90 101 | pub(crate) nested: ::std::option::Option<crate::types::StructArg>,
|
91 102 | }
|
92 103 | impl NestedStructuresInputBuilder {
|
93 104 | #[allow(missing_docs)] // documentation missing in model
|
94 105 | pub fn nested(mut self, input: crate::types::StructArg) -> Self {
|
95 106 | self.nested = ::std::option::Option::Some(input);
|
96 107 | self
|
97 108 | }
|
98 109 | #[allow(missing_docs)] // documentation missing in model
|
99 110 | pub fn set_nested(mut self, input: ::std::option::Option<crate::types::StructArg>) -> Self {
|
100 111 | self.nested = input;
|
101 112 | self
|
102 113 | }
|
103 114 | #[allow(missing_docs)] // documentation missing in model
|
104 115 | pub fn get_nested(&self) -> &::std::option::Option<crate::types::StructArg> {
|
105 116 | &self.nested
|
106 117 | }
|
107 118 | /// Consumes the builder and constructs a [`NestedStructuresInput`](crate::operation::nested_structures::NestedStructuresInput).
|
108 119 | pub fn build(
|