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