4 4 | #[non_exhaustive]
|
5 5 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 6 | pub struct DeleteVpcAssociationAuthorizationInput {
|
7 7 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.</p>
|
8 8 | pub hosted_zone_id: ::std::option::Option<::std::string::String>,
|
9 9 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, a complex type that includes the ID and region of the VPC.</p>
|
10 10 | pub vpc: ::std::option::Option<crate::types::Vpc>,
|
11 11 | }
|
12 12 | impl DeleteVpcAssociationAuthorizationInput {
|
13 13 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.</p>
|
14 14 | pub fn hosted_zone_id(&self) -> ::std::option::Option<&str> {
|
15 15 | self.hosted_zone_id.as_deref()
|
16 16 | }
|
17 17 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, a complex type that includes the ID and region of the VPC.</p>
|
18 18 | pub fn vpc(&self) -> ::std::option::Option<&crate::types::Vpc> {
|
19 19 | self.vpc.as_ref()
|
20 20 | }
|
21 21 | }
|
22 22 | static DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
23 23 | "com.amazonaws.route53.synthetic#DeleteVPCAssociationAuthorizationInput",
|
24 24 | "com.amazonaws.route53.synthetic",
|
25 25 | "DeleteVPCAssociationAuthorizationInput",
|
26 26 | );
|
27 27 | static DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_MEMBER_HOSTED_ZONE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
28 28 | ::aws_smithy_schema::ShapeId::from_static(
|
29 29 | "com.amazonaws.route53.synthetic#DeleteVPCAssociationAuthorizationInput$HostedZoneId",
|
30 30 | "com.amazonaws.route53.synthetic",
|
31 31 | "DeleteVPCAssociationAuthorizationInput",
|
32 32 | ),
|
33 33 | ::aws_smithy_schema::ShapeType::String,
|
34 - | "hosted_zone_id",
|
34 + | "HostedZoneId",
|
35 35 | 0,
|
36 36 | )
|
37 37 | .with_http_label();
|
38 38 | static DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_MEMBER_VPC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
39 39 | ::aws_smithy_schema::ShapeId::from_static(
|
40 40 | "com.amazonaws.route53.synthetic#DeleteVPCAssociationAuthorizationInput$VPC",
|
41 41 | "com.amazonaws.route53.synthetic",
|
42 42 | "DeleteVPCAssociationAuthorizationInput",
|
43 43 | ),
|
44 44 | ::aws_smithy_schema::ShapeType::Structure,
|
45 - | "vpc",
|
45 + | "VPC",
|
46 46 | 1,
|
47 47 | );
|
48 48 | static DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
49 49 | DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_SCHEMA_ID,
|
50 50 | ::aws_smithy_schema::ShapeType::Structure,
|
51 51 | &[
|
52 52 | &DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_MEMBER_HOSTED_ZONE_ID,
|
53 53 | &DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_MEMBER_VPC,
|
54 54 | ],
|
55 - | );
|
55 + | )
|
56 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
57 + | "POST",
|
58 + | "/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation",
|
59 + | None,
|
60 + | ));
|
56 61 | impl DeleteVpcAssociationAuthorizationInput {
|
57 62 | /// The schema for this shape.
|
58 63 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_SCHEMA;
|
59 64 | }
|
60 65 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteVpcAssociationAuthorizationInput {
|
61 66 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
62 67 | fn serialize_members(
|
63 68 | &self,
|
64 69 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
65 70 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
66 71 | if let Some(ref val) = self.hosted_zone_id {
|
67 72 | ser.write_string(&DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_MEMBER_HOSTED_ZONE_ID, val)?;
|
68 73 | }
|
69 74 | if let Some(ref val) = self.vpc {
|
70 75 | ser.write_struct(&DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_MEMBER_VPC, val)?;
|
71 76 | }
|
72 77 | Ok(())
|
73 78 | }
|
74 79 | }
|
75 80 | impl DeleteVpcAssociationAuthorizationInput {
|
76 81 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
77 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
78 - | deserializer: &mut D,
|
82 + | pub fn deserialize(
|
83 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
79 84 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
80 85 | #[allow(unused_variables, unused_mut)]
|
81 86 | let mut builder = Self::builder();
|
82 87 | #[allow(
|
83 88 | unused_variables,
|
84 89 | unreachable_code,
|
85 90 | clippy::single_match,
|
86 91 | clippy::match_single_binding,
|
87 92 | clippy::diverging_sub_expression
|
88 93 | )]
|
89 - | deserializer.read_struct(&DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_SCHEMA, (), |_, member, deser| {
|
94 + | deserializer.read_struct(&DELETEVPCASSOCIATIONAUTHORIZATIONINPUT_SCHEMA, &mut |member, deser| {
|
90 95 | match member.member_index() {
|
91 96 | Some(0) => {
|
92 97 | builder.hosted_zone_id = Some(deser.read_string(member)?);
|
93 98 | }
|
94 99 | Some(1) => {
|
95 100 | builder.vpc = Some(crate::types::Vpc::deserialize(deser)?);
|
96 101 | }
|
97 102 | _ => {}
|
98 103 | }
|
99 104 | Ok(())
|
100 105 | })?;
|
106 + | builder.hosted_zone_id = builder.hosted_zone_id.or(Some(String::new()));
|
101 107 | builder
|
102 108 | .build()
|
103 109 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
104 110 | }
|
105 111 | }
|
112 + | impl DeleteVpcAssociationAuthorizationInput {
|
113 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
114 + | pub fn deserialize_with_response(
|
115 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
116 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
117 + | _status: u16,
|
118 + | _body: &[u8],
|
119 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
120 + | Self::deserialize(deserializer)
|
121 + | }
|
122 + | }
|
106 123 | impl DeleteVpcAssociationAuthorizationInput {
|
107 124 | /// Creates a new builder-style object to manufacture [`DeleteVpcAssociationAuthorizationInput`](crate::operation::delete_vpc_association_authorization::DeleteVpcAssociationAuthorizationInput).
|
108 125 | pub fn builder() -> crate::operation::delete_vpc_association_authorization::builders::DeleteVpcAssociationAuthorizationInputBuilder {
|
109 126 | crate::operation::delete_vpc_association_authorization::builders::DeleteVpcAssociationAuthorizationInputBuilder::default()
|
110 127 | }
|
111 128 | }
|
112 129 |
|
113 130 | /// A builder for [`DeleteVpcAssociationAuthorizationInput`](crate::operation::delete_vpc_association_authorization::DeleteVpcAssociationAuthorizationInput).
|
114 131 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
115 132 | #[non_exhaustive]
|
116 133 | pub struct DeleteVpcAssociationAuthorizationInputBuilder {
|
117 134 | pub(crate) hosted_zone_id: ::std::option::Option<::std::string::String>,
|
118 135 | pub(crate) vpc: ::std::option::Option<crate::types::Vpc>,
|
119 136 | }
|
120 137 | impl DeleteVpcAssociationAuthorizationInputBuilder {
|
121 138 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.</p>
|
122 139 | /// This field is required.
|
123 140 | pub fn hosted_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
124 141 | self.hosted_zone_id = ::std::option::Option::Some(input.into());
|
125 142 | self
|
126 143 | }
|
127 144 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.</p>
|
128 145 | pub fn set_hosted_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
129 146 | self.hosted_zone_id = input;
|
130 147 | self
|
131 148 | }
|
132 149 | /// <p>When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.</p>
|
133 150 | pub fn get_hosted_zone_id(&self) -> &::std::option::Option<::std::string::String> {
|
134 151 | &self.hosted_zone_id
|
135 152 | }
|