66 66 | "com.amazonaws.ec2",
|
67 67 | "LaunchTemplateEbsBlockDevice",
|
68 68 | );
|
69 69 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_ENCRYPTED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
70 70 | ::aws_smithy_schema::ShapeId::from_static(
|
71 71 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$Encrypted",
|
72 72 | "com.amazonaws.ec2",
|
73 73 | "LaunchTemplateEbsBlockDevice",
|
74 74 | ),
|
75 75 | ::aws_smithy_schema::ShapeType::Boolean,
|
76 - | "encrypted",
|
76 + | "Encrypted",
|
77 77 | 0,
|
78 78 | )
|
79 79 | .with_xml_name("encrypted");
|
80 80 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_DELETE_ON_TERMINATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
81 81 | ::aws_smithy_schema::ShapeId::from_static(
|
82 82 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$DeleteOnTermination",
|
83 83 | "com.amazonaws.ec2",
|
84 84 | "LaunchTemplateEbsBlockDevice",
|
85 85 | ),
|
86 86 | ::aws_smithy_schema::ShapeType::Boolean,
|
87 - | "delete_on_termination",
|
87 + | "DeleteOnTermination",
|
88 88 | 1,
|
89 89 | )
|
90 90 | .with_xml_name("deleteOnTermination");
|
91 91 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_IOPS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
92 92 | ::aws_smithy_schema::ShapeId::from_static(
|
93 93 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$Iops",
|
94 94 | "com.amazonaws.ec2",
|
95 95 | "LaunchTemplateEbsBlockDevice",
|
96 96 | ),
|
97 97 | ::aws_smithy_schema::ShapeType::Integer,
|
98 - | "iops",
|
98 + | "Iops",
|
99 99 | 2,
|
100 100 | )
|
101 101 | .with_xml_name("iops");
|
102 102 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_KMS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
103 103 | ::aws_smithy_schema::ShapeId::from_static(
|
104 104 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$KmsKeyId",
|
105 105 | "com.amazonaws.ec2",
|
106 106 | "LaunchTemplateEbsBlockDevice",
|
107 107 | ),
|
108 108 | ::aws_smithy_schema::ShapeType::String,
|
109 - | "kms_key_id",
|
109 + | "KmsKeyId",
|
110 110 | 3,
|
111 111 | )
|
112 112 | .with_xml_name("kmsKeyId");
|
113 113 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_SNAPSHOT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
114 114 | ::aws_smithy_schema::ShapeId::from_static(
|
115 115 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$SnapshotId",
|
116 116 | "com.amazonaws.ec2",
|
117 117 | "LaunchTemplateEbsBlockDevice",
|
118 118 | ),
|
119 119 | ::aws_smithy_schema::ShapeType::String,
|
120 - | "snapshot_id",
|
120 + | "SnapshotId",
|
121 121 | 4,
|
122 122 | )
|
123 123 | .with_xml_name("snapshotId");
|
124 124 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_SIZE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
125 125 | ::aws_smithy_schema::ShapeId::from_static(
|
126 126 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$VolumeSize",
|
127 127 | "com.amazonaws.ec2",
|
128 128 | "LaunchTemplateEbsBlockDevice",
|
129 129 | ),
|
130 130 | ::aws_smithy_schema::ShapeType::Integer,
|
131 - | "volume_size",
|
131 + | "VolumeSize",
|
132 132 | 5,
|
133 133 | )
|
134 134 | .with_xml_name("volumeSize");
|
135 135 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
136 136 | ::aws_smithy_schema::ShapeId::from_static(
|
137 137 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$VolumeType",
|
138 138 | "com.amazonaws.ec2",
|
139 139 | "LaunchTemplateEbsBlockDevice",
|
140 140 | ),
|
141 141 | ::aws_smithy_schema::ShapeType::String,
|
142 - | "volume_type",
|
142 + | "VolumeType",
|
143 143 | 6,
|
144 144 | )
|
145 145 | .with_xml_name("volumeType");
|
146 146 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_THROUGHPUT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
147 147 | ::aws_smithy_schema::ShapeId::from_static(
|
148 148 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$Throughput",
|
149 149 | "com.amazonaws.ec2",
|
150 150 | "LaunchTemplateEbsBlockDevice",
|
151 151 | ),
|
152 152 | ::aws_smithy_schema::ShapeType::Integer,
|
153 - | "throughput",
|
153 + | "Throughput",
|
154 154 | 7,
|
155 155 | )
|
156 156 | .with_xml_name("throughput");
|
157 157 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_INITIALIZATION_RATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
158 158 | ::aws_smithy_schema::ShapeId::from_static(
|
159 159 | "com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$VolumeInitializationRate",
|
160 160 | "com.amazonaws.ec2",
|
161 161 | "LaunchTemplateEbsBlockDevice",
|
162 162 | ),
|
163 163 | ::aws_smithy_schema::ShapeType::Integer,
|
164 - | "volume_initialization_rate",
|
164 + | "VolumeInitializationRate",
|
165 165 | 8,
|
166 166 | )
|
167 167 | .with_xml_name("volumeInitializationRate");
|
168 168 | static LAUNCHTEMPLATEEBSBLOCKDEVICE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
169 169 | LAUNCHTEMPLATEEBSBLOCKDEVICE_SCHEMA_ID,
|
170 170 | ::aws_smithy_schema::ShapeType::Structure,
|
171 171 | &[
|
172 172 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_ENCRYPTED,
|
173 173 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_DELETE_ON_TERMINATION,
|
174 174 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_IOPS,
|
175 175 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_KMS_KEY_ID,
|
176 176 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_SNAPSHOT_ID,
|
177 177 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_SIZE,
|
178 178 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_TYPE,
|
179 179 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_THROUGHPUT,
|
180 180 | &LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_INITIALIZATION_RATE,
|
181 181 | ],
|
182 182 | );
|
183 183 | impl LaunchTemplateEbsBlockDevice {
|
184 184 | /// The schema for this shape.
|
185 185 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LAUNCHTEMPLATEEBSBLOCKDEVICE_SCHEMA;
|
186 186 | }
|
187 187 | impl ::aws_smithy_schema::serde::SerializableStruct for LaunchTemplateEbsBlockDevice {
|
188 188 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
189 189 | fn serialize_members(
|
190 190 | &self,
|
191 191 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
192 192 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
193 193 | if let Some(ref val) = self.encrypted {
|
194 194 | ser.write_boolean(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_ENCRYPTED, *val)?;
|
195 195 | }
|
196 196 | if let Some(ref val) = self.delete_on_termination {
|
197 197 | ser.write_boolean(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_DELETE_ON_TERMINATION, *val)?;
|
198 198 | }
|
199 199 | if let Some(ref val) = self.iops {
|
200 200 | ser.write_integer(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_IOPS, *val)?;
|
201 201 | }
|
202 202 | if let Some(ref val) = self.kms_key_id {
|
203 203 | ser.write_string(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_KMS_KEY_ID, val)?;
|
204 204 | }
|
205 205 | if let Some(ref val) = self.snapshot_id {
|
206 206 | ser.write_string(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_SNAPSHOT_ID, val)?;
|
207 207 | }
|
208 208 | if let Some(ref val) = self.volume_size {
|
209 209 | ser.write_integer(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_SIZE, *val)?;
|
210 210 | }
|
211 211 | if let Some(ref val) = self.volume_type {
|
212 212 | ser.write_string(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_TYPE, val.as_str())?;
|
213 213 | }
|
214 214 | if let Some(ref val) = self.throughput {
|
215 215 | ser.write_integer(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_THROUGHPUT, *val)?;
|
216 216 | }
|
217 217 | if let Some(ref val) = self.volume_initialization_rate {
|
218 218 | ser.write_integer(&LAUNCHTEMPLATEEBSBLOCKDEVICE_MEMBER_VOLUME_INITIALIZATION_RATE, *val)?;
|
219 219 | }
|
220 220 | Ok(())
|
221 221 | }
|
222 222 | }
|
223 223 | impl LaunchTemplateEbsBlockDevice {
|
224 224 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
225 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
226 - | deserializer: &mut D,
|
225 + | pub fn deserialize(
|
226 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
227 227 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
228 228 | #[allow(unused_variables, unused_mut)]
|
229 229 | let mut builder = Self::builder();
|
230 230 | #[allow(
|
231 231 | unused_variables,
|
232 232 | unreachable_code,
|
233 233 | clippy::single_match,
|
234 234 | clippy::match_single_binding,
|
235 235 | clippy::diverging_sub_expression
|
236 236 | )]
|
237 - | deserializer.read_struct(&LAUNCHTEMPLATEEBSBLOCKDEVICE_SCHEMA, (), |_, member, deser| {
|
237 + | deserializer.read_struct(&LAUNCHTEMPLATEEBSBLOCKDEVICE_SCHEMA, &mut |member, deser| {
|
238 238 | match member.member_index() {
|
239 239 | Some(0) => {
|
240 240 | builder.encrypted = Some(deser.read_boolean(member)?);
|
241 241 | }
|
242 242 | Some(1) => {
|
243 243 | builder.delete_on_termination = Some(deser.read_boolean(member)?);
|
244 244 | }
|
245 245 | Some(2) => {
|
246 246 | builder.iops = Some(deser.read_integer(member)?);
|
247 247 | }
|
248 248 | Some(3) => {
|
249 249 | builder.kms_key_id = Some(deser.read_string(member)?);
|
250 250 | }
|
251 251 | Some(4) => {
|
252 252 | builder.snapshot_id = Some(deser.read_string(member)?);
|
253 253 | }
|
254 254 | Some(5) => {
|
255 255 | builder.volume_size = Some(deser.read_integer(member)?);
|
256 256 | }
|
257 257 | Some(6) => {
|
258 258 | builder.volume_type = Some(crate::types::VolumeType::from(deser.read_string(member)?.as_str()));
|
259 259 | }
|
260 260 | Some(7) => {
|
261 261 | builder.throughput = Some(deser.read_integer(member)?);
|
262 262 | }
|
263 263 | Some(8) => {
|
264 264 | builder.volume_initialization_rate = Some(deser.read_integer(member)?);
|
265 265 | }
|
266 266 | _ => {}
|
267 267 | }
|
268 268 | Ok(())
|
269 269 | })?;
|
270 270 | Ok(builder.build())
|
271 271 | }
|
272 272 | }
|
273 + | impl LaunchTemplateEbsBlockDevice {
|
274 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
275 + | pub fn deserialize_with_response(
|
276 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
277 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
278 + | _status: u16,
|
279 + | _body: &[u8],
|
280 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
281 + | Self::deserialize(deserializer)
|
282 + | }
|
283 + | }
|
273 284 | impl LaunchTemplateEbsBlockDevice {
|
274 285 | /// Creates a new builder-style object to manufacture [`LaunchTemplateEbsBlockDevice`](crate::types::LaunchTemplateEbsBlockDevice).
|
275 286 | pub fn builder() -> crate::types::builders::LaunchTemplateEbsBlockDeviceBuilder {
|
276 287 | crate::types::builders::LaunchTemplateEbsBlockDeviceBuilder::default()
|
277 288 | }
|
278 289 | }
|
279 290 |
|
280 291 | /// A builder for [`LaunchTemplateEbsBlockDevice`](crate::types::LaunchTemplateEbsBlockDevice).
|
281 292 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
282 293 | #[non_exhaustive]
|