aws_sdk_support/operation/describe_trusted_advisor_check_summaries/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_trusted_advisor_check_summaries::_describe_trusted_advisor_check_summaries_output::DescribeTrustedAdvisorCheckSummariesOutputBuilder;
3
4pub use crate::operation::describe_trusted_advisor_check_summaries::_describe_trusted_advisor_check_summaries_input::DescribeTrustedAdvisorCheckSummariesInputBuilder;
5
6impl crate::operation::describe_trusted_advisor_check_summaries::builders::DescribeTrustedAdvisorCheckSummariesInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_trusted_advisor_check_summaries();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeTrustedAdvisorCheckSummaries`.
24///
25/// <p>Returns the results for the Trusted Advisor check summaries for the check IDs that you specified. You can get the check IDs by calling the <code>DescribeTrustedAdvisorChecks</code> operation.</p>
26/// <p>The response contains an array of <code>TrustedAdvisorCheckSummary</code> objects.</p><note>
27/// <ul>
28/// <li>
29/// <p>You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.</p></li>
30/// <li>
31/// <p>If you call the Amazon Web Services Support API from an account that doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">Amazon Web Services Support</a>.</p></li>
32/// </ul>
33/// </note>
34/// <p>To call the Trusted Advisor operations in the Amazon Web Services Support API, you must use the US East (N. Virginia) endpoint. Currently, the US West (Oregon) and Europe (Ireland) endpoints don't support the Trusted Advisor operations. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/about-support-api.html#endpoint">About the Amazon Web Services Support API</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
35#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct DescribeTrustedAdvisorCheckSummariesFluentBuilder {
37    handle: ::std::sync::Arc<crate::client::Handle>,
38    inner: crate::operation::describe_trusted_advisor_check_summaries::builders::DescribeTrustedAdvisorCheckSummariesInputBuilder,
39    config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42    crate::client::customize::internal::CustomizableSend<
43        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesOutput,
44        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
45    > for DescribeTrustedAdvisorCheckSummariesFluentBuilder
46{
47    fn send(
48        self,
49        config_override: crate::config::Builder,
50    ) -> crate::client::customize::internal::BoxFuture<
51        crate::client::customize::internal::SendResult<
52            crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesOutput,
53            crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
54        >,
55    > {
56        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57    }
58}
59impl DescribeTrustedAdvisorCheckSummariesFluentBuilder {
60    /// Creates a new `DescribeTrustedAdvisorCheckSummariesFluentBuilder`.
61    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62        Self {
63            handle,
64            inner: ::std::default::Default::default(),
65            config_override: ::std::option::Option::None,
66        }
67    }
68    /// Access the DescribeTrustedAdvisorCheckSummaries as a reference.
69    pub fn as_input(
70        &self,
71    ) -> &crate::operation::describe_trusted_advisor_check_summaries::builders::DescribeTrustedAdvisorCheckSummariesInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins =
96            crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummaries::operation_runtime_plugins(
97                self.handle.runtime_plugins.clone(),
98                &self.handle.conf,
99                self.config_override,
100            );
101        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummaries::orchestrate(&runtime_plugins, input).await
102    }
103
104    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105    pub fn customize(
106        self,
107    ) -> crate::client::customize::CustomizableOperation<
108        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesOutput,
109        crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
110        Self,
111    > {
112        crate::client::customize::CustomizableOperation::new(self)
113    }
114    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115        self.set_config_override(::std::option::Option::Some(config_override.into()));
116        self
117    }
118
119    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120        self.config_override = config_override;
121        self
122    }
123    ///
124    /// Appends an item to `checkIds`.
125    ///
126    /// To override the contents of this collection use [`set_check_ids`](Self::set_check_ids).
127    ///
128    /// <p>The IDs of the Trusted Advisor checks.</p>
129    pub fn check_ids(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.inner = self.inner.check_ids(input);
131        self
132    }
133    /// <p>The IDs of the Trusted Advisor checks.</p>
134    pub fn set_check_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>) -> Self {
135        self.inner = self.inner.set_check_ids(input);
136        self
137    }
138    /// <p>The IDs of the Trusted Advisor checks.</p>
139    pub fn get_check_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>> {
140        self.inner.get_check_ids()
141    }
142}