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