71 71 | "com.amazonaws.ec2.synthetic",
|
72 72 | "DescribeClassicLinkInstancesInput",
|
73 73 | );
|
74 74 | static DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
75 75 | ::aws_smithy_schema::ShapeId::from_static(
|
76 76 | "com.amazonaws.ec2.synthetic#DescribeClassicLinkInstancesInput$DryRun",
|
77 77 | "com.amazonaws.ec2.synthetic",
|
78 78 | "DescribeClassicLinkInstancesInput",
|
79 79 | ),
|
80 80 | ::aws_smithy_schema::ShapeType::Boolean,
|
81 - | "dry_run",
|
81 + | "DryRun",
|
82 82 | 0,
|
83 83 | )
|
84 84 | .with_xml_name("dryRun");
|
85 85 | static DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_INSTANCE_IDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
86 86 | ::aws_smithy_schema::ShapeId::from_static(
|
87 87 | "com.amazonaws.ec2.synthetic#DescribeClassicLinkInstancesInput$InstanceIds",
|
88 88 | "com.amazonaws.ec2.synthetic",
|
89 89 | "DescribeClassicLinkInstancesInput",
|
90 90 | ),
|
91 91 | ::aws_smithy_schema::ShapeType::List,
|
92 - | "instance_ids",
|
92 + | "InstanceIds",
|
93 93 | 1,
|
94 94 | )
|
95 95 | .with_xml_name("InstanceId");
|
96 96 | static DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
97 97 | ::aws_smithy_schema::ShapeId::from_static(
|
98 98 | "com.amazonaws.ec2.synthetic#DescribeClassicLinkInstancesInput$Filters",
|
99 99 | "com.amazonaws.ec2.synthetic",
|
100 100 | "DescribeClassicLinkInstancesInput",
|
101 101 | ),
|
102 102 | ::aws_smithy_schema::ShapeType::List,
|
103 - | "filters",
|
103 + | "Filters",
|
104 104 | 2,
|
105 105 | )
|
106 106 | .with_xml_name("Filter");
|
107 107 | static DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
108 108 | ::aws_smithy_schema::ShapeId::from_static(
|
109 109 | "com.amazonaws.ec2.synthetic#DescribeClassicLinkInstancesInput$NextToken",
|
110 110 | "com.amazonaws.ec2.synthetic",
|
111 111 | "DescribeClassicLinkInstancesInput",
|
112 112 | ),
|
113 113 | ::aws_smithy_schema::ShapeType::String,
|
114 - | "next_token",
|
114 + | "NextToken",
|
115 115 | 3,
|
116 116 | )
|
117 117 | .with_xml_name("nextToken");
|
118 118 | static DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
119 119 | ::aws_smithy_schema::ShapeId::from_static(
|
120 120 | "com.amazonaws.ec2.synthetic#DescribeClassicLinkInstancesInput$MaxResults",
|
121 121 | "com.amazonaws.ec2.synthetic",
|
122 122 | "DescribeClassicLinkInstancesInput",
|
123 123 | ),
|
124 124 | ::aws_smithy_schema::ShapeType::Integer,
|
125 - | "max_results",
|
125 + | "MaxResults",
|
126 126 | 4,
|
127 127 | )
|
128 128 | .with_xml_name("maxResults");
|
129 129 | static DESCRIBECLASSICLINKINSTANCESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
130 130 | DESCRIBECLASSICLINKINSTANCESINPUT_SCHEMA_ID,
|
131 131 | ::aws_smithy_schema::ShapeType::Structure,
|
132 132 | &[
|
133 133 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_DRY_RUN,
|
134 134 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_INSTANCE_IDS,
|
135 135 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_FILTERS,
|
136 136 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_NEXT_TOKEN,
|
137 137 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_MAX_RESULTS,
|
138 138 | ],
|
139 139 | );
|
140 140 | impl DescribeClassicLinkInstancesInput {
|
141 141 | /// The schema for this shape.
|
142 142 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBECLASSICLINKINSTANCESINPUT_SCHEMA;
|
143 143 | }
|
144 144 | impl ::aws_smithy_schema::serde::SerializableStruct for DescribeClassicLinkInstancesInput {
|
145 145 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
146 146 | fn serialize_members(
|
147 147 | &self,
|
148 148 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
149 149 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
150 150 | if let Some(ref val) = self.dry_run {
|
151 151 | ser.write_boolean(&DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_DRY_RUN, *val)?;
|
152 152 | }
|
153 153 | if let Some(ref val) = self.instance_ids {
|
154 154 | ser.write_list(
|
155 155 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_INSTANCE_IDS,
|
156 156 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
157 157 | for item in val {
|
158 158 | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
159 159 | }
|
160 160 | Ok(())
|
161 161 | },
|
162 162 | )?;
|
163 163 | }
|
164 164 | if let Some(ref val) = self.filters {
|
165 165 | ser.write_list(
|
166 166 | &DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_FILTERS,
|
167 167 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
168 168 | for item in val {
|
169 169 | ser.write_struct(crate::types::Filter::SCHEMA, item)?;
|
170 170 | }
|
171 171 | Ok(())
|
172 172 | },
|
173 173 | )?;
|
174 174 | }
|
175 175 | if let Some(ref val) = self.next_token {
|
176 176 | ser.write_string(&DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_NEXT_TOKEN, val)?;
|
177 177 | }
|
178 178 | if let Some(ref val) = self.max_results {
|
179 179 | ser.write_integer(&DESCRIBECLASSICLINKINSTANCESINPUT_MEMBER_MAX_RESULTS, *val)?;
|
180 180 | }
|
181 181 | Ok(())
|
182 182 | }
|
183 183 | }
|
184 184 | impl DescribeClassicLinkInstancesInput {
|
185 185 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
186 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
187 - | deserializer: &mut D,
|
186 + | pub fn deserialize(
|
187 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
188 188 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
189 189 | #[allow(unused_variables, unused_mut)]
|
190 190 | let mut builder = Self::builder();
|
191 191 | #[allow(
|
192 192 | unused_variables,
|
193 193 | unreachable_code,
|
194 194 | clippy::single_match,
|
195 195 | clippy::match_single_binding,
|
196 196 | clippy::diverging_sub_expression
|
197 197 | )]
|
198 - | deserializer.read_struct(&DESCRIBECLASSICLINKINSTANCESINPUT_SCHEMA, (), |_, member, deser| {
|
198 + | deserializer.read_struct(&DESCRIBECLASSICLINKINSTANCESINPUT_SCHEMA, &mut |member, deser| {
|
199 199 | match member.member_index() {
|
200 200 | Some(0) => {
|
201 201 | builder.dry_run = Some(deser.read_boolean(member)?);
|
202 202 | }
|
203 203 | Some(1) => {
|
204 - | builder.instance_ids = Some({
|
205 - | let container = if let Some(cap) = deser.container_size() {
|
206 - | Vec::with_capacity(cap)
|
207 - | } else {
|
208 - | Vec::new()
|
209 - | };
|
210 - | deser.read_list(member, container, |mut list, deser| {
|
211 - | list.push(deser.read_string(member)?);
|
212 - | Ok(list)
|
213 - | })?
|
214 - | });
|
204 + | builder.instance_ids = Some(deser.read_string_list(member)?);
|
215 205 | }
|
216 206 | Some(2) => {
|
217 207 | builder.filters = Some({
|
218 - | let container = if let Some(cap) = deser.container_size() {
|
219 - | Vec::with_capacity(cap)
|
220 - | } else {
|
221 - | Vec::new()
|
222 - | };
|
223 - | deser.read_list(member, container, |mut list, deser| {
|
224 - | list.push(crate::types::Filter::deserialize(deser)?);
|
225 - | Ok(list)
|
226 - | })?
|
208 + | let mut container = Vec::new();
|
209 + | deser.read_list(member, &mut |deser| {
|
210 + | container.push(crate::types::Filter::deserialize(deser)?);
|
211 + | Ok(())
|
212 + | })?;
|
213 + | container
|
227 214 | });
|
228 215 | }
|
229 216 | Some(3) => {
|
230 217 | builder.next_token = Some(deser.read_string(member)?);
|
231 218 | }
|
232 219 | Some(4) => {
|
233 220 | builder.max_results = Some(deser.read_integer(member)?);
|
234 221 | }
|
235 222 | _ => {}
|
236 223 | }
|
237 224 | Ok(())
|
238 225 | })?;
|
239 226 | builder
|
240 227 | .build()
|
241 228 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
242 229 | }
|
243 230 | }
|
231 + | impl DescribeClassicLinkInstancesInput {
|
232 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
233 + | pub fn deserialize_with_response(
|
234 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
235 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
236 + | _status: u16,
|
237 + | _body: &[u8],
|
238 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
239 + | Self::deserialize(deserializer)
|
240 + | }
|
241 + | }
|
244 242 | impl DescribeClassicLinkInstancesInput {
|
245 243 | /// Creates a new builder-style object to manufacture [`DescribeClassicLinkInstancesInput`](crate::operation::describe_classic_link_instances::DescribeClassicLinkInstancesInput).
|
246 244 | pub fn builder() -> crate::operation::describe_classic_link_instances::builders::DescribeClassicLinkInstancesInputBuilder {
|
247 245 | crate::operation::describe_classic_link_instances::builders::DescribeClassicLinkInstancesInputBuilder::default()
|
248 246 | }
|
249 247 | }
|
250 248 |
|
251 249 | /// A builder for [`DescribeClassicLinkInstancesInput`](crate::operation::describe_classic_link_instances::DescribeClassicLinkInstancesInput).
|
252 250 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
253 251 | #[non_exhaustive]
|