aws_sdk_directconnect/operation/allocate_connection_on_interconnect/
builders.rs1pub use crate::operation::allocate_connection_on_interconnect::_allocate_connection_on_interconnect_input::AllocateConnectionOnInterconnectInputBuilder;
3
4pub use crate::operation::allocate_connection_on_interconnect::_allocate_connection_on_interconnect_output::AllocateConnectionOnInterconnectOutputBuilder;
5
6impl crate::operation::allocate_connection_on_interconnect::builders::AllocateConnectionOnInterconnectInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.allocate_connection_on_interconnect();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[deprecated]
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct AllocateConnectionOnInterconnectFluentBuilder {
35 handle: ::std::sync::Arc<crate::client::Handle>,
36 inner: crate::operation::allocate_connection_on_interconnect::builders::AllocateConnectionOnInterconnectInputBuilder,
37 config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40 crate::client::customize::internal::CustomizableSend<
41 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
42 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
43 > for AllocateConnectionOnInterconnectFluentBuilder
44{
45 fn send(
46 self,
47 config_override: crate::config::Builder,
48 ) -> crate::client::customize::internal::BoxFuture<
49 crate::client::customize::internal::SendResult<
50 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
51 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
52 >,
53 > {
54 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55 }
56}
57impl AllocateConnectionOnInterconnectFluentBuilder {
58 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60 Self {
61 handle,
62 inner: ::std::default::Default::default(),
63 config_override: ::std::option::Option::None,
64 }
65 }
66 pub fn as_input(&self) -> &crate::operation::allocate_connection_on_interconnect::builders::AllocateConnectionOnInterconnectInputBuilder {
68 &self.inner
69 }
70 pub async fn send(
79 self,
80 ) -> ::std::result::Result<
81 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
82 ::aws_smithy_runtime_api::client::result::SdkError<
83 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
84 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85 >,
86 > {
87 let input = self
88 .inner
89 .build()
90 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91 let runtime_plugins = crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnect::operation_runtime_plugins(
92 self.handle.runtime_plugins.clone(),
93 &self.handle.conf,
94 self.config_override,
95 );
96 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnect::orchestrate(&runtime_plugins, input).await
97 }
98
99 pub fn customize(
101 self,
102 ) -> crate::client::customize::CustomizableOperation<
103 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectOutput,
104 crate::operation::allocate_connection_on_interconnect::AllocateConnectionOnInterconnectError,
105 Self,
106 > {
107 crate::client::customize::CustomizableOperation::new(self)
108 }
109 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110 self.set_config_override(::std::option::Option::Some(config_override.into()));
111 self
112 }
113
114 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115 self.config_override = config_override;
116 self
117 }
118 pub fn bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.inner = self.inner.bandwidth(input.into());
121 self
122 }
123 pub fn set_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.inner = self.inner.set_bandwidth(input);
126 self
127 }
128 pub fn get_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
130 self.inner.get_bandwidth()
131 }
132 pub fn connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.connection_name(input.into());
135 self
136 }
137 pub fn set_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.inner = self.inner.set_connection_name(input);
140 self
141 }
142 pub fn get_connection_name(&self) -> &::std::option::Option<::std::string::String> {
144 self.inner.get_connection_name()
145 }
146 pub fn owner_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.inner = self.inner.owner_account(input.into());
149 self
150 }
151 pub fn set_owner_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.inner = self.inner.set_owner_account(input);
154 self
155 }
156 pub fn get_owner_account(&self) -> &::std::option::Option<::std::string::String> {
158 self.inner.get_owner_account()
159 }
160 pub fn interconnect_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.inner = self.inner.interconnect_id(input.into());
163 self
164 }
165 pub fn set_interconnect_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.inner = self.inner.set_interconnect_id(input);
168 self
169 }
170 pub fn get_interconnect_id(&self) -> &::std::option::Option<::std::string::String> {
172 self.inner.get_interconnect_id()
173 }
174 pub fn vlan(mut self, input: i32) -> Self {
176 self.inner = self.inner.vlan(input);
177 self
178 }
179 pub fn set_vlan(mut self, input: ::std::option::Option<i32>) -> Self {
181 self.inner = self.inner.set_vlan(input);
182 self
183 }
184 pub fn get_vlan(&self) -> &::std::option::Option<i32> {
186 self.inner.get_vlan()
187 }
188}