aws_sdk_ec2/operation/create_route/
builders.rs1pub use crate::operation::create_route::_create_route_output::CreateRouteOutputBuilder;
3
4pub use crate::operation::create_route::_create_route_input::CreateRouteInputBuilder;
5
6impl crate::operation::create_route::builders::CreateRouteInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_route::CreateRouteOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_route::CreateRouteError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_route();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
37pub struct CreateRouteFluentBuilder {
38 handle: ::std::sync::Arc<crate::client::Handle>,
39 inner: crate::operation::create_route::builders::CreateRouteInputBuilder,
40 config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43 crate::client::customize::internal::CustomizableSend<
44 crate::operation::create_route::CreateRouteOutput,
45 crate::operation::create_route::CreateRouteError,
46 > for CreateRouteFluentBuilder
47{
48 fn send(
49 self,
50 config_override: crate::config::Builder,
51 ) -> crate::client::customize::internal::BoxFuture<
52 crate::client::customize::internal::SendResult<
53 crate::operation::create_route::CreateRouteOutput,
54 crate::operation::create_route::CreateRouteError,
55 >,
56 > {
57 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58 }
59}
60impl CreateRouteFluentBuilder {
61 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63 Self {
64 handle,
65 inner: ::std::default::Default::default(),
66 config_override: ::std::option::Option::None,
67 }
68 }
69 pub fn as_input(&self) -> &crate::operation::create_route::builders::CreateRouteInputBuilder {
71 &self.inner
72 }
73 pub async fn send(
82 self,
83 ) -> ::std::result::Result<
84 crate::operation::create_route::CreateRouteOutput,
85 ::aws_smithy_runtime_api::client::result::SdkError<
86 crate::operation::create_route::CreateRouteError,
87 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
88 >,
89 > {
90 let input = self
91 .inner
92 .build()
93 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
94 let runtime_plugins = crate::operation::create_route::CreateRoute::operation_runtime_plugins(
95 self.handle.runtime_plugins.clone(),
96 &self.handle.conf,
97 self.config_override,
98 );
99 crate::operation::create_route::CreateRoute::orchestrate(&runtime_plugins, input).await
100 }
101
102 pub fn customize(
104 self,
105 ) -> crate::client::customize::CustomizableOperation<
106 crate::operation::create_route::CreateRouteOutput,
107 crate::operation::create_route::CreateRouteError,
108 Self,
109 > {
110 crate::client::customize::CustomizableOperation::new(self)
111 }
112 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
113 self.set_config_override(::std::option::Option::Some(config_override.into()));
114 self
115 }
116
117 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
118 self.config_override = config_override;
119 self
120 }
121 pub fn destination_prefix_list_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.destination_prefix_list_id(input.into());
124 self
125 }
126 pub fn set_destination_prefix_list_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.inner = self.inner.set_destination_prefix_list_id(input);
129 self
130 }
131 pub fn get_destination_prefix_list_id(&self) -> &::std::option::Option<::std::string::String> {
133 self.inner.get_destination_prefix_list_id()
134 }
135 pub fn vpc_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.inner = self.inner.vpc_endpoint_id(input.into());
138 self
139 }
140 pub fn set_vpc_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.inner = self.inner.set_vpc_endpoint_id(input);
143 self
144 }
145 pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
147 self.inner.get_vpc_endpoint_id()
148 }
149 pub fn transit_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.inner = self.inner.transit_gateway_id(input.into());
152 self
153 }
154 pub fn set_transit_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.inner = self.inner.set_transit_gateway_id(input);
157 self
158 }
159 pub fn get_transit_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
161 self.inner.get_transit_gateway_id()
162 }
163 pub fn local_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.inner = self.inner.local_gateway_id(input.into());
166 self
167 }
168 pub fn set_local_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.inner = self.inner.set_local_gateway_id(input);
171 self
172 }
173 pub fn get_local_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
175 self.inner.get_local_gateway_id()
176 }
177 pub fn carrier_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180 self.inner = self.inner.carrier_gateway_id(input.into());
181 self
182 }
183 pub fn set_carrier_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_carrier_gateway_id(input);
187 self
188 }
189 pub fn get_carrier_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
192 self.inner.get_carrier_gateway_id()
193 }
194 pub fn core_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196 self.inner = self.inner.core_network_arn(input.into());
197 self
198 }
199 pub fn set_core_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201 self.inner = self.inner.set_core_network_arn(input);
202 self
203 }
204 pub fn get_core_network_arn(&self) -> &::std::option::Option<::std::string::String> {
206 self.inner.get_core_network_arn()
207 }
208 pub fn odb_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210 self.inner = self.inner.odb_network_arn(input.into());
211 self
212 }
213 pub fn set_odb_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215 self.inner = self.inner.set_odb_network_arn(input);
216 self
217 }
218 pub fn get_odb_network_arn(&self) -> &::std::option::Option<::std::string::String> {
220 self.inner.get_odb_network_arn()
221 }
222 pub fn dry_run(mut self, input: bool) -> Self {
224 self.inner = self.inner.dry_run(input);
225 self
226 }
227 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
229 self.inner = self.inner.set_dry_run(input);
230 self
231 }
232 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
234 self.inner.get_dry_run()
235 }
236 pub fn route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.inner = self.inner.route_table_id(input.into());
239 self
240 }
241 pub fn set_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.inner = self.inner.set_route_table_id(input);
244 self
245 }
246 pub fn get_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
248 self.inner.get_route_table_id()
249 }
250 pub fn destination_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252 self.inner = self.inner.destination_cidr_block(input.into());
253 self
254 }
255 pub fn set_destination_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257 self.inner = self.inner.set_destination_cidr_block(input);
258 self
259 }
260 pub fn get_destination_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
262 self.inner.get_destination_cidr_block()
263 }
264 pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266 self.inner = self.inner.gateway_id(input.into());
267 self
268 }
269 pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
271 self.inner = self.inner.set_gateway_id(input);
272 self
273 }
274 pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
276 self.inner.get_gateway_id()
277 }
278 pub fn destination_ipv6_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
280 self.inner = self.inner.destination_ipv6_cidr_block(input.into());
281 self
282 }
283 pub fn set_destination_ipv6_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
285 self.inner = self.inner.set_destination_ipv6_cidr_block(input);
286 self
287 }
288 pub fn get_destination_ipv6_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
290 self.inner.get_destination_ipv6_cidr_block()
291 }
292 pub fn egress_only_internet_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
294 self.inner = self.inner.egress_only_internet_gateway_id(input.into());
295 self
296 }
297 pub fn set_egress_only_internet_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
299 self.inner = self.inner.set_egress_only_internet_gateway_id(input);
300 self
301 }
302 pub fn get_egress_only_internet_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
304 self.inner.get_egress_only_internet_gateway_id()
305 }
306 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308 self.inner = self.inner.instance_id(input.into());
309 self
310 }
311 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.inner = self.inner.set_instance_id(input);
314 self
315 }
316 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
318 self.inner.get_instance_id()
319 }
320 pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322 self.inner = self.inner.network_interface_id(input.into());
323 self
324 }
325 pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327 self.inner = self.inner.set_network_interface_id(input);
328 self
329 }
330 pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
332 self.inner.get_network_interface_id()
333 }
334 pub fn vpc_peering_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336 self.inner = self.inner.vpc_peering_connection_id(input.into());
337 self
338 }
339 pub fn set_vpc_peering_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
341 self.inner = self.inner.set_vpc_peering_connection_id(input);
342 self
343 }
344 pub fn get_vpc_peering_connection_id(&self) -> &::std::option::Option<::std::string::String> {
346 self.inner.get_vpc_peering_connection_id()
347 }
348 pub fn nat_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350 self.inner = self.inner.nat_gateway_id(input.into());
351 self
352 }
353 pub fn set_nat_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
355 self.inner = self.inner.set_nat_gateway_id(input);
356 self
357 }
358 pub fn get_nat_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
360 self.inner.get_nat_gateway_id()
361 }
362}