aws_sdk_ec2/operation/describe_mac_hosts/
builders.rs1pub use crate::operation::describe_mac_hosts::_describe_mac_hosts_output::DescribeMacHostsOutputBuilder;
3
4pub use crate::operation::describe_mac_hosts::_describe_mac_hosts_input::DescribeMacHostsInputBuilder;
5
6impl crate::operation::describe_mac_hosts::builders::DescribeMacHostsInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::describe_mac_hosts::DescribeMacHostsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_mac_hosts::DescribeMacHostsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_mac_hosts();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeMacHostsFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::describe_mac_hosts::builders::DescribeMacHostsInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::describe_mac_hosts::DescribeMacHostsOutput,
35 crate::operation::describe_mac_hosts::DescribeMacHostsError,
36 > for DescribeMacHostsFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::describe_mac_hosts::DescribeMacHostsOutput,
44 crate::operation::describe_mac_hosts::DescribeMacHostsError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl DescribeMacHostsFluentBuilder {
51 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 pub fn as_input(&self) -> &crate::operation::describe_mac_hosts::builders::DescribeMacHostsInputBuilder {
61 &self.inner
62 }
63 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::describe_mac_hosts::DescribeMacHostsOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::describe_mac_hosts::DescribeMacHostsError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::describe_mac_hosts::DescribeMacHosts::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::describe_mac_hosts::DescribeMacHosts::orchestrate(&runtime_plugins, input).await
90 }
91
92 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::describe_mac_hosts::DescribeMacHostsOutput,
97 crate::operation::describe_mac_hosts::DescribeMacHostsError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 pub fn into_paginator(self) -> crate::operation::describe_mac_hosts::paginator::DescribeMacHostsPaginator {
115 crate::operation::describe_mac_hosts::paginator::DescribeMacHostsPaginator::new(self.handle, self.inner)
116 }
117 pub fn filters(mut self, input: crate::types::Filter) -> Self {
130 self.inner = self.inner.filters(input);
131 self
132 }
133 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
141 self.inner = self.inner.set_filters(input);
142 self
143 }
144 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
152 self.inner.get_filters()
153 }
154 pub fn host_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.host_ids(input.into());
162 self
163 }
164 pub fn set_host_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
166 self.inner = self.inner.set_host_ids(input);
167 self
168 }
169 pub fn get_host_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
171 self.inner.get_host_ids()
172 }
173 pub fn max_results(mut self, input: i32) -> Self {
175 self.inner = self.inner.max_results(input);
176 self
177 }
178 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
180 self.inner = self.inner.set_max_results(input);
181 self
182 }
183 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
185 self.inner.get_max_results()
186 }
187 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.inner = self.inner.next_token(input.into());
190 self
191 }
192 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.inner = self.inner.set_next_token(input);
195 self
196 }
197 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
199 self.inner.get_next_token()
200 }
201}