aws-sdk-connect 1.159.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::batch_create_data_table_value::_batch_create_data_table_value_output::BatchCreateDataTableValueOutputBuilder;

pub use crate::operation::batch_create_data_table_value::_batch_create_data_table_value_input::BatchCreateDataTableValueInputBuilder;

impl crate::operation::batch_create_data_table_value::builders::BatchCreateDataTableValueInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::batch_create_data_table_value::BatchCreateDataTableValueOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::batch_create_data_table_value::BatchCreateDataTableValueError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.batch_create_data_table_value();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `BatchCreateDataTableValue`.
///
/// <p>Creates values for attributes in a data table. The value may be a default or it may be associated with a primary value. The value must pass all customer defined validation as well as the default validation for the value type. The operation must conform to Batch Operation API Standards. Although the standard specifies that successful and failed entities are listed separately in the response, authorization fails if any primary values or attributes are unauthorized. The combination of primary values and the attribute name serve as the identifier for the individual item request.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct BatchCreateDataTableValueFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::batch_create_data_table_value::builders::BatchCreateDataTableValueInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::batch_create_data_table_value::BatchCreateDataTableValueOutput,
        crate::operation::batch_create_data_table_value::BatchCreateDataTableValueError,
    > for BatchCreateDataTableValueFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::batch_create_data_table_value::BatchCreateDataTableValueOutput,
            crate::operation::batch_create_data_table_value::BatchCreateDataTableValueError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl BatchCreateDataTableValueFluentBuilder {
    /// Creates a new `BatchCreateDataTableValueFluentBuilder`.
    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 BatchCreateDataTableValue as a reference.
    pub fn as_input(&self) -> &crate::operation::batch_create_data_table_value::builders::BatchCreateDataTableValueInputBuilder {
        &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::batch_create_data_table_value::BatchCreateDataTableValueOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::batch_create_data_table_value::BatchCreateDataTableValueError,
            ::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::batch_create_data_table_value::BatchCreateDataTableValue::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::batch_create_data_table_value::BatchCreateDataTableValue::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::batch_create_data_table_value::BatchCreateDataTableValueOutput,
        crate::operation::batch_create_data_table_value::BatchCreateDataTableValueError,
        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 unique identifier for the Amazon Connect instance.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.instance_id(input.into());
        self
    }
    /// <p>The unique identifier for the Amazon Connect instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_instance_id(input);
        self
    }
    /// <p>The unique identifier for the Amazon Connect instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_instance_id()
    }
    /// <p>The unique identifier for the data table. Must also accept the table ARN with or without a version alias. If no alias is provided, the default behavior is identical to providing the $LATEST alias.</p>
    pub fn data_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.data_table_id(input.into());
        self
    }
    /// <p>The unique identifier for the data table. Must also accept the table ARN with or without a version alias. If no alias is provided, the default behavior is identical to providing the $LATEST alias.</p>
    pub fn set_data_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_data_table_id(input);
        self
    }
    /// <p>The unique identifier for the data table. Must also accept the table ARN with or without a version alias. If no alias is provided, the default behavior is identical to providing the $LATEST alias.</p>
    pub fn get_data_table_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_data_table_id()
    }
    ///
    /// Appends an item to `Values`.
    ///
    /// To override the contents of this collection use [`set_values`](Self::set_values).
    ///
    /// <p>A list of values to create. Each value must specify the attribute name and optionally primary values if the table has primary attributes.</p>
    pub fn values(mut self, input: crate::types::DataTableValue) -> Self {
        self.inner = self.inner.values(input);
        self
    }
    /// <p>A list of values to create. Each value must specify the attribute name and optionally primary values if the table has primary attributes.</p>
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataTableValue>>) -> Self {
        self.inner = self.inner.set_values(input);
        self
    }
    /// <p>A list of values to create. Each value must specify the attribute name and optionally primary values if the table has primary attributes.</p>
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataTableValue>> {
        self.inner.get_values()
    }
}