31 31 | "com.amazonaws.ec2.synthetic",
|
32 32 | "RejectVpcEndpointConnectionsInput",
|
33 33 | );
|
34 34 | static REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
35 35 | ::aws_smithy_schema::ShapeId::from_static(
|
36 36 | "com.amazonaws.ec2.synthetic#RejectVpcEndpointConnectionsInput$DryRun",
|
37 37 | "com.amazonaws.ec2.synthetic",
|
38 38 | "RejectVpcEndpointConnectionsInput",
|
39 39 | ),
|
40 40 | ::aws_smithy_schema::ShapeType::Boolean,
|
41 - | "dry_run",
|
41 + | "DryRun",
|
42 42 | 0,
|
43 43 | );
|
44 44 | static REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_SERVICE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
45 45 | ::aws_smithy_schema::ShapeId::from_static(
|
46 46 | "com.amazonaws.ec2.synthetic#RejectVpcEndpointConnectionsInput$ServiceId",
|
47 47 | "com.amazonaws.ec2.synthetic",
|
48 48 | "RejectVpcEndpointConnectionsInput",
|
49 49 | ),
|
50 50 | ::aws_smithy_schema::ShapeType::String,
|
51 - | "service_id",
|
51 + | "ServiceId",
|
52 52 | 1,
|
53 53 | );
|
54 54 | static REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_VPC_ENDPOINT_IDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
55 55 | ::aws_smithy_schema::ShapeId::from_static(
|
56 56 | "com.amazonaws.ec2.synthetic#RejectVpcEndpointConnectionsInput$VpcEndpointIds",
|
57 57 | "com.amazonaws.ec2.synthetic",
|
58 58 | "RejectVpcEndpointConnectionsInput",
|
59 59 | ),
|
60 60 | ::aws_smithy_schema::ShapeType::List,
|
61 - | "vpc_endpoint_ids",
|
61 + | "VpcEndpointIds",
|
62 62 | 2,
|
63 63 | )
|
64 64 | .with_xml_name("VpcEndpointId");
|
65 65 | static REJECTVPCENDPOINTCONNECTIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
66 66 | REJECTVPCENDPOINTCONNECTIONSINPUT_SCHEMA_ID,
|
67 67 | ::aws_smithy_schema::ShapeType::Structure,
|
68 68 | &[
|
69 69 | &REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_DRY_RUN,
|
70 70 | &REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_SERVICE_ID,
|
71 71 | &REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_VPC_ENDPOINT_IDS,
|
72 72 | ],
|
73 73 | );
|
74 74 | impl RejectVpcEndpointConnectionsInput {
|
75 75 | /// The schema for this shape.
|
76 76 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REJECTVPCENDPOINTCONNECTIONSINPUT_SCHEMA;
|
77 77 | }
|
78 78 | impl ::aws_smithy_schema::serde::SerializableStruct for RejectVpcEndpointConnectionsInput {
|
79 79 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
80 80 | fn serialize_members(
|
81 81 | &self,
|
82 82 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
83 83 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
84 84 | if let Some(ref val) = self.dry_run {
|
85 85 | ser.write_boolean(&REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_DRY_RUN, *val)?;
|
86 86 | }
|
87 87 | if let Some(ref val) = self.service_id {
|
88 88 | ser.write_string(&REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_SERVICE_ID, val)?;
|
89 89 | }
|
90 90 | if let Some(ref val) = self.vpc_endpoint_ids {
|
91 91 | ser.write_list(
|
92 92 | &REJECTVPCENDPOINTCONNECTIONSINPUT_MEMBER_VPC_ENDPOINT_IDS,
|
93 93 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
94 94 | for item in val {
|
95 95 | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
96 96 | }
|
97 97 | Ok(())
|
98 98 | },
|
99 99 | )?;
|
100 100 | }
|
101 101 | Ok(())
|
102 102 | }
|
103 103 | }
|
104 104 | impl RejectVpcEndpointConnectionsInput {
|
105 105 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
106 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
107 - | deserializer: &mut D,
|
106 + | pub fn deserialize(
|
107 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
108 108 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
109 109 | #[allow(unused_variables, unused_mut)]
|
110 110 | let mut builder = Self::builder();
|
111 111 | #[allow(
|
112 112 | unused_variables,
|
113 113 | unreachable_code,
|
114 114 | clippy::single_match,
|
115 115 | clippy::match_single_binding,
|
116 116 | clippy::diverging_sub_expression
|
117 117 | )]
|
118 - | deserializer.read_struct(&REJECTVPCENDPOINTCONNECTIONSINPUT_SCHEMA, (), |_, member, deser| {
|
118 + | deserializer.read_struct(&REJECTVPCENDPOINTCONNECTIONSINPUT_SCHEMA, &mut |member, deser| {
|
119 119 | match member.member_index() {
|
120 120 | Some(0) => {
|
121 121 | builder.dry_run = Some(deser.read_boolean(member)?);
|
122 122 | }
|
123 123 | Some(1) => {
|
124 124 | builder.service_id = Some(deser.read_string(member)?);
|
125 125 | }
|
126 126 | Some(2) => {
|
127 - | builder.vpc_endpoint_ids = Some({
|
128 - | let container = if let Some(cap) = deser.container_size() {
|
129 - | Vec::with_capacity(cap)
|
130 - | } else {
|
131 - | Vec::new()
|
132 - | };
|
133 - | deser.read_list(member, container, |mut list, deser| {
|
134 - | list.push(deser.read_string(member)?);
|
135 - | Ok(list)
|
136 - | })?
|
137 - | });
|
127 + | builder.vpc_endpoint_ids = Some(deser.read_string_list(member)?);
|
138 128 | }
|
139 129 | _ => {}
|
140 130 | }
|
141 131 | Ok(())
|
142 132 | })?;
|
133 + | builder.service_id = builder.service_id.or(Some(String::new()));
|
134 + | builder.vpc_endpoint_ids = builder.vpc_endpoint_ids.or(Some(Vec::new()));
|
143 135 | builder
|
144 136 | .build()
|
145 137 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
146 138 | }
|
147 139 | }
|
140 + | impl RejectVpcEndpointConnectionsInput {
|
141 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
142 + | pub fn deserialize_with_response(
|
143 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
144 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
145 + | _status: u16,
|
146 + | _body: &[u8],
|
147 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
148 + | Self::deserialize(deserializer)
|
149 + | }
|
150 + | }
|
148 151 | impl RejectVpcEndpointConnectionsInput {
|
149 152 | /// Creates a new builder-style object to manufacture [`RejectVpcEndpointConnectionsInput`](crate::operation::reject_vpc_endpoint_connections::RejectVpcEndpointConnectionsInput).
|
150 153 | pub fn builder() -> crate::operation::reject_vpc_endpoint_connections::builders::RejectVpcEndpointConnectionsInputBuilder {
|
151 154 | crate::operation::reject_vpc_endpoint_connections::builders::RejectVpcEndpointConnectionsInputBuilder::default()
|
152 155 | }
|
153 156 | }
|
154 157 |
|
155 158 | /// A builder for [`RejectVpcEndpointConnectionsInput`](crate::operation::reject_vpc_endpoint_connections::RejectVpcEndpointConnectionsInput).
|
156 159 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
157 160 | #[non_exhaustive]
|
158 161 | pub struct RejectVpcEndpointConnectionsInputBuilder {
|
159 162 | pub(crate) dry_run: ::std::option::Option<bool>,
|
160 163 | pub(crate) service_id: ::std::option::Option<::std::string::String>,
|
161 164 | pub(crate) vpc_endpoint_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
162 165 | }
|
163 166 | impl RejectVpcEndpointConnectionsInputBuilder {
|
164 167 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
165 168 | pub fn dry_run(mut self, input: bool) -> Self {
|
166 169 | self.dry_run = ::std::option::Option::Some(input);
|
167 170 | self
|
168 171 | }
|
169 172 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
170 173 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
171 174 | self.dry_run = input;
|
172 175 | self
|
173 176 | }
|
174 177 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
175 178 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|
176 179 | &self.dry_run
|
177 180 | }
|