aws_sdk_honeycode/operation/batch_delete_table_rows/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::batch_delete_table_rows::_batch_delete_table_rows_output::BatchDeleteTableRowsOutputBuilder;
3
4pub use crate::operation::batch_delete_table_rows::_batch_delete_table_rows_input::BatchDeleteTableRowsInputBuilder;
5
6impl crate::operation::batch_delete_table_rows::builders::BatchDeleteTableRowsInputBuilder {
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::batch_delete_table_rows::BatchDeleteTableRowsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.batch_delete_table_rows();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `BatchDeleteTableRows`.
24///
25/// <p>The BatchDeleteTableRows API allows you to delete one or more rows from a table in a workbook. You need to specify the ids of the rows that you want to delete from the table.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct BatchDeleteTableRowsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::batch_delete_table_rows::builders::BatchDeleteTableRowsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::batch_delete_table_rows::BatchDeleteTableRowsOutput,
35        crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError,
36    > for BatchDeleteTableRowsFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::batch_delete_table_rows::BatchDeleteTableRowsOutput,
44            crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl BatchDeleteTableRowsFluentBuilder {
51    /// Creates a new `BatchDeleteTableRowsFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the BatchDeleteTableRows as a reference.
60    pub fn as_input(&self) -> &crate::operation::batch_delete_table_rows::builders::BatchDeleteTableRowsInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::batch_delete_table_rows::BatchDeleteTableRowsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::batch_delete_table_rows::BatchDeleteTableRows::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::batch_delete_table_rows::BatchDeleteTableRows::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::batch_delete_table_rows::BatchDeleteTableRowsOutput,
97        crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The ID of the workbook where the rows are being deleted.</p>
112    /// <p>If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.</p>
113    pub fn workbook_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.workbook_id(input.into());
115        self
116    }
117    /// <p>The ID of the workbook where the rows are being deleted.</p>
118    /// <p>If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.</p>
119    pub fn set_workbook_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.inner = self.inner.set_workbook_id(input);
121        self
122    }
123    /// <p>The ID of the workbook where the rows are being deleted.</p>
124    /// <p>If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.</p>
125    pub fn get_workbook_id(&self) -> &::std::option::Option<::std::string::String> {
126        self.inner.get_workbook_id()
127    }
128    /// <p>The ID of the table where the rows are being deleted.</p>
129    /// <p>If a table with the specified id could not be found, this API throws ResourceNotFoundException.</p>
130    pub fn table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.table_id(input.into());
132        self
133    }
134    /// <p>The ID of the table where the rows are being deleted.</p>
135    /// <p>If a table with the specified id could not be found, this API throws ResourceNotFoundException.</p>
136    pub fn set_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_table_id(input);
138        self
139    }
140    /// <p>The ID of the table where the rows are being deleted.</p>
141    /// <p>If a table with the specified id could not be found, this API throws ResourceNotFoundException.</p>
142    pub fn get_table_id(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_table_id()
144    }
145    ///
146    /// Appends an item to `rowIds`.
147    ///
148    /// To override the contents of this collection use [`set_row_ids`](Self::set_row_ids).
149    ///
150    /// <p>The list of row ids to delete from the table. You need to specify at least one row id in this list.</p>
151    /// <p>Note that if one of the row ids provided in the request does not exist in the table, then the request fails and no rows are deleted from the table.</p>
152    pub fn row_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.inner = self.inner.row_ids(input.into());
154        self
155    }
156    /// <p>The list of row ids to delete from the table. You need to specify at least one row id in this list.</p>
157    /// <p>Note that if one of the row ids provided in the request does not exist in the table, then the request fails and no rows are deleted from the table.</p>
158    pub fn set_row_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
159        self.inner = self.inner.set_row_ids(input);
160        self
161    }
162    /// <p>The list of row ids to delete from the table. You need to specify at least one row id in this list.</p>
163    /// <p>Note that if one of the row ids provided in the request does not exist in the table, then the request fails and no rows are deleted from the table.</p>
164    pub fn get_row_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
165        self.inner.get_row_ids()
166    }
167    /// <p>The request token for performing the delete action. Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error like a failed network connection, you can retry the call with the same request token. The service ensures that if the first call using that request token is successfully performed, the second call will not perform the action again.</p>
168    /// <p>Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests spanning hours or days.</p>
169    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.inner = self.inner.client_request_token(input.into());
171        self
172    }
173    /// <p>The request token for performing the delete action. Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error like a failed network connection, you can retry the call with the same request token. The service ensures that if the first call using that request token is successfully performed, the second call will not perform the action again.</p>
174    /// <p>Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests spanning hours or days.</p>
175    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.inner = self.inner.set_client_request_token(input);
177        self
178    }
179    /// <p>The request token for performing the delete action. Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error like a failed network connection, you can retry the call with the same request token. The service ensures that if the first call using that request token is successfully performed, the second call will not perform the action again.</p>
180    /// <p>Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests spanning hours or days.</p>
181    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
182        self.inner.get_client_request_token()
183    }
184}