5 5 | pub struct HttpPayloadWithXmlNamespaceAndPrefixInput {
|
6 6 | #[allow(missing_docs)] // documentation missing in model
|
7 7 | pub nested: ::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix>,
|
8 8 | }
|
9 9 | impl HttpPayloadWithXmlNamespaceAndPrefixInput {
|
10 10 | #[allow(missing_docs)] // documentation missing in model
|
11 11 | pub fn nested(&self) -> ::std::option::Option<&crate::types::PayloadWithXmlNamespaceAndPrefix> {
|
12 12 | self.nested.as_ref()
|
13 13 | }
|
14 14 | }
|
15 15 | static HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
16 16 | "aws.protocoltests.restxml.synthetic#HttpPayloadWithXmlNamespaceAndPrefixInput",
|
17 17 | "aws.protocoltests.restxml.synthetic",
|
18 18 | "HttpPayloadWithXmlNamespaceAndPrefixInput",
|
19 19 | );
|
20 20 | static HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_MEMBER_NESTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
21 21 | ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "aws.protocoltests.restxml.synthetic#HttpPayloadWithXmlNamespaceAndPrefixInput$nested",
|
23 23 | "aws.protocoltests.restxml.synthetic",
|
24 24 | "HttpPayloadWithXmlNamespaceAndPrefixInput",
|
25 25 | ),
|
26 26 | ::aws_smithy_schema::ShapeType::Structure,
|
27 27 | "nested",
|
28 28 | 0,
|
29 29 | )
|
30 30 | .with_http_payload();
|
31 31 | static HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
32 32 | HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_SCHEMA_ID,
|
33 33 | ::aws_smithy_schema::ShapeType::Structure,
|
34 34 | &[&HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_MEMBER_NESTED],
|
35 - | );
|
35 + | )
|
36 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
37 + | "PUT",
|
38 + | "/HttpPayloadWithXmlNamespaceAndPrefix",
|
39 + | None,
|
40 + | ));
|
36 41 | impl HttpPayloadWithXmlNamespaceAndPrefixInput {
|
37 42 | /// The schema for this shape.
|
38 43 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_SCHEMA;
|
39 44 | }
|
40 45 | impl ::aws_smithy_schema::serde::SerializableStruct for HttpPayloadWithXmlNamespaceAndPrefixInput {
|
41 46 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
42 47 | fn serialize_members(
|
43 48 | &self,
|
44 49 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
45 50 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
46 51 | if let Some(ref val) = self.nested {
|
47 52 | ser.write_struct(&HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_MEMBER_NESTED, val)?;
|
48 53 | }
|
49 54 | Ok(())
|
50 55 | }
|
51 56 | }
|
52 57 | impl HttpPayloadWithXmlNamespaceAndPrefixInput {
|
53 58 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
54 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
55 - | deserializer: &mut D,
|
59 + | pub fn deserialize(
|
60 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
56 61 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
57 62 | #[allow(unused_variables, unused_mut)]
|
58 63 | let mut builder = Self::builder();
|
59 64 | #[allow(
|
60 65 | unused_variables,
|
61 66 | unreachable_code,
|
62 67 | clippy::single_match,
|
63 68 | clippy::match_single_binding,
|
64 69 | clippy::diverging_sub_expression
|
65 70 | )]
|
66 - | deserializer.read_struct(&HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_SCHEMA, (), |_, member, deser| {
|
71 + | deserializer.read_struct(&HTTPPAYLOADWITHXMLNAMESPACEANDPREFIXINPUT_SCHEMA, &mut |member, deser| {
|
67 72 | match member.member_index() {
|
68 73 | Some(0) => {
|
69 74 | builder.nested = Some(crate::types::PayloadWithXmlNamespaceAndPrefix::deserialize(deser)?);
|
70 75 | }
|
71 76 | _ => {}
|
72 77 | }
|
73 78 | Ok(())
|
74 79 | })?;
|
75 80 | builder
|
76 81 | .build()
|
77 82 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
78 83 | }
|
79 84 | }
|
85 + | impl HttpPayloadWithXmlNamespaceAndPrefixInput {
|
86 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
87 + | /// Header-bound members are read directly from headers, avoiding runtime
|
88 + | /// member iteration overhead. Body members are read via the deserializer.
|
89 + | pub fn deserialize_with_response(
|
90 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
91 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
92 + | _status: u16,
|
93 + | body: &[u8],
|
94 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
95 + | #[allow(unused_variables, unused_mut)]
|
96 + | let mut builder = Self::builder();
|
97 + | if !body.is_empty() {
|
98 + | builder.nested = Some(crate::types::PayloadWithXmlNamespaceAndPrefix::deserialize(deserializer)?);
|
99 + | }
|
100 + | builder
|
101 + | .build()
|
102 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
103 + | }
|
104 + | }
|
80 105 | impl HttpPayloadWithXmlNamespaceAndPrefixInput {
|
81 106 | /// Creates a new builder-style object to manufacture [`HttpPayloadWithXmlNamespaceAndPrefixInput`](crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput).
|
82 107 | pub fn builder() -> crate::operation::http_payload_with_xml_namespace_and_prefix::builders::HttpPayloadWithXmlNamespaceAndPrefixInputBuilder {
|
83 108 | crate::operation::http_payload_with_xml_namespace_and_prefix::builders::HttpPayloadWithXmlNamespaceAndPrefixInputBuilder::default()
|
84 109 | }
|
85 110 | }
|
86 111 |
|
87 112 | /// A builder for [`HttpPayloadWithXmlNamespaceAndPrefixInput`](crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput).
|
88 113 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
89 114 | #[non_exhaustive]
|
90 115 | pub struct HttpPayloadWithXmlNamespaceAndPrefixInputBuilder {
|
91 116 | pub(crate) nested: ::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix>,
|
92 117 | }
|
93 118 | impl HttpPayloadWithXmlNamespaceAndPrefixInputBuilder {
|
94 119 | #[allow(missing_docs)] // documentation missing in model
|
95 120 | pub fn nested(mut self, input: crate::types::PayloadWithXmlNamespaceAndPrefix) -> Self {
|
96 121 | self.nested = ::std::option::Option::Some(input);
|
97 122 | self
|
98 123 | }
|
99 124 | #[allow(missing_docs)] // documentation missing in model
|
100 125 | pub fn set_nested(mut self, input: ::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix>) -> Self {
|
101 126 | self.nested = input;
|
102 127 | self
|
103 128 | }
|
104 129 | #[allow(missing_docs)] // documentation missing in model
|
105 130 | pub fn get_nested(&self) -> &::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix> {
|
106 131 | &self.nested
|
107 132 | }
|
108 133 | /// Consumes the builder and constructs a [`HttpPayloadWithXmlNamespaceAndPrefixInput`](crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput).
|
109 134 | pub fn build(
|