29 29 | "DeleteQueuedReservedInstancesOutput",
|
30 30 | );
|
31 31 | static DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER_SUCCESSFUL_QUEUED_PURCHASE_DELETIONS: ::aws_smithy_schema::Schema =
|
32 32 | ::aws_smithy_schema::Schema::new_member(
|
33 33 | ::aws_smithy_schema::ShapeId::from_static(
|
34 34 | "com.amazonaws.ec2.synthetic#DeleteQueuedReservedInstancesOutput$SuccessfulQueuedPurchaseDeletions",
|
35 35 | "com.amazonaws.ec2.synthetic",
|
36 36 | "DeleteQueuedReservedInstancesOutput",
|
37 37 | ),
|
38 38 | ::aws_smithy_schema::ShapeType::List,
|
39 - | "successful_queued_purchase_deletions",
|
39 + | "SuccessfulQueuedPurchaseDeletions",
|
40 40 | 0,
|
41 41 | )
|
42 42 | .with_xml_name("successfulQueuedPurchaseDeletionSet");
|
43 43 | static DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER_FAILED_QUEUED_PURCHASE_DELETIONS: ::aws_smithy_schema::Schema =
|
44 44 | ::aws_smithy_schema::Schema::new_member(
|
45 45 | ::aws_smithy_schema::ShapeId::from_static(
|
46 46 | "com.amazonaws.ec2.synthetic#DeleteQueuedReservedInstancesOutput$FailedQueuedPurchaseDeletions",
|
47 47 | "com.amazonaws.ec2.synthetic",
|
48 48 | "DeleteQueuedReservedInstancesOutput",
|
49 49 | ),
|
50 50 | ::aws_smithy_schema::ShapeType::List,
|
51 - | "failed_queued_purchase_deletions",
|
51 + | "FailedQueuedPurchaseDeletions",
|
52 52 | 1,
|
53 53 | )
|
54 54 | .with_xml_name("failedQueuedPurchaseDeletionSet");
|
55 + | static DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
56 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
57 + | ::aws_smithy_schema::ShapeType::String,
|
58 + | "request_id",
|
59 + | 2,
|
60 + | )
|
61 + | .with_http_header("x-amzn-requestid");
|
55 62 | static DELETEQUEUEDRESERVEDINSTANCESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
56 63 | DELETEQUEUEDRESERVEDINSTANCESOUTPUT_SCHEMA_ID,
|
57 64 | ::aws_smithy_schema::ShapeType::Structure,
|
58 65 | &[
|
59 66 | &DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER_SUCCESSFUL_QUEUED_PURCHASE_DELETIONS,
|
60 67 | &DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER_FAILED_QUEUED_PURCHASE_DELETIONS,
|
68 + | &DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER__REQUEST_ID,
|
61 69 | ],
|
62 70 | );
|
63 71 | impl DeleteQueuedReservedInstancesOutput {
|
64 72 | /// The schema for this shape.
|
65 73 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEQUEUEDRESERVEDINSTANCESOUTPUT_SCHEMA;
|
66 74 | }
|
67 75 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteQueuedReservedInstancesOutput {
|
68 76 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
69 77 | fn serialize_members(
|
70 78 | &self,
|
71 79 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
72 80 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
73 81 | if let Some(ref val) = self.successful_queued_purchase_deletions {
|
74 82 | ser.write_list(
|
75 83 | &DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER_SUCCESSFUL_QUEUED_PURCHASE_DELETIONS,
|
76 84 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
77 85 | for item in val {
|
78 86 | ser.write_struct(crate::types::SuccessfulQueuedPurchaseDeletion::SCHEMA, item)?;
|
79 87 | }
|
80 88 | Ok(())
|
81 89 | },
|
82 90 | )?;
|
83 91 | }
|
84 92 | if let Some(ref val) = self.failed_queued_purchase_deletions {
|
85 93 | ser.write_list(
|
86 94 | &DELETEQUEUEDRESERVEDINSTANCESOUTPUT_MEMBER_FAILED_QUEUED_PURCHASE_DELETIONS,
|
87 95 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
88 96 | for item in val {
|
89 97 | ser.write_struct(crate::types::FailedQueuedPurchaseDeletion::SCHEMA, item)?;
|
90 98 | }
|
91 99 | Ok(())
|
92 100 | },
|
93 101 | )?;
|
94 102 | }
|
95 103 | Ok(())
|
96 104 | }
|
97 105 | }
|
98 106 | impl DeleteQueuedReservedInstancesOutput {
|
99 107 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
100 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
101 - | deserializer: &mut D,
|
108 + | pub fn deserialize(
|
109 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
102 110 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
103 111 | #[allow(unused_variables, unused_mut)]
|
104 112 | let mut builder = Self::builder();
|
105 113 | #[allow(
|
106 114 | unused_variables,
|
107 115 | unreachable_code,
|
108 116 | clippy::single_match,
|
109 117 | clippy::match_single_binding,
|
110 118 | clippy::diverging_sub_expression
|
111 119 | )]
|
112 - | deserializer.read_struct(&DELETEQUEUEDRESERVEDINSTANCESOUTPUT_SCHEMA, (), |_, member, deser| {
|
120 + | deserializer.read_struct(&DELETEQUEUEDRESERVEDINSTANCESOUTPUT_SCHEMA, &mut |member, deser| {
|
113 121 | match member.member_index() {
|
114 122 | Some(0) => {
|
115 123 | builder.successful_queued_purchase_deletions = Some({
|
116 - | let container = if let Some(cap) = deser.container_size() {
|
117 - | Vec::with_capacity(cap)
|
118 - | } else {
|
119 - | Vec::new()
|
120 - | };
|
121 - | deser.read_list(member, container, |mut list, deser| {
|
122 - | list.push(crate::types::SuccessfulQueuedPurchaseDeletion::deserialize(deser)?);
|
123 - | Ok(list)
|
124 - | })?
|
124 + | let mut container = Vec::new();
|
125 + | deser.read_list(member, &mut |deser| {
|
126 + | container.push(crate::types::SuccessfulQueuedPurchaseDeletion::deserialize(deser)?);
|
127 + | Ok(())
|
128 + | })?;
|
129 + | container
|
125 130 | });
|
126 131 | }
|
127 132 | Some(1) => {
|
128 133 | builder.failed_queued_purchase_deletions = Some({
|
129 - | let container = if let Some(cap) = deser.container_size() {
|
130 - | Vec::with_capacity(cap)
|
131 - | } else {
|
132 - | Vec::new()
|
133 - | };
|
134 - | deser.read_list(member, container, |mut list, deser| {
|
135 - | list.push(crate::types::FailedQueuedPurchaseDeletion::deserialize(deser)?);
|
136 - | Ok(list)
|
137 - | })?
|
134 + | let mut container = Vec::new();
|
135 + | deser.read_list(member, &mut |deser| {
|
136 + | container.push(crate::types::FailedQueuedPurchaseDeletion::deserialize(deser)?);
|
137 + | Ok(())
|
138 + | })?;
|
139 + | container
|
140 + | });
|
141 + | }
|
142 + | Some(2) => {
|
143 + | builder._request_id = Some(deser.read_string(member)?);
|
144 + | }
|
145 + | _ => {}
|
146 + | }
|
147 + | Ok(())
|
148 + | })?;
|
149 + | Ok(builder.build())
|
150 + | }
|
151 + | }
|
152 + | impl DeleteQueuedReservedInstancesOutput {
|
153 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
154 + | /// Header-bound members are read directly from headers, avoiding runtime
|
155 + | /// member iteration overhead. Body members are read via the deserializer.
|
156 + | pub fn deserialize_with_response(
|
157 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
158 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
159 + | _status: u16,
|
160 + | _body: &[u8],
|
161 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
162 + | #[allow(unused_variables, unused_mut)]
|
163 + | let mut builder = Self::builder();
|
164 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
165 + | builder._request_id = Some(val.to_string());
|
166 + | }
|
167 + | #[allow(
|
168 + | unused_variables,
|
169 + | unreachable_code,
|
170 + | clippy::single_match,
|
171 + | clippy::match_single_binding,
|
172 + | clippy::diverging_sub_expression
|
173 + | )]
|
174 + | deserializer.read_struct(&DELETEQUEUEDRESERVEDINSTANCESOUTPUT_SCHEMA, &mut |member, deser| {
|
175 + | match member.member_index() {
|
176 + | Some(0) => {
|
177 + | builder.successful_queued_purchase_deletions = Some({
|
178 + | let mut container = Vec::new();
|
179 + | deser.read_list(member, &mut |deser| {
|
180 + | container.push(crate::types::SuccessfulQueuedPurchaseDeletion::deserialize(deser)?);
|
181 + | Ok(())
|
182 + | })?;
|
183 + | container
|
184 + | });
|
185 + | }
|
186 + | Some(1) => {
|
187 + | builder.failed_queued_purchase_deletions = Some({
|
188 + | let mut container = Vec::new();
|
189 + | deser.read_list(member, &mut |deser| {
|
190 + | container.push(crate::types::FailedQueuedPurchaseDeletion::deserialize(deser)?);
|
191 + | Ok(())
|
192 + | })?;
|
193 + | container
|
138 194 | });
|
139 195 | }
|
140 196 | _ => {}
|
141 197 | }
|
142 198 | Ok(())
|
143 199 | })?;
|
144 200 | Ok(builder.build())
|
145 201 | }
|
146 202 | }
|
147 203 | impl ::aws_types::request_id::RequestId for DeleteQueuedReservedInstancesOutput {
|