aws_sdk_ec2/operation/import_client_vpn_client_certificate_revocation_list/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::import_client_vpn_client_certificate_revocation_list::_import_client_vpn_client_certificate_revocation_list_output::ImportClientVpnClientCertificateRevocationListOutputBuilder;
3
4pub use crate::operation::import_client_vpn_client_certificate_revocation_list::_import_client_vpn_client_certificate_revocation_list_input::ImportClientVpnClientCertificateRevocationListInputBuilder;
5
6impl crate::operation::import_client_vpn_client_certificate_revocation_list::builders::ImportClientVpnClientCertificateRevocationListInputBuilder {
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::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.import_client_vpn_client_certificate_revocation_list();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ImportClientVpnClientCertificateRevocationList`.
24///
25/// <p>Uploads a client certificate revocation list to the specified Client VPN endpoint. Uploading a client certificate revocation list overwrites the existing client certificate revocation list.</p>
26/// <p>Uploading a client certificate revocation list resets existing client connections.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct ImportClientVpnClientCertificateRevocationListFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner:
31        crate::operation::import_client_vpn_client_certificate_revocation_list::builders::ImportClientVpnClientCertificateRevocationListInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListOutput,
37        crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListError,
38    > for ImportClientVpnClientCertificateRevocationListFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListOutput,
46            crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl ImportClientVpnClientCertificateRevocationListFluentBuilder {
53    /// Creates a new `ImportClientVpnClientCertificateRevocationListFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the ImportClientVpnClientCertificateRevocationList as a reference.
62    pub fn as_input(
63        &self,
64    ) -> &crate::operation::import_client_vpn_client_certificate_revocation_list::builders::ImportClientVpnClientCertificateRevocationListInputBuilder
65    {
66        &self.inner
67    }
68    /// Sends the request and returns the response.
69    ///
70    /// If an error occurs, an `SdkError` will be returned with additional details that
71    /// can be matched against.
72    ///
73    /// By default, any retryable failures will be retried twice. Retry behavior
74    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75    /// set when configuring the client.
76    pub async fn send(
77        self,
78    ) -> ::std::result::Result<
79        crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListOutput,
80        ::aws_smithy_runtime_api::client::result::SdkError<
81            crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListError,
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::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationList::operation_runtime_plugins(
90                            self.handle.runtime_plugins.clone(),
91                            &self.handle.conf,
92                            self.config_override,
93                        );
94        crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationList::orchestrate(
95            &runtime_plugins,
96            input,
97        )
98        .await
99    }
100
101    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
102    pub fn customize(
103        self,
104    ) -> crate::client::customize::CustomizableOperation<
105        crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListOutput,
106        crate::operation::import_client_vpn_client_certificate_revocation_list::ImportClientVpnClientCertificateRevocationListError,
107        Self,
108    > {
109        crate::client::customize::CustomizableOperation::new(self)
110    }
111    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112        self.set_config_override(::std::option::Option::Some(config_override.into()));
113        self
114    }
115
116    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117        self.config_override = config_override;
118        self
119    }
120    /// <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
121    pub fn client_vpn_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.inner = self.inner.client_vpn_endpoint_id(input.into());
123        self
124    }
125    /// <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
126    pub fn set_client_vpn_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.inner = self.inner.set_client_vpn_endpoint_id(input);
128        self
129    }
130    /// <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
131    pub fn get_client_vpn_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
132        self.inner.get_client_vpn_endpoint_id()
133    }
134    /// <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the <i>Client VPN Administrator Guide</i>.</p>
135    pub fn certificate_revocation_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.certificate_revocation_list(input.into());
137        self
138    }
139    /// <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the <i>Client VPN Administrator Guide</i>.</p>
140    pub fn set_certificate_revocation_list(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_certificate_revocation_list(input);
142        self
143    }
144    /// <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the <i>Client VPN Administrator Guide</i>.</p>
145    pub fn get_certificate_revocation_list(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_certificate_revocation_list()
147    }
148    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
149    pub fn dry_run(mut self, input: bool) -> Self {
150        self.inner = self.inner.dry_run(input);
151        self
152    }
153    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
154    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
155        self.inner = self.inner.set_dry_run(input);
156        self
157    }
158    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
159    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
160        self.inner.get_dry_run()
161    }
162}