aws-sdk-backupexternal 1.0.0

AWS SDK for AWS Backup External
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_resource_provider::_create_resource_provider_input::CreateResourceProviderInputBuilder;

pub use crate::operation::create_resource_provider::_create_resource_provider_output::CreateResourceProviderOutputBuilder;

impl crate::operation::create_resource_provider::builders::CreateResourceProviderInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_resource_provider::CreateResourceProviderOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_resource_provider::CreateResourceProviderError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_resource_provider();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateResourceProvider`.
///
/// Creates a resource provider on the specified appliance with configuration for the provider and its resource targets.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateResourceProviderFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_resource_provider::builders::CreateResourceProviderInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_resource_provider::CreateResourceProviderOutput,
        crate::operation::create_resource_provider::CreateResourceProviderError,
    > for CreateResourceProviderFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_resource_provider::CreateResourceProviderOutput,
            crate::operation::create_resource_provider::CreateResourceProviderError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateResourceProviderFluentBuilder {
    /// Creates a new `CreateResourceProviderFluentBuilder`.
    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 CreateResourceProvider as a reference.
    pub fn as_input(&self) -> &crate::operation::create_resource_provider::builders::CreateResourceProviderInputBuilder {
        &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::create_resource_provider::CreateResourceProviderOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_resource_provider::CreateResourceProviderError,
            ::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::create_resource_provider::CreateResourceProvider::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_resource_provider::CreateResourceProvider::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::create_resource_provider::CreateResourceProviderOutput,
        crate::operation::create_resource_provider::CreateResourceProviderError,
        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
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn appliance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.appliance_arn(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn set_appliance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_appliance_arn(input);
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn get_appliance_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_appliance_arn()
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// The name of the resource provider.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// The name of the resource provider.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// The name of the resource provider.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// The configuration of the resource provider.
    pub fn provider_configuration(mut self, input: crate::types::ResourceProviderConfiguration) -> Self {
        self.inner = self.inner.provider_configuration(input);
        self
    }
    /// The configuration of the resource provider.
    pub fn set_provider_configuration(mut self, input: ::std::option::Option<crate::types::ResourceProviderConfiguration>) -> Self {
        self.inner = self.inner.set_provider_configuration(input);
        self
    }
    /// The configuration of the resource provider.
    pub fn get_provider_configuration(&self) -> &::std::option::Option<crate::types::ResourceProviderConfiguration> {
        self.inner.get_provider_configuration()
    }
    /// The type of resource provider.
    pub fn provider_type(mut self, input: crate::types::ResourceProviderType) -> Self {
        self.inner = self.inner.provider_type(input);
        self
    }
    /// The type of resource provider.
    pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ResourceProviderType>) -> Self {
        self.inner = self.inner.set_provider_type(input);
        self
    }
    /// The type of resource provider.
    pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ResourceProviderType> {
        self.inner.get_provider_type()
    }
    /// The Amazon Resource Name (ARN) of the AWS Secrets Manager secret used to access the resource provider.
    pub fn secret_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.secret_configuration_arn(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the AWS Secrets Manager secret used to access the resource provider.
    pub fn set_secret_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_secret_configuration_arn(input);
        self
    }
    /// The Amazon Resource Name (ARN) of the AWS Secrets Manager secret used to access the resource provider.
    pub fn get_secret_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_secret_configuration_arn()
    }
    ///
    /// Adds a key-value pair to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags to associate with the resource provider.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// The tags to associate with the resource provider.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// The tags to associate with the resource provider.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    /// The default backup configurations for the resource provider's resource targets, by target type.
    pub fn target_configuration(mut self, input: crate::types::ResourceTargetConfigurations) -> Self {
        self.inner = self.inner.target_configuration(input);
        self
    }
    /// The default backup configurations for the resource provider's resource targets, by target type.
    pub fn set_target_configuration(mut self, input: ::std::option::Option<crate::types::ResourceTargetConfigurations>) -> Self {
        self.inner = self.inner.set_target_configuration(input);
        self
    }
    /// The default backup configurations for the resource provider's resource targets, by target type.
    pub fn get_target_configuration(&self) -> &::std::option::Option<crate::types::ResourceTargetConfigurations> {
        self.inner.get_target_configuration()
    }
    ///
    /// Adds a key-value pair to `TargetTagsOnCreate`.
    ///
    /// To override the contents of this collection use [`set_target_tags_on_create`](Self::set_target_tags_on_create).
    ///
    /// The tags to apply when the resource provider's resource targets are created.
    pub fn target_tags_on_create(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        self.inner = self.inner.target_tags_on_create(k.into(), v.into());
        self
    }
    /// The tags to apply when the resource provider's resource targets are created.
    pub fn set_target_tags_on_create(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_target_tags_on_create(input);
        self
    }
    /// The tags to apply when the resource provider's resource targets are created.
    pub fn get_target_tags_on_create(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_target_tags_on_create()
    }
    ///
    /// Appends an item to `TargetTagKeysToSync`.
    ///
    /// To override the contents of this collection use [`set_target_tag_keys_to_sync`](Self::set_target_tag_keys_to_sync).
    ///
    /// The tag keys whose values are synchronized from external resources to their resource targets.
    pub fn target_tag_keys_to_sync(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.target_tag_keys_to_sync(input.into());
        self
    }
    /// The tag keys whose values are synchronized from external resources to their resource targets.
    pub fn set_target_tag_keys_to_sync(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_target_tag_keys_to_sync(input);
        self
    }
    /// The tag keys whose values are synchronized from external resources to their resource targets.
    pub fn get_target_tag_keys_to_sync(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_target_tag_keys_to_sync()
    }
    /// The number of days after which resource targets with a status of `NOT_FOUND` are automatically deleted.
    pub fn auto_delete_not_found_targets_after_days(mut self, input: i32) -> Self {
        self.inner = self.inner.auto_delete_not_found_targets_after_days(input);
        self
    }
    /// The number of days after which resource targets with a status of `NOT_FOUND` are automatically deleted.
    pub fn set_auto_delete_not_found_targets_after_days(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_auto_delete_not_found_targets_after_days(input);
        self
    }
    /// The number of days after which resource targets with a status of `NOT_FOUND` are automatically deleted.
    pub fn get_auto_delete_not_found_targets_after_days(&self) -> &::std::option::Option<i32> {
        self.inner.get_auto_delete_not_found_targets_after_days()
    }
}