1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | #[allow(missing_docs)] // documentation missing in model
|
3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct DeleteVpcEndpointConnectionNotificationsOutput {
|
6 6 | /// <p>Information about the notifications that could not be deleted successfully.</p>
|
7 7 | pub unsuccessful: ::std::option::Option<::std::vec::Vec<crate::types::UnsuccessfulItem>>,
|
8 8 | _request_id: Option<String>,
|
9 9 | }
|
10 10 | impl DeleteVpcEndpointConnectionNotificationsOutput {
|
11 11 | /// <p>Information about the notifications that could not be deleted successfully.</p>
|
12 12 | ///
|
13 13 | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unsuccessful.is_none()`.
|
14 14 | pub fn unsuccessful(&self) -> &[crate::types::UnsuccessfulItem] {
|
15 15 | self.unsuccessful.as_deref().unwrap_or_default()
|
16 16 | }
|
17 17 | }
|
18 18 | static DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
19 19 | "com.amazonaws.ec2.synthetic#DeleteVpcEndpointConnectionNotificationsOutput",
|
20 20 | "com.amazonaws.ec2.synthetic",
|
21 21 | "DeleteVpcEndpointConnectionNotificationsOutput",
|
22 22 | );
|
23 23 | static DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_MEMBER_UNSUCCESSFUL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
24 24 | ::aws_smithy_schema::ShapeId::from_static(
|
25 25 | "com.amazonaws.ec2.synthetic#DeleteVpcEndpointConnectionNotificationsOutput$Unsuccessful",
|
26 26 | "com.amazonaws.ec2.synthetic",
|
27 27 | "DeleteVpcEndpointConnectionNotificationsOutput",
|
28 28 | ),
|
29 29 | ::aws_smithy_schema::ShapeType::List,
|
30 - | "unsuccessful",
|
30 + | "Unsuccessful",
|
31 31 | 0,
|
32 32 | )
|
33 33 | .with_xml_name("unsuccessful");
|
34 + | static DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
35 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
36 + | ::aws_smithy_schema::ShapeType::String,
|
37 + | "request_id",
|
38 + | 1,
|
39 + | )
|
40 + | .with_http_header("x-amzn-requestid");
|
34 41 | static DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
35 42 | DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA_ID,
|
36 43 | ::aws_smithy_schema::ShapeType::Structure,
|
37 - | &[&DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_MEMBER_UNSUCCESSFUL],
|
44 + | &[
|
45 + | &DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_MEMBER_UNSUCCESSFUL,
|
46 + | &DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_MEMBER__REQUEST_ID,
|
47 + | ],
|
38 48 | );
|
39 49 | impl DeleteVpcEndpointConnectionNotificationsOutput {
|
40 50 | /// The schema for this shape.
|
41 51 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA;
|
42 52 | }
|
43 53 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteVpcEndpointConnectionNotificationsOutput {
|
44 54 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
45 55 | fn serialize_members(
|
46 56 | &self,
|
47 57 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
48 58 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
49 59 | if let Some(ref val) = self.unsuccessful {
|
50 60 | ser.write_list(
|
51 61 | &DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_MEMBER_UNSUCCESSFUL,
|
52 62 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
53 63 | for item in val {
|
54 64 | ser.write_struct(crate::types::UnsuccessfulItem::SCHEMA, item)?;
|
55 65 | }
|
56 66 | Ok(())
|
57 67 | },
|
58 68 | )?;
|
59 69 | }
|
60 70 | Ok(())
|
61 71 | }
|
62 72 | }
|
63 73 | impl DeleteVpcEndpointConnectionNotificationsOutput {
|
64 74 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
65 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
66 - | deserializer: &mut D,
|
75 + | pub fn deserialize(
|
76 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
67 77 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
68 78 | #[allow(unused_variables, unused_mut)]
|
69 79 | let mut builder = Self::builder();
|
70 80 | #[allow(
|
71 81 | unused_variables,
|
72 82 | unreachable_code,
|
73 83 | clippy::single_match,
|
74 84 | clippy::match_single_binding,
|
75 85 | clippy::diverging_sub_expression
|
76 86 | )]
|
77 - | deserializer.read_struct(&DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA, (), |_, member, deser| {
|
87 + | deserializer.read_struct(&DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA, &mut |member, deser| {
|
78 88 | match member.member_index() {
|
79 89 | Some(0) => {
|
80 90 | builder.unsuccessful = Some({
|
81 - | let container = if let Some(cap) = deser.container_size() {
|
82 - | Vec::with_capacity(cap)
|
83 - | } else {
|
84 - | Vec::new()
|
85 - | };
|
86 - | deser.read_list(member, container, |mut list, deser| {
|
87 - | list.push(crate::types::UnsuccessfulItem::deserialize(deser)?);
|
88 - | Ok(list)
|
89 - | })?
|
91 + | let mut container = Vec::new();
|
92 + | deser.read_list(member, &mut |deser| {
|
93 + | container.push(crate::types::UnsuccessfulItem::deserialize(deser)?);
|
94 + | Ok(())
|
95 + | })?;
|
96 + | container
|
97 + | });
|
98 + | }
|
99 + | Some(1) => {
|
100 + | builder._request_id = Some(deser.read_string(member)?);
|
101 + | }
|
102 + | _ => {}
|
103 + | }
|
104 + | Ok(())
|
105 + | })?;
|
106 + | Ok(builder.build())
|
107 + | }
|
108 + | }
|
109 + | impl DeleteVpcEndpointConnectionNotificationsOutput {
|
110 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
111 + | /// Header-bound members are read directly from headers, avoiding runtime
|
112 + | /// member iteration overhead. Body members are read via the deserializer.
|
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 + | #[allow(unused_variables, unused_mut)]
|
120 + | let mut builder = Self::builder();
|
121 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
122 + | builder._request_id = Some(val.to_string());
|
123 + | }
|
124 + | #[allow(
|
125 + | unused_variables,
|
126 + | unreachable_code,
|
127 + | clippy::single_match,
|
128 + | clippy::match_single_binding,
|
129 + | clippy::diverging_sub_expression
|
130 + | )]
|
131 + | deserializer.read_struct(&DELETEVPCENDPOINTCONNECTIONNOTIFICATIONSOUTPUT_SCHEMA, &mut |member, deser| {
|
132 + | match member.member_index() {
|
133 + | Some(0) => {
|
134 + | builder.unsuccessful = Some({
|
135 + | let mut container = Vec::new();
|
136 + | deser.read_list(member, &mut |deser| {
|
137 + | container.push(crate::types::UnsuccessfulItem::deserialize(deser)?);
|
138 + | Ok(())
|
139 + | })?;
|
140 + | container
|
90 141 | });
|
91 142 | }
|
92 143 | _ => {}
|
93 144 | }
|
94 145 | Ok(())
|
95 146 | })?;
|
96 147 | Ok(builder.build())
|
97 148 | }
|
98 149 | }
|
99 150 | impl ::aws_types::request_id::RequestId for DeleteVpcEndpointConnectionNotificationsOutput {
|