132 132 | "com.amazonaws.ecs",
|
133 133 | "DeploymentConfiguration",
|
134 134 | );
|
135 135 | static DEPLOYMENTCONFIGURATION_MEMBER_DEPLOYMENT_CIRCUIT_BREAKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
136 136 | ::aws_smithy_schema::ShapeId::from_static(
|
137 137 | "com.amazonaws.ecs#DeploymentConfiguration$deploymentCircuitBreaker",
|
138 138 | "com.amazonaws.ecs",
|
139 139 | "DeploymentConfiguration",
|
140 140 | ),
|
141 141 | ::aws_smithy_schema::ShapeType::Structure,
|
142 - | "deployment_circuit_breaker",
|
142 + | "deploymentCircuitBreaker",
|
143 143 | 0,
|
144 144 | );
|
145 145 | static DEPLOYMENTCONFIGURATION_MEMBER_MAXIMUM_PERCENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
146 146 | ::aws_smithy_schema::ShapeId::from_static(
|
147 147 | "com.amazonaws.ecs#DeploymentConfiguration$maximumPercent",
|
148 148 | "com.amazonaws.ecs",
|
149 149 | "DeploymentConfiguration",
|
150 150 | ),
|
151 151 | ::aws_smithy_schema::ShapeType::Integer,
|
152 - | "maximum_percent",
|
152 + | "maximumPercent",
|
153 153 | 1,
|
154 154 | );
|
155 155 | static DEPLOYMENTCONFIGURATION_MEMBER_MINIMUM_HEALTHY_PERCENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
156 156 | ::aws_smithy_schema::ShapeId::from_static(
|
157 157 | "com.amazonaws.ecs#DeploymentConfiguration$minimumHealthyPercent",
|
158 158 | "com.amazonaws.ecs",
|
159 159 | "DeploymentConfiguration",
|
160 160 | ),
|
161 161 | ::aws_smithy_schema::ShapeType::Integer,
|
162 - | "minimum_healthy_percent",
|
162 + | "minimumHealthyPercent",
|
163 163 | 2,
|
164 164 | );
|
165 165 | static DEPLOYMENTCONFIGURATION_MEMBER_ALARMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
166 166 | ::aws_smithy_schema::ShapeId::from_static(
|
167 167 | "com.amazonaws.ecs#DeploymentConfiguration$alarms",
|
168 168 | "com.amazonaws.ecs",
|
169 169 | "DeploymentConfiguration",
|
170 170 | ),
|
171 171 | ::aws_smithy_schema::ShapeType::Structure,
|
172 172 | "alarms",
|
173 173 | 3,
|
174 174 | );
|
175 175 | static DEPLOYMENTCONFIGURATION_MEMBER_STRATEGY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
176 176 | ::aws_smithy_schema::ShapeId::from_static(
|
177 177 | "com.amazonaws.ecs#DeploymentConfiguration$strategy",
|
178 178 | "com.amazonaws.ecs",
|
179 179 | "DeploymentConfiguration",
|
180 180 | ),
|
181 181 | ::aws_smithy_schema::ShapeType::String,
|
182 182 | "strategy",
|
183 183 | 4,
|
184 184 | );
|
185 185 | static DEPLOYMENTCONFIGURATION_MEMBER_BAKE_TIME_IN_MINUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
186 186 | ::aws_smithy_schema::ShapeId::from_static(
|
187 187 | "com.amazonaws.ecs#DeploymentConfiguration$bakeTimeInMinutes",
|
188 188 | "com.amazonaws.ecs",
|
189 189 | "DeploymentConfiguration",
|
190 190 | ),
|
191 191 | ::aws_smithy_schema::ShapeType::Integer,
|
192 - | "bake_time_in_minutes",
|
192 + | "bakeTimeInMinutes",
|
193 193 | 5,
|
194 194 | );
|
195 195 | static DEPLOYMENTCONFIGURATION_MEMBER_LIFECYCLE_HOOKS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
196 196 | ::aws_smithy_schema::ShapeId::from_static(
|
197 197 | "com.amazonaws.ecs#DeploymentConfiguration$lifecycleHooks",
|
198 198 | "com.amazonaws.ecs",
|
199 199 | "DeploymentConfiguration",
|
200 200 | ),
|
201 201 | ::aws_smithy_schema::ShapeType::List,
|
202 - | "lifecycle_hooks",
|
202 + | "lifecycleHooks",
|
203 203 | 6,
|
204 204 | );
|
205 205 | static DEPLOYMENTCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
206 206 | DEPLOYMENTCONFIGURATION_SCHEMA_ID,
|
207 207 | ::aws_smithy_schema::ShapeType::Structure,
|
208 208 | &[
|
209 209 | &DEPLOYMENTCONFIGURATION_MEMBER_DEPLOYMENT_CIRCUIT_BREAKER,
|
210 210 | &DEPLOYMENTCONFIGURATION_MEMBER_MAXIMUM_PERCENT,
|
211 211 | &DEPLOYMENTCONFIGURATION_MEMBER_MINIMUM_HEALTHY_PERCENT,
|
212 212 | &DEPLOYMENTCONFIGURATION_MEMBER_ALARMS,
|
213 213 | &DEPLOYMENTCONFIGURATION_MEMBER_STRATEGY,
|
214 214 | &DEPLOYMENTCONFIGURATION_MEMBER_BAKE_TIME_IN_MINUTES,
|
215 215 | &DEPLOYMENTCONFIGURATION_MEMBER_LIFECYCLE_HOOKS,
|
216 216 | ],
|
217 217 | );
|
218 218 | impl DeploymentConfiguration {
|
219 219 | /// The schema for this shape.
|
220 220 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DEPLOYMENTCONFIGURATION_SCHEMA;
|
221 221 | }
|
222 222 | impl ::aws_smithy_schema::serde::SerializableStruct for DeploymentConfiguration {
|
223 223 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
224 224 | fn serialize_members(
|
225 225 | &self,
|
226 226 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
227 227 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
228 228 | if let Some(ref val) = self.deployment_circuit_breaker {
|
229 229 | ser.write_struct(&DEPLOYMENTCONFIGURATION_MEMBER_DEPLOYMENT_CIRCUIT_BREAKER, val)?;
|
230 230 | }
|
231 231 | if let Some(ref val) = self.maximum_percent {
|
232 232 | ser.write_integer(&DEPLOYMENTCONFIGURATION_MEMBER_MAXIMUM_PERCENT, *val)?;
|
233 233 | }
|
234 234 | if let Some(ref val) = self.minimum_healthy_percent {
|
235 235 | ser.write_integer(&DEPLOYMENTCONFIGURATION_MEMBER_MINIMUM_HEALTHY_PERCENT, *val)?;
|
236 236 | }
|
237 237 | if let Some(ref val) = self.alarms {
|
238 238 | ser.write_struct(&DEPLOYMENTCONFIGURATION_MEMBER_ALARMS, val)?;
|
239 239 | }
|
240 240 | if let Some(ref val) = self.strategy {
|
241 241 | ser.write_string(&DEPLOYMENTCONFIGURATION_MEMBER_STRATEGY, val.as_str())?;
|
242 242 | }
|
243 243 | if let Some(ref val) = self.bake_time_in_minutes {
|
244 244 | ser.write_integer(&DEPLOYMENTCONFIGURATION_MEMBER_BAKE_TIME_IN_MINUTES, *val)?;
|
245 245 | }
|
246 246 | if let Some(ref val) = self.lifecycle_hooks {
|
247 247 | ser.write_list(
|
248 248 | &DEPLOYMENTCONFIGURATION_MEMBER_LIFECYCLE_HOOKS,
|
249 249 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
250 250 | for item in val {
|
251 251 | ser.write_struct(crate::types::DeploymentLifecycleHook::SCHEMA, item)?;
|
252 252 | }
|
253 253 | Ok(())
|
254 254 | },
|
255 255 | )?;
|
256 256 | }
|
257 257 | Ok(())
|
258 258 | }
|
259 259 | }
|
260 260 | impl DeploymentConfiguration {
|
261 261 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
262 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
263 - | deserializer: &mut D,
|
262 + | pub fn deserialize(
|
263 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
264 264 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
265 265 | #[allow(unused_variables, unused_mut)]
|
266 266 | let mut builder = Self::builder();
|
267 267 | #[allow(
|
268 268 | unused_variables,
|
269 269 | unreachable_code,
|
270 270 | clippy::single_match,
|
271 271 | clippy::match_single_binding,
|
272 272 | clippy::diverging_sub_expression
|
273 273 | )]
|
274 - | deserializer.read_struct(&DEPLOYMENTCONFIGURATION_SCHEMA, (), |_, member, deser| {
|
274 + | deserializer.read_struct(&DEPLOYMENTCONFIGURATION_SCHEMA, &mut |member, deser| {
|
275 275 | match member.member_index() {
|
276 276 | Some(0) => {
|
277 277 | builder.deployment_circuit_breaker = Some(crate::types::DeploymentCircuitBreaker::deserialize(deser)?);
|
278 278 | }
|
279 279 | Some(1) => {
|
280 280 | builder.maximum_percent = Some(deser.read_integer(member)?);
|
281 281 | }
|
282 282 | Some(2) => {
|
283 283 | builder.minimum_healthy_percent = Some(deser.read_integer(member)?);
|
284 284 | }
|
285 285 | Some(3) => {
|
286 286 | builder.alarms = Some(crate::types::DeploymentAlarms::deserialize(deser)?);
|
287 287 | }
|
288 288 | Some(4) => {
|
289 289 | builder.strategy = Some(crate::types::DeploymentStrategy::from(deser.read_string(member)?.as_str()));
|
290 290 | }
|
291 291 | Some(5) => {
|
292 292 | builder.bake_time_in_minutes = Some(deser.read_integer(member)?);
|
293 293 | }
|
294 294 | Some(6) => {
|
295 295 | builder.lifecycle_hooks = Some({
|
296 - | let container = if let Some(cap) = deser.container_size() {
|
297 - | Vec::with_capacity(cap)
|
298 - | } else {
|
299 - | Vec::new()
|
300 - | };
|
301 - | deser.read_list(member, container, |mut list, deser| {
|
302 - | list.push(crate::types::DeploymentLifecycleHook::deserialize(deser)?);
|
303 - | Ok(list)
|
304 - | })?
|
296 + | let mut container = Vec::new();
|
297 + | deser.read_list(member, &mut |deser| {
|
298 + | container.push(crate::types::DeploymentLifecycleHook::deserialize(deser)?);
|
299 + | Ok(())
|
300 + | })?;
|
301 + | container
|
305 302 | });
|
306 303 | }
|
307 304 | _ => {}
|
308 305 | }
|
309 306 | Ok(())
|
310 307 | })?;
|
311 308 | Ok(builder.build())
|
312 309 | }
|
313 310 | }
|
311 + | impl DeploymentConfiguration {
|
312 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
313 + | pub fn deserialize_with_response(
|
314 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
315 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
316 + | _status: u16,
|
317 + | _body: &[u8],
|
318 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
319 + | Self::deserialize(deserializer)
|
320 + | }
|
321 + | }
|
314 322 | impl DeploymentConfiguration {
|
315 323 | /// Creates a new builder-style object to manufacture [`DeploymentConfiguration`](crate::types::DeploymentConfiguration).
|
316 324 | pub fn builder() -> crate::types::builders::DeploymentConfigurationBuilder {
|
317 325 | crate::types::builders::DeploymentConfigurationBuilder::default()
|
318 326 | }
|
319 327 | }
|
320 328 |
|
321 329 | /// A builder for [`DeploymentConfiguration`](crate::types::DeploymentConfiguration).
|
322 330 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
323 331 | #[non_exhaustive]
|