aws-sdk-directory 1.107.0

AWS SDK for AWS Directory Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_directory_setup::_update_directory_setup_input::UpdateDirectorySetupInputBuilder;

pub use crate::operation::update_directory_setup::_update_directory_setup_output::UpdateDirectorySetupOutputBuilder;

impl crate::operation::update_directory_setup::builders::UpdateDirectorySetupInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_directory_setup::UpdateDirectorySetupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_directory_setup::UpdateDirectorySetupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_directory_setup();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateDirectorySetup`.
///
/// <p>Updates directory configuration for the specified update type.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateDirectorySetupFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_directory_setup::builders::UpdateDirectorySetupInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_directory_setup::UpdateDirectorySetupOutput,
        crate::operation::update_directory_setup::UpdateDirectorySetupError,
    > for UpdateDirectorySetupFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_directory_setup::UpdateDirectorySetupOutput,
            crate::operation::update_directory_setup::UpdateDirectorySetupError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateDirectorySetupFluentBuilder {
    /// Creates a new `UpdateDirectorySetupFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateDirectorySetup as a reference.
    pub fn as_input(&self) -> &crate::operation::update_directory_setup::builders::UpdateDirectorySetupInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_directory_setup::UpdateDirectorySetupOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_directory_setup::UpdateDirectorySetupError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_directory_setup::UpdateDirectorySetup::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_directory_setup::UpdateDirectorySetup::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_directory_setup::UpdateDirectorySetupOutput,
        crate::operation::update_directory_setup::UpdateDirectorySetupError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The identifier of the directory to update.</p>
    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.directory_id(input.into());
        self
    }
    /// <p>The identifier of the directory to update.</p>
    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_directory_id(input);
        self
    }
    /// <p>The identifier of the directory to update.</p>
    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_directory_id()
    }
    /// <p>The type of update to perform on the directory.</p>
    pub fn update_type(mut self, input: crate::types::UpdateType) -> Self {
        self.inner = self.inner.update_type(input);
        self
    }
    /// <p>The type of update to perform on the directory.</p>
    pub fn set_update_type(mut self, input: ::std::option::Option<crate::types::UpdateType>) -> Self {
        self.inner = self.inner.set_update_type(input);
        self
    }
    /// <p>The type of update to perform on the directory.</p>
    pub fn get_update_type(&self) -> &::std::option::Option<crate::types::UpdateType> {
        self.inner.get_update_type()
    }
    /// <p>Operating system configuration to apply during the directory update operation.</p>
    pub fn os_update_settings(mut self, input: crate::types::OsUpdateSettings) -> Self {
        self.inner = self.inner.os_update_settings(input);
        self
    }
    /// <p>Operating system configuration to apply during the directory update operation.</p>
    pub fn set_os_update_settings(mut self, input: ::std::option::Option<crate::types::OsUpdateSettings>) -> Self {
        self.inner = self.inner.set_os_update_settings(input);
        self
    }
    /// <p>Operating system configuration to apply during the directory update operation.</p>
    pub fn get_os_update_settings(&self) -> &::std::option::Option<crate::types::OsUpdateSettings> {
        self.inner.get_os_update_settings()
    }
    /// <p>Directory size configuration to apply during the update operation.</p>
    pub fn directory_size_update_settings(mut self, input: crate::types::DirectorySizeUpdateSettings) -> Self {
        self.inner = self.inner.directory_size_update_settings(input);
        self
    }
    /// <p>Directory size configuration to apply during the update operation.</p>
    pub fn set_directory_size_update_settings(mut self, input: ::std::option::Option<crate::types::DirectorySizeUpdateSettings>) -> Self {
        self.inner = self.inner.set_directory_size_update_settings(input);
        self
    }
    /// <p>Directory size configuration to apply during the update operation.</p>
    pub fn get_directory_size_update_settings(&self) -> &::std::option::Option<crate::types::DirectorySizeUpdateSettings> {
        self.inner.get_directory_size_update_settings()
    }
    /// <p>Network configuration to apply during the directory update operation.</p>
    pub fn network_update_settings(mut self, input: crate::types::NetworkUpdateSettings) -> Self {
        self.inner = self.inner.network_update_settings(input);
        self
    }
    /// <p>Network configuration to apply during the directory update operation.</p>
    pub fn set_network_update_settings(mut self, input: ::std::option::Option<crate::types::NetworkUpdateSettings>) -> Self {
        self.inner = self.inner.set_network_update_settings(input);
        self
    }
    /// <p>Network configuration to apply during the directory update operation.</p>
    pub fn get_network_update_settings(&self) -> &::std::option::Option<crate::types::NetworkUpdateSettings> {
        self.inner.get_network_update_settings()
    }
    /// <p>Specifies whether to create a directory snapshot before performing the update.</p>
    pub fn create_snapshot_before_update(mut self, input: bool) -> Self {
        self.inner = self.inner.create_snapshot_before_update(input);
        self
    }
    /// <p>Specifies whether to create a directory snapshot before performing the update.</p>
    pub fn set_create_snapshot_before_update(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_create_snapshot_before_update(input);
        self
    }
    /// <p>Specifies whether to create a directory snapshot before performing the update.</p>
    pub fn get_create_snapshot_before_update(&self) -> &::std::option::Option<bool> {
        self.inner.get_create_snapshot_before_update()
    }
}