129 129 | /// <p>The name of the VPC endpoint service.</p>
|
130 130 | pub fn service_name(&self) -> ::std::option::Option<&str> {
|
131 131 | self.service_name.as_deref()
|
132 132 | }
|
133 133 | }
|
134 134 | static PATHCOMPONENT_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
135 135 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent", "com.amazonaws.ec2", "PathComponent");
|
136 136 | static PATHCOMPONENT_MEMBER_SEQUENCE_NUMBER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
137 137 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$SequenceNumber", "com.amazonaws.ec2", "PathComponent"),
|
138 138 | ::aws_smithy_schema::ShapeType::Integer,
|
139 - | "sequence_number",
|
139 + | "SequenceNumber",
|
140 140 | 0,
|
141 141 | )
|
142 142 | .with_xml_name("sequenceNumber");
|
143 143 | static PATHCOMPONENT_MEMBER_ACL_RULE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
144 144 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$AclRule", "com.amazonaws.ec2", "PathComponent"),
|
145 145 | ::aws_smithy_schema::ShapeType::Structure,
|
146 - | "acl_rule",
|
146 + | "AclRule",
|
147 147 | 1,
|
148 148 | )
|
149 149 | .with_xml_name("aclRule");
|
150 150 | static PATHCOMPONENT_MEMBER_ATTACHED_TO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
151 151 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$AttachedTo", "com.amazonaws.ec2", "PathComponent"),
|
152 152 | ::aws_smithy_schema::ShapeType::Structure,
|
153 - | "attached_to",
|
153 + | "AttachedTo",
|
154 154 | 2,
|
155 155 | )
|
156 156 | .with_xml_name("attachedTo");
|
157 157 | static PATHCOMPONENT_MEMBER_COMPONENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
158 158 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$Component", "com.amazonaws.ec2", "PathComponent"),
|
159 159 | ::aws_smithy_schema::ShapeType::Structure,
|
160 - | "component",
|
160 + | "Component",
|
161 161 | 3,
|
162 162 | )
|
163 163 | .with_xml_name("component");
|
164 164 | static PATHCOMPONENT_MEMBER_DESTINATION_VPC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
165 165 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$DestinationVpc", "com.amazonaws.ec2", "PathComponent"),
|
166 166 | ::aws_smithy_schema::ShapeType::Structure,
|
167 - | "destination_vpc",
|
167 + | "DestinationVpc",
|
168 168 | 4,
|
169 169 | )
|
170 170 | .with_xml_name("destinationVpc");
|
171 171 | static PATHCOMPONENT_MEMBER_OUTBOUND_HEADER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
172 172 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$OutboundHeader", "com.amazonaws.ec2", "PathComponent"),
|
173 173 | ::aws_smithy_schema::ShapeType::Structure,
|
174 - | "outbound_header",
|
174 + | "OutboundHeader",
|
175 175 | 5,
|
176 176 | )
|
177 177 | .with_xml_name("outboundHeader");
|
178 178 | static PATHCOMPONENT_MEMBER_INBOUND_HEADER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
179 179 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$InboundHeader", "com.amazonaws.ec2", "PathComponent"),
|
180 180 | ::aws_smithy_schema::ShapeType::Structure,
|
181 - | "inbound_header",
|
181 + | "InboundHeader",
|
182 182 | 6,
|
183 183 | )
|
184 184 | .with_xml_name("inboundHeader");
|
185 185 | static PATHCOMPONENT_MEMBER_ROUTE_TABLE_ROUTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
186 186 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$RouteTableRoute", "com.amazonaws.ec2", "PathComponent"),
|
187 187 | ::aws_smithy_schema::ShapeType::Structure,
|
188 - | "route_table_route",
|
188 + | "RouteTableRoute",
|
189 189 | 7,
|
190 190 | )
|
191 191 | .with_xml_name("routeTableRoute");
|
192 192 | static PATHCOMPONENT_MEMBER_SECURITY_GROUP_RULE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
193 193 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$SecurityGroupRule", "com.amazonaws.ec2", "PathComponent"),
|
194 194 | ::aws_smithy_schema::ShapeType::Structure,
|
195 - | "security_group_rule",
|
195 + | "SecurityGroupRule",
|
196 196 | 8,
|
197 197 | )
|
198 198 | .with_xml_name("securityGroupRule");
|
199 199 | static PATHCOMPONENT_MEMBER_SOURCE_VPC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
200 200 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$SourceVpc", "com.amazonaws.ec2", "PathComponent"),
|
201 201 | ::aws_smithy_schema::ShapeType::Structure,
|
202 - | "source_vpc",
|
202 + | "SourceVpc",
|
203 203 | 9,
|
204 204 | )
|
205 205 | .with_xml_name("sourceVpc");
|
206 206 | static PATHCOMPONENT_MEMBER_SUBNET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
207 207 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$Subnet", "com.amazonaws.ec2", "PathComponent"),
|
208 208 | ::aws_smithy_schema::ShapeType::Structure,
|
209 - | "subnet",
|
209 + | "Subnet",
|
210 210 | 10,
|
211 211 | )
|
212 212 | .with_xml_name("subnet");
|
213 213 | static PATHCOMPONENT_MEMBER_VPC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
214 214 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$Vpc", "com.amazonaws.ec2", "PathComponent"),
|
215 215 | ::aws_smithy_schema::ShapeType::Structure,
|
216 - | "vpc",
|
216 + | "Vpc",
|
217 217 | 11,
|
218 218 | )
|
219 219 | .with_xml_name("vpc");
|
220 220 | static PATHCOMPONENT_MEMBER_ADDITIONAL_DETAILS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
221 221 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$AdditionalDetails", "com.amazonaws.ec2", "PathComponent"),
|
222 222 | ::aws_smithy_schema::ShapeType::List,
|
223 - | "additional_details",
|
223 + | "AdditionalDetails",
|
224 224 | 12,
|
225 225 | )
|
226 226 | .with_xml_name("additionalDetailSet");
|
227 227 | static PATHCOMPONENT_MEMBER_TRANSIT_GATEWAY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
228 228 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$TransitGateway", "com.amazonaws.ec2", "PathComponent"),
|
229 229 | ::aws_smithy_schema::ShapeType::Structure,
|
230 - | "transit_gateway",
|
230 + | "TransitGateway",
|
231 231 | 13,
|
232 232 | )
|
233 233 | .with_xml_name("transitGateway");
|
234 234 | static PATHCOMPONENT_MEMBER_TRANSIT_GATEWAY_ROUTE_TABLE_ROUTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
235 235 | ::aws_smithy_schema::ShapeId::from_static(
|
236 236 | "com.amazonaws.ec2#PathComponent$TransitGatewayRouteTableRoute",
|
237 237 | "com.amazonaws.ec2",
|
238 238 | "PathComponent",
|
239 239 | ),
|
240 240 | ::aws_smithy_schema::ShapeType::Structure,
|
241 - | "transit_gateway_route_table_route",
|
241 + | "TransitGatewayRouteTableRoute",
|
242 242 | 14,
|
243 243 | )
|
244 244 | .with_xml_name("transitGatewayRouteTableRoute");
|
245 245 | static PATHCOMPONENT_MEMBER_EXPLANATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
246 246 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$Explanations", "com.amazonaws.ec2", "PathComponent"),
|
247 247 | ::aws_smithy_schema::ShapeType::List,
|
248 - | "explanations",
|
248 + | "Explanations",
|
249 249 | 15,
|
250 250 | )
|
251 251 | .with_xml_name("explanationSet");
|
252 252 | static PATHCOMPONENT_MEMBER_ELASTIC_LOAD_BALANCER_LISTENER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
253 253 | ::aws_smithy_schema::ShapeId::from_static(
|
254 254 | "com.amazonaws.ec2#PathComponent$ElasticLoadBalancerListener",
|
255 255 | "com.amazonaws.ec2",
|
256 256 | "PathComponent",
|
257 257 | ),
|
258 258 | ::aws_smithy_schema::ShapeType::Structure,
|
259 - | "elastic_load_balancer_listener",
|
259 + | "ElasticLoadBalancerListener",
|
260 260 | 16,
|
261 261 | )
|
262 262 | .with_xml_name("elasticLoadBalancerListener");
|
263 263 | static PATHCOMPONENT_MEMBER_FIREWALL_STATELESS_RULE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
264 264 | ::aws_smithy_schema::ShapeId::from_static(
|
265 265 | "com.amazonaws.ec2#PathComponent$FirewallStatelessRule",
|
266 266 | "com.amazonaws.ec2",
|
267 267 | "PathComponent",
|
268 268 | ),
|
269 269 | ::aws_smithy_schema::ShapeType::Structure,
|
270 - | "firewall_stateless_rule",
|
270 + | "FirewallStatelessRule",
|
271 271 | 17,
|
272 272 | )
|
273 273 | .with_xml_name("firewallStatelessRule");
|
274 274 | static PATHCOMPONENT_MEMBER_FIREWALL_STATEFUL_RULE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
275 275 | ::aws_smithy_schema::ShapeId::from_static(
|
276 276 | "com.amazonaws.ec2#PathComponent$FirewallStatefulRule",
|
277 277 | "com.amazonaws.ec2",
|
278 278 | "PathComponent",
|
279 279 | ),
|
280 280 | ::aws_smithy_schema::ShapeType::Structure,
|
281 - | "firewall_stateful_rule",
|
281 + | "FirewallStatefulRule",
|
282 282 | 18,
|
283 283 | )
|
284 284 | .with_xml_name("firewallStatefulRule");
|
285 285 | static PATHCOMPONENT_MEMBER_SERVICE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
286 286 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#PathComponent$ServiceName", "com.amazonaws.ec2", "PathComponent"),
|
287 287 | ::aws_smithy_schema::ShapeType::String,
|
288 - | "service_name",
|
288 + | "ServiceName",
|
289 289 | 19,
|
290 290 | )
|
291 291 | .with_xml_name("serviceName");
|
292 292 | static PATHCOMPONENT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
293 293 | PATHCOMPONENT_SCHEMA_ID,
|
294 294 | ::aws_smithy_schema::ShapeType::Structure,
|
295 295 | &[
|
296 296 | &PATHCOMPONENT_MEMBER_SEQUENCE_NUMBER,
|
297 297 | &PATHCOMPONENT_MEMBER_ACL_RULE,
|
298 298 | &PATHCOMPONENT_MEMBER_ATTACHED_TO,
|
399 399 | ser.write_struct(&PATHCOMPONENT_MEMBER_FIREWALL_STATEFUL_RULE, val)?;
|
400 400 | }
|
401 401 | if let Some(ref val) = self.service_name {
|
402 402 | ser.write_string(&PATHCOMPONENT_MEMBER_SERVICE_NAME, val)?;
|
403 403 | }
|
404 404 | Ok(())
|
405 405 | }
|
406 406 | }
|
407 407 | impl PathComponent {
|
408 408 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
409 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
410 - | deserializer: &mut D,
|
409 + | pub fn deserialize(
|
410 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
411 411 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
412 412 | #[allow(unused_variables, unused_mut)]
|
413 413 | let mut builder = Self::builder();
|
414 414 | #[allow(
|
415 415 | unused_variables,
|
416 416 | unreachable_code,
|
417 417 | clippy::single_match,
|
418 418 | clippy::match_single_binding,
|
419 419 | clippy::diverging_sub_expression
|
420 420 | )]
|
421 - | deserializer.read_struct(&PATHCOMPONENT_SCHEMA, (), |_, member, deser| {
|
421 + | deserializer.read_struct(&PATHCOMPONENT_SCHEMA, &mut |member, deser| {
|
422 422 | match member.member_index() {
|
423 423 | Some(0) => {
|
424 424 | builder.sequence_number = Some(deser.read_integer(member)?);
|
425 425 | }
|
426 426 | Some(1) => {
|
427 427 | builder.acl_rule = Some(crate::types::AnalysisAclRule::deserialize(deser)?);
|
428 428 | }
|
429 429 | Some(2) => {
|
430 430 | builder.attached_to = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
431 431 | }
|
432 432 | Some(3) => {
|
433 433 | builder.component = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
434 434 | }
|
435 435 | Some(4) => {
|
436 436 | builder.destination_vpc = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
437 437 | }
|
438 438 | Some(5) => {
|
439 439 | builder.outbound_header = Some(crate::types::AnalysisPacketHeader::deserialize(deser)?);
|
440 440 | }
|
441 441 | Some(6) => {
|
442 442 | builder.inbound_header = Some(crate::types::AnalysisPacketHeader::deserialize(deser)?);
|
443 443 | }
|
444 444 | Some(7) => {
|
445 445 | builder.route_table_route = Some(crate::types::AnalysisRouteTableRoute::deserialize(deser)?);
|
446 446 | }
|
447 447 | Some(8) => {
|
448 448 | builder.security_group_rule = Some(crate::types::AnalysisSecurityGroupRule::deserialize(deser)?);
|
449 449 | }
|
450 450 | Some(9) => {
|
451 451 | builder.source_vpc = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
452 452 | }
|
453 453 | Some(10) => {
|
454 454 | builder.subnet = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
455 455 | }
|
456 456 | Some(11) => {
|
457 457 | builder.vpc = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
458 458 | }
|
459 459 | Some(12) => {
|
460 460 | builder.additional_details = Some({
|
461 - | let container = if let Some(cap) = deser.container_size() {
|
462 - | Vec::with_capacity(cap)
|
463 - | } else {
|
464 - | Vec::new()
|
465 - | };
|
466 - | deser.read_list(member, container, |mut list, deser| {
|
467 - | list.push(crate::types::AdditionalDetail::deserialize(deser)?);
|
468 - | Ok(list)
|
469 - | })?
|
461 + | let mut container = Vec::new();
|
462 + | deser.read_list(member, &mut |deser| {
|
463 + | container.push(crate::types::AdditionalDetail::deserialize(deser)?);
|
464 + | Ok(())
|
465 + | })?;
|
466 + | container
|
470 467 | });
|
471 468 | }
|
472 469 | Some(13) => {
|
473 470 | builder.transit_gateway = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
474 471 | }
|
475 472 | Some(14) => {
|
476 473 | builder.transit_gateway_route_table_route = Some(crate::types::TransitGatewayRouteTableRoute::deserialize(deser)?);
|
477 474 | }
|
478 475 | Some(15) => {
|
479 476 | builder.explanations = Some({
|
480 - | let container = if let Some(cap) = deser.container_size() {
|
481 - | Vec::with_capacity(cap)
|
482 - | } else {
|
483 - | Vec::new()
|
484 - | };
|
485 - | deser.read_list(member, container, |mut list, deser| {
|
486 - | list.push(crate::types::Explanation::deserialize(deser)?);
|
487 - | Ok(list)
|
488 - | })?
|
477 + | let mut container = Vec::new();
|
478 + | deser.read_list(member, &mut |deser| {
|
479 + | container.push(crate::types::Explanation::deserialize(deser)?);
|
480 + | Ok(())
|
481 + | })?;
|
482 + | container
|
489 483 | });
|
490 484 | }
|
491 485 | Some(16) => {
|
492 486 | builder.elastic_load_balancer_listener = Some(crate::types::AnalysisComponent::deserialize(deser)?);
|
493 487 | }
|
494 488 | Some(17) => {
|
495 489 | builder.firewall_stateless_rule = Some(crate::types::FirewallStatelessRule::deserialize(deser)?);
|
496 490 | }
|
497 491 | Some(18) => {
|
498 492 | builder.firewall_stateful_rule = Some(crate::types::FirewallStatefulRule::deserialize(deser)?);
|
499 493 | }
|
500 494 | Some(19) => {
|
501 495 | builder.service_name = Some(deser.read_string(member)?);
|
502 496 | }
|
503 497 | _ => {}
|
504 498 | }
|
505 499 | Ok(())
|
506 500 | })?;
|
507 501 | Ok(builder.build())
|
508 502 | }
|
509 503 | }
|
504 + | impl PathComponent {
|
505 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
506 + | pub fn deserialize_with_response(
|
507 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
508 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
509 + | _status: u16,
|
510 + | _body: &[u8],
|
511 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
512 + | Self::deserialize(deserializer)
|
513 + | }
|
514 + | }
|
510 515 | impl PathComponent {
|
511 516 | /// Creates a new builder-style object to manufacture [`PathComponent`](crate::types::PathComponent).
|
512 517 | pub fn builder() -> crate::types::builders::PathComponentBuilder {
|
513 518 | crate::types::builders::PathComponentBuilder::default()
|
514 519 | }
|
515 520 | }
|
516 521 |
|
517 522 | /// A builder for [`PathComponent`](crate::types::PathComponent).
|
518 523 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
519 524 | #[non_exhaustive]
|
520 525 | pub struct PathComponentBuilder {
|
521 526 | pub(crate) sequence_number: ::std::option::Option<i32>,
|
522 527 | pub(crate) acl_rule: ::std::option::Option<crate::types::AnalysisAclRule>,
|
523 528 | pub(crate) attached_to: ::std::option::Option<crate::types::AnalysisComponent>,
|
524 529 | pub(crate) component: ::std::option::Option<crate::types::AnalysisComponent>,
|
525 530 | pub(crate) destination_vpc: ::std::option::Option<crate::types::AnalysisComponent>,
|
526 531 | pub(crate) outbound_header: ::std::option::Option<crate::types::AnalysisPacketHeader>,
|
527 532 | pub(crate) inbound_header: ::std::option::Option<crate::types::AnalysisPacketHeader>,
|
528 533 | pub(crate) route_table_route: ::std::option::Option<crate::types::AnalysisRouteTableRoute>,
|
529 534 | pub(crate) security_group_rule: ::std::option::Option<crate::types::AnalysisSecurityGroupRule>,
|
530 535 | pub(crate) source_vpc: ::std::option::Option<crate::types::AnalysisComponent>,
|
531 536 | pub(crate) subnet: ::std::option::Option<crate::types::AnalysisComponent>,
|
532 537 | pub(crate) vpc: ::std::option::Option<crate::types::AnalysisComponent>,
|
533 538 | pub(crate) additional_details: ::std::option::Option<::std::vec::Vec<crate::types::AdditionalDetail>>,
|
534 539 | pub(crate) transit_gateway: ::std::option::Option<crate::types::AnalysisComponent>,
|
535 540 | pub(crate) transit_gateway_route_table_route: ::std::option::Option<crate::types::TransitGatewayRouteTableRoute>,
|
536 541 | pub(crate) explanations: ::std::option::Option<::std::vec::Vec<crate::types::Explanation>>,
|
537 542 | pub(crate) elastic_load_balancer_listener: ::std::option::Option<crate::types::AnalysisComponent>,
|
538 543 | pub(crate) firewall_stateless_rule: ::std::option::Option<crate::types::FirewallStatelessRule>,
|
539 544 | pub(crate) firewall_stateful_rule: ::std::option::Option<crate::types::FirewallStatefulRule>,
|