aws_sdk_ec2/operation/create_transit_gateway_peering_attachment/
builders.rs1pub use crate::operation::create_transit_gateway_peering_attachment::_create_transit_gateway_peering_attachment_output::CreateTransitGatewayPeeringAttachmentOutputBuilder;
3
4pub use crate::operation::create_transit_gateway_peering_attachment::_create_transit_gateway_peering_attachment_input::CreateTransitGatewayPeeringAttachmentInputBuilder;
5
6impl crate::operation::create_transit_gateway_peering_attachment::builders::CreateTransitGatewayPeeringAttachmentInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_transit_gateway_peering_attachment();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateTransitGatewayPeeringAttachmentFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_transit_gateway_peering_attachment::builders::CreateTransitGatewayPeeringAttachmentInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentOutput,
36 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentError,
37 > for CreateTransitGatewayPeeringAttachmentFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentOutput,
45 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreateTransitGatewayPeeringAttachmentFluentBuilder {
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 pub fn as_input(
62 &self,
63 ) -> &crate::operation::create_transit_gateway_peering_attachment::builders::CreateTransitGatewayPeeringAttachmentInputBuilder {
64 &self.inner
65 }
66 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins =
88 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachment::operation_runtime_plugins(
89 self.handle.runtime_plugins.clone(),
90 &self.handle.conf,
91 self.config_override,
92 );
93 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachment::orchestrate(&runtime_plugins, input).await
94 }
95
96 pub fn customize(
98 self,
99 ) -> crate::client::customize::CustomizableOperation<
100 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentOutput,
101 crate::operation::create_transit_gateway_peering_attachment::CreateTransitGatewayPeeringAttachmentError,
102 Self,
103 > {
104 crate::client::customize::CustomizableOperation::new(self)
105 }
106 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107 self.set_config_override(::std::option::Option::Some(config_override.into()));
108 self
109 }
110
111 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112 self.config_override = config_override;
113 self
114 }
115 pub fn transit_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.inner = self.inner.transit_gateway_id(input.into());
118 self
119 }
120 pub fn set_transit_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.inner = self.inner.set_transit_gateway_id(input);
123 self
124 }
125 pub fn get_transit_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
127 self.inner.get_transit_gateway_id()
128 }
129 pub fn peer_transit_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.inner = self.inner.peer_transit_gateway_id(input.into());
132 self
133 }
134 pub fn set_peer_transit_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.inner = self.inner.set_peer_transit_gateway_id(input);
137 self
138 }
139 pub fn get_peer_transit_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
141 self.inner.get_peer_transit_gateway_id()
142 }
143 pub fn peer_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.inner = self.inner.peer_account_id(input.into());
146 self
147 }
148 pub fn set_peer_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.inner = self.inner.set_peer_account_id(input);
151 self
152 }
153 pub fn get_peer_account_id(&self) -> &::std::option::Option<::std::string::String> {
155 self.inner.get_peer_account_id()
156 }
157 pub fn peer_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.inner = self.inner.peer_region(input.into());
160 self
161 }
162 pub fn set_peer_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.inner = self.inner.set_peer_region(input);
165 self
166 }
167 pub fn get_peer_region(&self) -> &::std::option::Option<::std::string::String> {
169 self.inner.get_peer_region()
170 }
171 pub fn options(mut self, input: crate::types::CreateTransitGatewayPeeringAttachmentRequestOptions) -> Self {
173 self.inner = self.inner.options(input);
174 self
175 }
176 pub fn set_options(mut self, input: ::std::option::Option<crate::types::CreateTransitGatewayPeeringAttachmentRequestOptions>) -> Self {
178 self.inner = self.inner.set_options(input);
179 self
180 }
181 pub fn get_options(&self) -> &::std::option::Option<crate::types::CreateTransitGatewayPeeringAttachmentRequestOptions> {
183 self.inner.get_options()
184 }
185 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
192 self.inner = self.inner.tag_specifications(input);
193 self
194 }
195 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
197 self.inner = self.inner.set_tag_specifications(input);
198 self
199 }
200 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
202 self.inner.get_tag_specifications()
203 }
204 pub fn dry_run(mut self, input: bool) -> Self {
206 self.inner = self.inner.dry_run(input);
207 self
208 }
209 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
211 self.inner = self.inner.set_dry_run(input);
212 self
213 }
214 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
216 self.inner.get_dry_run()
217 }
218}