103 103 | "com.amazonaws.ec2.synthetic",
|
104 104 | "AuthorizeSecurityGroupIngressInput",
|
105 105 | );
|
106 106 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_CIDR_IP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
107 107 | ::aws_smithy_schema::ShapeId::from_static(
|
108 108 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$CidrIp",
|
109 109 | "com.amazonaws.ec2.synthetic",
|
110 110 | "AuthorizeSecurityGroupIngressInput",
|
111 111 | ),
|
112 112 | ::aws_smithy_schema::ShapeType::String,
|
113 - | "cidr_ip",
|
113 + | "CidrIp",
|
114 114 | 0,
|
115 115 | );
|
116 116 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_FROM_PORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
117 117 | ::aws_smithy_schema::ShapeId::from_static(
|
118 118 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$FromPort",
|
119 119 | "com.amazonaws.ec2.synthetic",
|
120 120 | "AuthorizeSecurityGroupIngressInput",
|
121 121 | ),
|
122 122 | ::aws_smithy_schema::ShapeType::Integer,
|
123 - | "from_port",
|
123 + | "FromPort",
|
124 124 | 1,
|
125 125 | );
|
126 126 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_GROUP_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
127 127 | ::aws_smithy_schema::ShapeId::from_static(
|
128 128 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$GroupId",
|
129 129 | "com.amazonaws.ec2.synthetic",
|
130 130 | "AuthorizeSecurityGroupIngressInput",
|
131 131 | ),
|
132 132 | ::aws_smithy_schema::ShapeType::String,
|
133 - | "group_id",
|
133 + | "GroupId",
|
134 134 | 2,
|
135 135 | );
|
136 136 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
137 137 | ::aws_smithy_schema::ShapeId::from_static(
|
138 138 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$GroupName",
|
139 139 | "com.amazonaws.ec2.synthetic",
|
140 140 | "AuthorizeSecurityGroupIngressInput",
|
141 141 | ),
|
142 142 | ::aws_smithy_schema::ShapeType::String,
|
143 - | "group_name",
|
143 + | "GroupName",
|
144 144 | 3,
|
145 145 | );
|
146 146 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_IP_PERMISSIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
147 147 | ::aws_smithy_schema::ShapeId::from_static(
|
148 148 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$IpPermissions",
|
149 149 | "com.amazonaws.ec2.synthetic",
|
150 150 | "AuthorizeSecurityGroupIngressInput",
|
151 151 | ),
|
152 152 | ::aws_smithy_schema::ShapeType::List,
|
153 - | "ip_permissions",
|
153 + | "IpPermissions",
|
154 154 | 4,
|
155 155 | );
|
156 156 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_IP_PROTOCOL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
157 157 | ::aws_smithy_schema::ShapeId::from_static(
|
158 158 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$IpProtocol",
|
159 159 | "com.amazonaws.ec2.synthetic",
|
160 160 | "AuthorizeSecurityGroupIngressInput",
|
161 161 | ),
|
162 162 | ::aws_smithy_schema::ShapeType::String,
|
163 - | "ip_protocol",
|
163 + | "IpProtocol",
|
164 164 | 5,
|
165 165 | );
|
166 166 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_SOURCE_SECURITY_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
167 167 | ::aws_smithy_schema::ShapeId::from_static(
|
168 168 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$SourceSecurityGroupName",
|
169 169 | "com.amazonaws.ec2.synthetic",
|
170 170 | "AuthorizeSecurityGroupIngressInput",
|
171 171 | ),
|
172 172 | ::aws_smithy_schema::ShapeType::String,
|
173 - | "source_security_group_name",
|
173 + | "SourceSecurityGroupName",
|
174 174 | 6,
|
175 175 | );
|
176 176 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_SOURCE_SECURITY_GROUP_OWNER_ID: ::aws_smithy_schema::Schema =
|
177 177 | ::aws_smithy_schema::Schema::new_member(
|
178 178 | ::aws_smithy_schema::ShapeId::from_static(
|
179 179 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$SourceSecurityGroupOwnerId",
|
180 180 | "com.amazonaws.ec2.synthetic",
|
181 181 | "AuthorizeSecurityGroupIngressInput",
|
182 182 | ),
|
183 183 | ::aws_smithy_schema::ShapeType::String,
|
184 - | "source_security_group_owner_id",
|
184 + | "SourceSecurityGroupOwnerId",
|
185 185 | 7,
|
186 186 | );
|
187 187 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_TO_PORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
188 188 | ::aws_smithy_schema::ShapeId::from_static(
|
189 189 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$ToPort",
|
190 190 | "com.amazonaws.ec2.synthetic",
|
191 191 | "AuthorizeSecurityGroupIngressInput",
|
192 192 | ),
|
193 193 | ::aws_smithy_schema::ShapeType::Integer,
|
194 - | "to_port",
|
194 + | "ToPort",
|
195 195 | 8,
|
196 196 | );
|
197 197 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_TAG_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
198 198 | ::aws_smithy_schema::ShapeId::from_static(
|
199 199 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$TagSpecifications",
|
200 200 | "com.amazonaws.ec2.synthetic",
|
201 201 | "AuthorizeSecurityGroupIngressInput",
|
202 202 | ),
|
203 203 | ::aws_smithy_schema::ShapeType::List,
|
204 - | "tag_specifications",
|
204 + | "TagSpecifications",
|
205 205 | 9,
|
206 206 | )
|
207 207 | .with_xml_name("TagSpecification");
|
208 208 | static AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
209 209 | ::aws_smithy_schema::ShapeId::from_static(
|
210 210 | "com.amazonaws.ec2.synthetic#AuthorizeSecurityGroupIngressInput$DryRun",
|
211 211 | "com.amazonaws.ec2.synthetic",
|
212 212 | "AuthorizeSecurityGroupIngressInput",
|
213 213 | ),
|
214 214 | ::aws_smithy_schema::ShapeType::Boolean,
|
215 - | "dry_run",
|
215 + | "DryRun",
|
216 216 | 10,
|
217 217 | )
|
218 218 | .with_xml_name("dryRun");
|
219 219 | static AUTHORIZESECURITYGROUPINGRESSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
220 220 | AUTHORIZESECURITYGROUPINGRESSINPUT_SCHEMA_ID,
|
221 221 | ::aws_smithy_schema::ShapeType::Structure,
|
222 222 | &[
|
223 223 | &AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_CIDR_IP,
|
224 224 | &AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_FROM_PORT,
|
225 225 | &AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_GROUP_ID,
|
290 290 | )?;
|
291 291 | }
|
292 292 | if let Some(ref val) = self.dry_run {
|
293 293 | ser.write_boolean(&AUTHORIZESECURITYGROUPINGRESSINPUT_MEMBER_DRY_RUN, *val)?;
|
294 294 | }
|
295 295 | Ok(())
|
296 296 | }
|
297 297 | }
|
298 298 | impl AuthorizeSecurityGroupIngressInput {
|
299 299 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
300 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
301 - | deserializer: &mut D,
|
300 + | pub fn deserialize(
|
301 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
302 302 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
303 303 | #[allow(unused_variables, unused_mut)]
|
304 304 | let mut builder = Self::builder();
|
305 305 | #[allow(
|
306 306 | unused_variables,
|
307 307 | unreachable_code,
|
308 308 | clippy::single_match,
|
309 309 | clippy::match_single_binding,
|
310 310 | clippy::diverging_sub_expression
|
311 311 | )]
|
312 - | deserializer.read_struct(&AUTHORIZESECURITYGROUPINGRESSINPUT_SCHEMA, (), |_, member, deser| {
|
312 + | deserializer.read_struct(&AUTHORIZESECURITYGROUPINGRESSINPUT_SCHEMA, &mut |member, deser| {
|
313 313 | match member.member_index() {
|
314 314 | Some(0) => {
|
315 315 | builder.cidr_ip = Some(deser.read_string(member)?);
|
316 316 | }
|
317 317 | Some(1) => {
|
318 318 | builder.from_port = Some(deser.read_integer(member)?);
|
319 319 | }
|
320 320 | Some(2) => {
|
321 321 | builder.group_id = Some(deser.read_string(member)?);
|
322 322 | }
|
323 323 | Some(3) => {
|
324 324 | builder.group_name = Some(deser.read_string(member)?);
|
325 325 | }
|
326 326 | Some(4) => {
|
327 327 | builder.ip_permissions = Some({
|
328 - | let container = if let Some(cap) = deser.container_size() {
|
329 - | Vec::with_capacity(cap)
|
330 - | } else {
|
331 - | Vec::new()
|
332 - | };
|
333 - | deser.read_list(member, container, |mut list, deser| {
|
334 - | list.push(crate::types::IpPermission::deserialize(deser)?);
|
335 - | Ok(list)
|
336 - | })?
|
328 + | let mut container = Vec::new();
|
329 + | deser.read_list(member, &mut |deser| {
|
330 + | container.push(crate::types::IpPermission::deserialize(deser)?);
|
331 + | Ok(())
|
332 + | })?;
|
333 + | container
|
337 334 | });
|
338 335 | }
|
339 336 | Some(5) => {
|
340 337 | builder.ip_protocol = Some(deser.read_string(member)?);
|
341 338 | }
|
342 339 | Some(6) => {
|
343 340 | builder.source_security_group_name = Some(deser.read_string(member)?);
|
344 341 | }
|
345 342 | Some(7) => {
|
346 343 | builder.source_security_group_owner_id = Some(deser.read_string(member)?);
|
347 344 | }
|
348 345 | Some(8) => {
|
349 346 | builder.to_port = Some(deser.read_integer(member)?);
|
350 347 | }
|
351 348 | Some(9) => {
|
352 349 | builder.tag_specifications = Some({
|
353 - | let container = if let Some(cap) = deser.container_size() {
|
354 - | Vec::with_capacity(cap)
|
355 - | } else {
|
356 - | Vec::new()
|
357 - | };
|
358 - | deser.read_list(member, container, |mut list, deser| {
|
359 - | list.push(crate::types::TagSpecification::deserialize(deser)?);
|
360 - | Ok(list)
|
361 - | })?
|
350 + | let mut container = Vec::new();
|
351 + | deser.read_list(member, &mut |deser| {
|
352 + | container.push(crate::types::TagSpecification::deserialize(deser)?);
|
353 + | Ok(())
|
354 + | })?;
|
355 + | container
|
362 356 | });
|
363 357 | }
|
364 358 | Some(10) => {
|
365 359 | builder.dry_run = Some(deser.read_boolean(member)?);
|
366 360 | }
|
367 361 | _ => {}
|
368 362 | }
|
369 363 | Ok(())
|
370 364 | })?;
|
371 365 | builder
|
372 366 | .build()
|
373 367 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
374 368 | }
|
375 369 | }
|
370 + | impl AuthorizeSecurityGroupIngressInput {
|
371 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
372 + | pub fn deserialize_with_response(
|
373 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
374 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
375 + | _status: u16,
|
376 + | _body: &[u8],
|
377 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
378 + | Self::deserialize(deserializer)
|
379 + | }
|
380 + | }
|
376 381 | impl AuthorizeSecurityGroupIngressInput {
|
377 382 | /// Creates a new builder-style object to manufacture [`AuthorizeSecurityGroupIngressInput`](crate::operation::authorize_security_group_ingress::AuthorizeSecurityGroupIngressInput).
|
378 383 | pub fn builder() -> crate::operation::authorize_security_group_ingress::builders::AuthorizeSecurityGroupIngressInputBuilder {
|
379 384 | crate::operation::authorize_security_group_ingress::builders::AuthorizeSecurityGroupIngressInputBuilder::default()
|
380 385 | }
|
381 386 | }
|
382 387 |
|
383 388 | /// A builder for [`AuthorizeSecurityGroupIngressInput`](crate::operation::authorize_security_group_ingress::AuthorizeSecurityGroupIngressInput).
|
384 389 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
385 390 | #[non_exhaustive]
|
386 391 | pub struct AuthorizeSecurityGroupIngressInputBuilder {
|
387 392 | pub(crate) cidr_ip: ::std::option::Option<::std::string::String>,
|
388 393 | pub(crate) from_port: ::std::option::Option<i32>,
|
389 394 | pub(crate) group_id: ::std::option::Option<::std::string::String>,
|
390 395 | pub(crate) group_name: ::std::option::Option<::std::string::String>,
|
391 396 | pub(crate) ip_permissions: ::std::option::Option<::std::vec::Vec<crate::types::IpPermission>>,
|
392 397 | pub(crate) ip_protocol: ::std::option::Option<::std::string::String>,
|
393 398 | pub(crate) source_security_group_name: ::std::option::Option<::std::string::String>,
|
394 399 | pub(crate) source_security_group_owner_id: ::std::option::Option<::std::string::String>,
|
395 400 | pub(crate) to_port: ::std::option::Option<i32>,
|
396 401 | pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
|
397 402 | pub(crate) dry_run: ::std::option::Option<bool>,
|
398 403 | }
|
399 404 | impl AuthorizeSecurityGroupIngressInputBuilder {
|
400 405 | /// <p>The IPv4 address range, in CIDR format.</p><note>
|
401 406 | /// <p>Amazon Web Services <a href="https://en.wikipedia.org/wiki/Canonicalization">canonicalizes</a> IPv4 and IPv6 CIDRs. For example, if you specify 100.68.0.18/18 for the CIDR block, Amazon Web Services canonicalizes the CIDR block to 100.68.0.0/18. Any subsequent DescribeSecurityGroups and DescribeSecurityGroupRules calls will return the canonicalized form of the CIDR block. Additionally, if you attempt to add another rule with the non-canonical form of the CIDR (such as 100.68.0.18/18) and there is already a rule for the canonicalized form of the CIDR block (such as 100.68.0.0/18), the API throws an duplicate rule error.</p>
|
402 407 | /// </note>
|
403 408 | /// <p>To specify an IPv6 address range, use IP permissions instead.</p>
|
404 409 | /// <p>To specify multiple rules and descriptions for the rules, use IP permissions instead.</p>
|
405 410 | pub fn cidr_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|