aws_sdk_cloudhsm/operation/get_config/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_config::_get_config_output::GetConfigOutputBuilder;
3
4pub use crate::operation::get_config::_get_config_input::GetConfigInputBuilder;
5
6impl crate::operation::get_config::builders::GetConfigInputBuilder {
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::get_config::GetConfigOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_config::GetConfigError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_config();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetConfig`.
24///
25/// <p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="https://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="https://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p>
26/// <p><b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p>
27/// <p>Gets the configuration files necessary to connect to all high availability partition groups the client is associated with.</p>
28#[deprecated(note = "This API is deprecated.")]
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct GetConfigFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::get_config::builders::GetConfigInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl crate::client::customize::internal::CustomizableSend<crate::operation::get_config::GetConfigOutput, crate::operation::get_config::GetConfigError>
36    for GetConfigFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<crate::operation::get_config::GetConfigOutput, crate::operation::get_config::GetConfigError>,
43    > {
44        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45    }
46}
47impl GetConfigFluentBuilder {
48    /// Creates a new `GetConfigFluentBuilder`.
49    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50        Self {
51            handle,
52            inner: ::std::default::Default::default(),
53            config_override: ::std::option::Option::None,
54        }
55    }
56    /// Access the GetConfig as a reference.
57    pub fn as_input(&self) -> &crate::operation::get_config::builders::GetConfigInputBuilder {
58        &self.inner
59    }
60    /// Sends the request and returns the response.
61    ///
62    /// If an error occurs, an `SdkError` will be returned with additional details that
63    /// can be matched against.
64    ///
65    /// By default, any retryable failures will be retried twice. Retry behavior
66    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67    /// set when configuring the client.
68    pub async fn send(
69        self,
70    ) -> ::std::result::Result<
71        crate::operation::get_config::GetConfigOutput,
72        ::aws_smithy_runtime_api::client::result::SdkError<
73            crate::operation::get_config::GetConfigError,
74            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
75        >,
76    > {
77        let input = self
78            .inner
79            .build()
80            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
81        let runtime_plugins = crate::operation::get_config::GetConfig::operation_runtime_plugins(
82            self.handle.runtime_plugins.clone(),
83            &self.handle.conf,
84            self.config_override,
85        );
86        crate::operation::get_config::GetConfig::orchestrate(&runtime_plugins, input).await
87    }
88
89    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
90    pub fn customize(
91        self,
92    ) -> crate::client::customize::CustomizableOperation<
93        crate::operation::get_config::GetConfigOutput,
94        crate::operation::get_config::GetConfigError,
95        Self,
96    > {
97        crate::client::customize::CustomizableOperation::new(self)
98    }
99    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
100        self.set_config_override(::std::option::Option::Some(config_override.into()));
101        self
102    }
103
104    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
105        self.config_override = config_override;
106        self
107    }
108    /// <p>The ARN of the client.</p>
109    pub fn client_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.inner = self.inner.client_arn(input.into());
111        self
112    }
113    /// <p>The ARN of the client.</p>
114    pub fn set_client_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.inner = self.inner.set_client_arn(input);
116        self
117    }
118    /// <p>The ARN of the client.</p>
119    pub fn get_client_arn(&self) -> &::std::option::Option<::std::string::String> {
120        self.inner.get_client_arn()
121    }
122    /// <p>The client version.</p>
123    pub fn client_version(mut self, input: crate::types::ClientVersion) -> Self {
124        self.inner = self.inner.client_version(input);
125        self
126    }
127    /// <p>The client version.</p>
128    pub fn set_client_version(mut self, input: ::std::option::Option<crate::types::ClientVersion>) -> Self {
129        self.inner = self.inner.set_client_version(input);
130        self
131    }
132    /// <p>The client version.</p>
133    pub fn get_client_version(&self) -> &::std::option::Option<crate::types::ClientVersion> {
134        self.inner.get_client_version()
135    }
136    ///
137    /// Appends an item to `HapgList`.
138    ///
139    /// To override the contents of this collection use [`set_hapg_list`](Self::set_hapg_list).
140    ///
141    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
142    pub fn hapg_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.hapg_list(input.into());
144        self
145    }
146    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
147    pub fn set_hapg_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
148        self.inner = self.inner.set_hapg_list(input);
149        self
150    }
151    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
152    pub fn get_hapg_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
153        self.inner.get_hapg_list()
154    }
155}