94 94 | "com.amazonaws.ec2.synthetic",
|
95 95 | "CreateDelegateMacVolumeOwnershipTaskInput",
|
96 96 | );
|
97 97 | static CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
98 98 | ::aws_smithy_schema::ShapeId::from_static(
|
99 99 | "com.amazonaws.ec2.synthetic#CreateDelegateMacVolumeOwnershipTaskInput$ClientToken",
|
100 100 | "com.amazonaws.ec2.synthetic",
|
101 101 | "CreateDelegateMacVolumeOwnershipTaskInput",
|
102 102 | ),
|
103 103 | ::aws_smithy_schema::ShapeType::String,
|
104 - | "client_token",
|
104 + | "ClientToken",
|
105 105 | 0,
|
106 106 | );
|
107 107 | static CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
108 108 | ::aws_smithy_schema::ShapeId::from_static(
|
109 109 | "com.amazonaws.ec2.synthetic#CreateDelegateMacVolumeOwnershipTaskInput$DryRun",
|
110 110 | "com.amazonaws.ec2.synthetic",
|
111 111 | "CreateDelegateMacVolumeOwnershipTaskInput",
|
112 112 | ),
|
113 113 | ::aws_smithy_schema::ShapeType::Boolean,
|
114 - | "dry_run",
|
114 + | "DryRun",
|
115 115 | 1,
|
116 116 | );
|
117 117 | static CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
118 118 | ::aws_smithy_schema::ShapeId::from_static(
|
119 119 | "com.amazonaws.ec2.synthetic#CreateDelegateMacVolumeOwnershipTaskInput$InstanceId",
|
120 120 | "com.amazonaws.ec2.synthetic",
|
121 121 | "CreateDelegateMacVolumeOwnershipTaskInput",
|
122 122 | ),
|
123 123 | ::aws_smithy_schema::ShapeType::String,
|
124 - | "instance_id",
|
124 + | "InstanceId",
|
125 125 | 2,
|
126 126 | );
|
127 127 | static CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_MAC_CREDENTIALS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
128 128 | ::aws_smithy_schema::ShapeId::from_static(
|
129 129 | "com.amazonaws.ec2.synthetic#CreateDelegateMacVolumeOwnershipTaskInput$MacCredentials",
|
130 130 | "com.amazonaws.ec2.synthetic",
|
131 131 | "CreateDelegateMacVolumeOwnershipTaskInput",
|
132 132 | ),
|
133 133 | ::aws_smithy_schema::ShapeType::String,
|
134 - | "mac_credentials",
|
134 + | "MacCredentials",
|
135 135 | 3,
|
136 136 | );
|
137 137 | static CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_TAG_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
138 138 | ::aws_smithy_schema::ShapeId::from_static(
|
139 139 | "com.amazonaws.ec2.synthetic#CreateDelegateMacVolumeOwnershipTaskInput$TagSpecifications",
|
140 140 | "com.amazonaws.ec2.synthetic",
|
141 141 | "CreateDelegateMacVolumeOwnershipTaskInput",
|
142 142 | ),
|
143 143 | ::aws_smithy_schema::ShapeType::List,
|
144 - | "tag_specifications",
|
144 + | "TagSpecifications",
|
145 145 | 4,
|
146 146 | )
|
147 147 | .with_xml_name("TagSpecification");
|
148 148 | static CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
149 149 | CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_SCHEMA_ID,
|
150 150 | ::aws_smithy_schema::ShapeType::Structure,
|
151 151 | &[
|
152 152 | &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_CLIENT_TOKEN,
|
153 153 | &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_DRY_RUN,
|
154 154 | &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_INSTANCE_ID,
|
155 155 | &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_MAC_CREDENTIALS,
|
156 156 | &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_TAG_SPECIFICATIONS,
|
157 157 | ],
|
158 158 | );
|
159 159 | impl CreateDelegateMacVolumeOwnershipTaskInput {
|
160 160 | /// The schema for this shape.
|
161 161 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_SCHEMA;
|
162 162 | }
|
163 163 | impl ::aws_smithy_schema::serde::SerializableStruct for CreateDelegateMacVolumeOwnershipTaskInput {
|
164 164 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
165 165 | fn serialize_members(
|
166 166 | &self,
|
167 167 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
168 168 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
169 169 | if let Some(ref val) = self.client_token {
|
170 170 | ser.write_string(&CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_CLIENT_TOKEN, val)?;
|
171 171 | }
|
172 172 | if let Some(ref val) = self.dry_run {
|
173 173 | ser.write_boolean(&CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_DRY_RUN, *val)?;
|
174 174 | }
|
175 175 | if let Some(ref val) = self.instance_id {
|
176 176 | ser.write_string(&CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_INSTANCE_ID, val)?;
|
177 177 | }
|
178 178 | if let Some(ref val) = self.mac_credentials {
|
179 179 | ser.write_string(&CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_MAC_CREDENTIALS, val)?;
|
180 180 | }
|
181 181 | if let Some(ref val) = self.tag_specifications {
|
182 182 | ser.write_list(
|
183 183 | &CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_MEMBER_TAG_SPECIFICATIONS,
|
184 184 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
185 185 | for item in val {
|
186 186 | ser.write_struct(crate::types::TagSpecification::SCHEMA, item)?;
|
187 187 | }
|
188 188 | Ok(())
|
189 189 | },
|
190 190 | )?;
|
191 191 | }
|
192 192 | Ok(())
|
193 193 | }
|
194 194 | }
|
195 195 | impl CreateDelegateMacVolumeOwnershipTaskInput {
|
196 196 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
197 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
198 - | deserializer: &mut D,
|
197 + | pub fn deserialize(
|
198 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
199 199 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
200 200 | #[allow(unused_variables, unused_mut)]
|
201 201 | let mut builder = Self::builder();
|
202 202 | #[allow(
|
203 203 | unused_variables,
|
204 204 | unreachable_code,
|
205 205 | clippy::single_match,
|
206 206 | clippy::match_single_binding,
|
207 207 | clippy::diverging_sub_expression
|
208 208 | )]
|
209 - | deserializer.read_struct(&CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_SCHEMA, (), |_, member, deser| {
|
209 + | deserializer.read_struct(&CREATEDELEGATEMACVOLUMEOWNERSHIPTASKINPUT_SCHEMA, &mut |member, deser| {
|
210 210 | match member.member_index() {
|
211 211 | Some(0) => {
|
212 212 | builder.client_token = Some(deser.read_string(member)?);
|
213 213 | }
|
214 214 | Some(1) => {
|
215 215 | builder.dry_run = Some(deser.read_boolean(member)?);
|
216 216 | }
|
217 217 | Some(2) => {
|
218 218 | builder.instance_id = Some(deser.read_string(member)?);
|
219 219 | }
|
220 220 | Some(3) => {
|
221 221 | builder.mac_credentials = Some(deser.read_string(member)?);
|
222 222 | }
|
223 223 | Some(4) => {
|
224 224 | builder.tag_specifications = Some({
|
225 - | let container = if let Some(cap) = deser.container_size() {
|
226 - | Vec::with_capacity(cap)
|
227 - | } else {
|
228 - | Vec::new()
|
229 - | };
|
230 - | deser.read_list(member, container, |mut list, deser| {
|
231 - | list.push(crate::types::TagSpecification::deserialize(deser)?);
|
232 - | Ok(list)
|
233 - | })?
|
225 + | let mut container = Vec::new();
|
226 + | deser.read_list(member, &mut |deser| {
|
227 + | container.push(crate::types::TagSpecification::deserialize(deser)?);
|
228 + | Ok(())
|
229 + | })?;
|
230 + | container
|
234 231 | });
|
235 232 | }
|
236 233 | _ => {}
|
237 234 | }
|
238 235 | Ok(())
|
239 236 | })?;
|
237 + | builder.instance_id = builder.instance_id.or(Some(String::new()));
|
238 + | builder.mac_credentials = builder.mac_credentials.or(Some(String::new()));
|
240 239 | builder
|
241 240 | .build()
|
242 241 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
243 242 | }
|
244 243 | }
|
244 + | impl CreateDelegateMacVolumeOwnershipTaskInput {
|
245 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
246 + | pub fn deserialize_with_response(
|
247 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
248 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
249 + | _status: u16,
|
250 + | _body: &[u8],
|
251 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
252 + | Self::deserialize(deserializer)
|
253 + | }
|
254 + | }
|
245 255 | impl CreateDelegateMacVolumeOwnershipTaskInput {
|
246 256 | /// Creates a new builder-style object to manufacture [`CreateDelegateMacVolumeOwnershipTaskInput`](crate::operation::create_delegate_mac_volume_ownership_task::CreateDelegateMacVolumeOwnershipTaskInput).
|
247 257 | pub fn builder() -> crate::operation::create_delegate_mac_volume_ownership_task::builders::CreateDelegateMacVolumeOwnershipTaskInputBuilder {
|
248 258 | crate::operation::create_delegate_mac_volume_ownership_task::builders::CreateDelegateMacVolumeOwnershipTaskInputBuilder::default()
|
249 259 | }
|
250 260 | }
|
251 261 |
|
252 262 | /// A builder for [`CreateDelegateMacVolumeOwnershipTaskInput`](crate::operation::create_delegate_mac_volume_ownership_task::CreateDelegateMacVolumeOwnershipTaskInput).
|
253 263 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
254 264 | #[non_exhaustive]
|