aws_sdk_ec2/operation/associate_address/
builders.rs1pub use crate::operation::associate_address::_associate_address_output::AssociateAddressOutputBuilder;
3
4pub use crate::operation::associate_address::_associate_address_input::AssociateAddressInputBuilder;
5
6impl crate::operation::associate_address::builders::AssociateAddressInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::associate_address::AssociateAddressOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::associate_address::AssociateAddressError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.associate_address();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
32pub struct AssociateAddressFluentBuilder {
33 handle: ::std::sync::Arc<crate::client::Handle>,
34 inner: crate::operation::associate_address::builders::AssociateAddressInputBuilder,
35 config_override: ::std::option::Option<crate::config::Builder>,
36}
37impl
38 crate::client::customize::internal::CustomizableSend<
39 crate::operation::associate_address::AssociateAddressOutput,
40 crate::operation::associate_address::AssociateAddressError,
41 > for AssociateAddressFluentBuilder
42{
43 fn send(
44 self,
45 config_override: crate::config::Builder,
46 ) -> crate::client::customize::internal::BoxFuture<
47 crate::client::customize::internal::SendResult<
48 crate::operation::associate_address::AssociateAddressOutput,
49 crate::operation::associate_address::AssociateAddressError,
50 >,
51 > {
52 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
53 }
54}
55impl AssociateAddressFluentBuilder {
56 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
58 Self {
59 handle,
60 inner: ::std::default::Default::default(),
61 config_override: ::std::option::Option::None,
62 }
63 }
64 pub fn as_input(&self) -> &crate::operation::associate_address::builders::AssociateAddressInputBuilder {
66 &self.inner
67 }
68 pub async fn send(
77 self,
78 ) -> ::std::result::Result<
79 crate::operation::associate_address::AssociateAddressOutput,
80 ::aws_smithy_runtime_api::client::result::SdkError<
81 crate::operation::associate_address::AssociateAddressError,
82 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83 >,
84 > {
85 let input = self
86 .inner
87 .build()
88 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89 let runtime_plugins = crate::operation::associate_address::AssociateAddress::operation_runtime_plugins(
90 self.handle.runtime_plugins.clone(),
91 &self.handle.conf,
92 self.config_override,
93 );
94 crate::operation::associate_address::AssociateAddress::orchestrate(&runtime_plugins, input).await
95 }
96
97 pub fn customize(
99 self,
100 ) -> crate::client::customize::CustomizableOperation<
101 crate::operation::associate_address::AssociateAddressOutput,
102 crate::operation::associate_address::AssociateAddressError,
103 Self,
104 > {
105 crate::client::customize::CustomizableOperation::new(self)
106 }
107 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108 self.set_config_override(::std::option::Option::Some(config_override.into()));
109 self
110 }
111
112 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113 self.config_override = config_override;
114 self
115 }
116 pub fn allocation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.inner = self.inner.allocation_id(input.into());
119 self
120 }
121 pub fn set_allocation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.inner = self.inner.set_allocation_id(input);
124 self
125 }
126 pub fn get_allocation_id(&self) -> &::std::option::Option<::std::string::String> {
128 self.inner.get_allocation_id()
129 }
130 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.inner = self.inner.instance_id(input.into());
133 self
134 }
135 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.inner = self.inner.set_instance_id(input);
138 self
139 }
140 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
142 self.inner.get_instance_id()
143 }
144 pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.inner = self.inner.public_ip(input.into());
147 self
148 }
149 pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.inner = self.inner.set_public_ip(input);
152 self
153 }
154 pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
156 self.inner.get_public_ip()
157 }
158 pub fn dry_run(mut self, input: bool) -> Self {
160 self.inner = self.inner.dry_run(input);
161 self
162 }
163 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
165 self.inner = self.inner.set_dry_run(input);
166 self
167 }
168 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
170 self.inner.get_dry_run()
171 }
172 pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 self.inner = self.inner.network_interface_id(input.into());
176 self
177 }
178 pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.inner = self.inner.set_network_interface_id(input);
182 self
183 }
184 pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
187 self.inner.get_network_interface_id()
188 }
189 pub fn private_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191 self.inner = self.inner.private_ip_address(input.into());
192 self
193 }
194 pub fn set_private_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196 self.inner = self.inner.set_private_ip_address(input);
197 self
198 }
199 pub fn get_private_ip_address(&self) -> &::std::option::Option<::std::string::String> {
201 self.inner.get_private_ip_address()
202 }
203 pub fn allow_reassociation(mut self, input: bool) -> Self {
205 self.inner = self.inner.allow_reassociation(input);
206 self
207 }
208 pub fn set_allow_reassociation(mut self, input: ::std::option::Option<bool>) -> Self {
210 self.inner = self.inner.set_allow_reassociation(input);
211 self
212 }
213 pub fn get_allow_reassociation(&self) -> &::std::option::Option<bool> {
215 self.inner.get_allow_reassociation()
216 }
217}