13 13 | pub fn value(&self) -> ::std::option::Option<i32> {
|
14 14 | self.value
|
15 15 | }
|
16 16 | #[allow(missing_docs)] // documentation missing in model
|
17 17 | pub fn defaulted_value(&self) -> ::std::option::Option<i32> {
|
18 18 | self.defaulted_value
|
19 19 | }
|
20 20 | }
|
21 21 | static PRIMITIVEINTOPXMLINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "aws.protocoltests.restxml.synthetic#PrimitiveIntOpXmlInput",
|
23 23 | "aws.protocoltests.restxml.synthetic",
|
24 24 | "PrimitiveIntOpXmlInput",
|
25 25 | );
|
26 26 | static PRIMITIVEINTOPXMLINPUT_MEMBER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "aws.protocoltests.restxml.synthetic#PrimitiveIntOpXmlInput$value",
|
29 29 | "aws.protocoltests.restxml.synthetic",
|
30 30 | "PrimitiveIntOpXmlInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::Integer,
|
33 33 | "value",
|
34 34 | 0,
|
35 35 | );
|
36 36 | static PRIMITIVEINTOPXMLINPUT_MEMBER_DEFAULTED_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
37 37 | ::aws_smithy_schema::ShapeId::from_static(
|
38 38 | "aws.protocoltests.restxml.synthetic#PrimitiveIntOpXmlInput$defaultedValue",
|
39 39 | "aws.protocoltests.restxml.synthetic",
|
40 40 | "PrimitiveIntOpXmlInput",
|
41 41 | ),
|
42 42 | ::aws_smithy_schema::ShapeType::Integer,
|
43 - | "defaulted_value",
|
43 + | "defaultedValue",
|
44 44 | 1,
|
45 45 | );
|
46 46 | static PRIMITIVEINTOPXMLINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
47 47 | PRIMITIVEINTOPXMLINPUT_SCHEMA_ID,
|
48 48 | ::aws_smithy_schema::ShapeType::Structure,
|
49 49 | &[&PRIMITIVEINTOPXMLINPUT_MEMBER_VALUE, &PRIMITIVEINTOPXMLINPUT_MEMBER_DEFAULTED_VALUE],
|
50 - | );
|
50 + | )
|
51 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/primitive-document", None));
|
51 52 | impl PrimitiveIntOpXmlInput {
|
52 53 | /// The schema for this shape.
|
53 54 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PRIMITIVEINTOPXMLINPUT_SCHEMA;
|
54 55 | }
|
55 56 | impl ::aws_smithy_schema::serde::SerializableStruct for PrimitiveIntOpXmlInput {
|
56 57 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
57 58 | fn serialize_members(
|
58 59 | &self,
|
59 60 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
60 61 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
61 62 | if let Some(ref val) = self.value {
|
62 63 | ser.write_integer(&PRIMITIVEINTOPXMLINPUT_MEMBER_VALUE, *val)?;
|
63 64 | }
|
64 65 | if let Some(ref val) = self.defaulted_value {
|
65 66 | ser.write_integer(&PRIMITIVEINTOPXMLINPUT_MEMBER_DEFAULTED_VALUE, *val)?;
|
66 67 | }
|
67 68 | Ok(())
|
68 69 | }
|
69 70 | }
|
70 71 | impl PrimitiveIntOpXmlInput {
|
71 72 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
72 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
73 - | deserializer: &mut D,
|
73 + | pub fn deserialize(
|
74 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
74 75 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
75 76 | #[allow(unused_variables, unused_mut)]
|
76 77 | let mut builder = Self::builder();
|
77 78 | #[allow(
|
78 79 | unused_variables,
|
79 80 | unreachable_code,
|
80 81 | clippy::single_match,
|
81 82 | clippy::match_single_binding,
|
82 83 | clippy::diverging_sub_expression
|
83 84 | )]
|
84 - | deserializer.read_struct(&PRIMITIVEINTOPXMLINPUT_SCHEMA, (), |_, member, deser| {
|
85 + | deserializer.read_struct(&PRIMITIVEINTOPXMLINPUT_SCHEMA, &mut |member, deser| {
|
85 86 | match member.member_index() {
|
86 87 | Some(0) => {
|
87 88 | builder.value = Some(deser.read_integer(member)?);
|
88 89 | }
|
89 90 | Some(1) => {
|
90 91 | builder.defaulted_value = Some(deser.read_integer(member)?);
|
91 92 | }
|
92 93 | _ => {}
|
93 94 | }
|
94 95 | Ok(())
|
95 96 | })?;
|
96 97 | builder
|
97 98 | .build()
|
98 99 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
99 100 | }
|
100 101 | }
|
102 + | impl PrimitiveIntOpXmlInput {
|
103 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
104 + | pub fn deserialize_with_response(
|
105 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
106 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
107 + | _status: u16,
|
108 + | _body: &[u8],
|
109 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
110 + | Self::deserialize(deserializer)
|
111 + | }
|
112 + | }
|
101 113 | impl PrimitiveIntOpXmlInput {
|
102 114 | /// Creates a new builder-style object to manufacture [`PrimitiveIntOpXmlInput`](crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlInput).
|
103 115 | pub fn builder() -> crate::operation::primitive_int_op_xml::builders::PrimitiveIntOpXmlInputBuilder {
|
104 116 | crate::operation::primitive_int_op_xml::builders::PrimitiveIntOpXmlInputBuilder::default()
|
105 117 | }
|
106 118 | }
|
107 119 |
|
108 120 | /// A builder for [`PrimitiveIntOpXmlInput`](crate::operation::primitive_int_op_xml::PrimitiveIntOpXmlInput).
|
109 121 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
110 122 | #[non_exhaustive]
|
111 123 | pub struct PrimitiveIntOpXmlInputBuilder {
|
112 124 | pub(crate) value: ::std::option::Option<i32>,
|
113 125 | pub(crate) defaulted_value: ::std::option::Option<i32>,
|
114 126 | }
|
115 127 | impl PrimitiveIntOpXmlInputBuilder {
|
116 128 | #[allow(missing_docs)] // documentation missing in model
|
117 129 | pub fn value(mut self, input: i32) -> Self {
|
118 130 | self.value = ::std::option::Option::Some(input);
|
119 131 | self
|
120 132 | }
|
121 133 | #[allow(missing_docs)] // documentation missing in model
|
122 134 | pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
|
123 135 | self.value = input;
|
124 136 | self
|
125 137 | }
|
126 138 | #[allow(missing_docs)] // documentation missing in model
|
127 139 | pub fn get_value(&self) -> &::std::option::Option<i32> {
|
128 140 | &self.value
|
129 141 | }
|
130 142 | #[allow(missing_docs)] // documentation missing in model
|