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