aws_sdk_quicksight/operation/create_data_set/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_data_set::_create_data_set_output::CreateDataSetOutputBuilder;
3
4pub use crate::operation::create_data_set::_create_data_set_input::CreateDataSetInputBuilder;
5
6impl crate::operation::create_data_set::builders::CreateDataSetInputBuilder {
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::create_data_set::CreateDataSetOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_data_set::CreateDataSetError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_data_set();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDataSet`.
24///
25/// <p>Creates a dataset. This operation doesn't support datasets that include uploaded files as a source.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateDataSetFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_data_set::builders::CreateDataSetInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_data_set::CreateDataSetOutput,
35        crate::operation::create_data_set::CreateDataSetError,
36    > for CreateDataSetFluentBuilder
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::create_data_set::CreateDataSetOutput,
44            crate::operation::create_data_set::CreateDataSetError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateDataSetFluentBuilder {
51    /// Creates a new `CreateDataSetFluentBuilder`.
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 CreateDataSet as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_data_set::builders::CreateDataSetInputBuilder {
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::create_data_set::CreateDataSetOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_data_set::CreateDataSetError,
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::create_data_set::CreateDataSet::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_data_set::CreateDataSet::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::create_data_set::CreateDataSetOutput,
97        crate::operation::create_data_set::CreateDataSetError,
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 Amazon Web Services account ID.</p>
112    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.aws_account_id(input.into());
114        self
115    }
116    /// <p>The Amazon Web Services account ID.</p>
117    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_aws_account_id(input);
119        self
120    }
121    /// <p>The Amazon Web Services account ID.</p>
122    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_aws_account_id()
124    }
125    /// <p>An ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
126    pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.data_set_id(input.into());
128        self
129    }
130    /// <p>An ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
131    pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_data_set_id(input);
133        self
134    }
135    /// <p>An ID for the dataset that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
136    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_data_set_id()
138    }
139    /// <p>The display name for the dataset.</p>
140    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.name(input.into());
142        self
143    }
144    /// <p>The display name for the dataset.</p>
145    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_name(input);
147        self
148    }
149    /// <p>The display name for the dataset.</p>
150    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_name()
152    }
153    ///
154    /// Adds a key-value pair to `PhysicalTableMap`.
155    ///
156    /// To override the contents of this collection use [`set_physical_table_map`](Self::set_physical_table_map).
157    ///
158    /// <p>Declares the physical tables that are available in the underlying data sources.</p>
159    pub fn physical_table_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::PhysicalTable) -> Self {
160        self.inner = self.inner.physical_table_map(k.into(), v);
161        self
162    }
163    /// <p>Declares the physical tables that are available in the underlying data sources.</p>
164    pub fn set_physical_table_map(
165        mut self,
166        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::PhysicalTable>>,
167    ) -> Self {
168        self.inner = self.inner.set_physical_table_map(input);
169        self
170    }
171    /// <p>Declares the physical tables that are available in the underlying data sources.</p>
172    pub fn get_physical_table_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::PhysicalTable>> {
173        self.inner.get_physical_table_map()
174    }
175    ///
176    /// Adds a key-value pair to `LogicalTableMap`.
177    ///
178    /// To override the contents of this collection use [`set_logical_table_map`](Self::set_logical_table_map).
179    ///
180    /// <p>Configures the combination and transformation of the data from the physical tables.</p>
181    pub fn logical_table_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::LogicalTable) -> Self {
182        self.inner = self.inner.logical_table_map(k.into(), v);
183        self
184    }
185    /// <p>Configures the combination and transformation of the data from the physical tables.</p>
186    pub fn set_logical_table_map(
187        mut self,
188        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::LogicalTable>>,
189    ) -> Self {
190        self.inner = self.inner.set_logical_table_map(input);
191        self
192    }
193    /// <p>Configures the combination and transformation of the data from the physical tables.</p>
194    pub fn get_logical_table_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::LogicalTable>> {
195        self.inner.get_logical_table_map()
196    }
197    /// <p>Indicates whether you want to import the data into SPICE.</p>
198    pub fn import_mode(mut self, input: crate::types::DataSetImportMode) -> Self {
199        self.inner = self.inner.import_mode(input);
200        self
201    }
202    /// <p>Indicates whether you want to import the data into SPICE.</p>
203    pub fn set_import_mode(mut self, input: ::std::option::Option<crate::types::DataSetImportMode>) -> Self {
204        self.inner = self.inner.set_import_mode(input);
205        self
206    }
207    /// <p>Indicates whether you want to import the data into SPICE.</p>
208    pub fn get_import_mode(&self) -> &::std::option::Option<crate::types::DataSetImportMode> {
209        self.inner.get_import_mode()
210    }
211    ///
212    /// Appends an item to `ColumnGroups`.
213    ///
214    /// To override the contents of this collection use [`set_column_groups`](Self::set_column_groups).
215    ///
216    /// <p>Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial hierarchy is supported.</p>
217    pub fn column_groups(mut self, input: crate::types::ColumnGroup) -> Self {
218        self.inner = self.inner.column_groups(input);
219        self
220    }
221    /// <p>Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial hierarchy is supported.</p>
222    pub fn set_column_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ColumnGroup>>) -> Self {
223        self.inner = self.inner.set_column_groups(input);
224        self
225    }
226    /// <p>Groupings of columns that work together in certain Amazon QuickSight features. Currently, only geospatial hierarchy is supported.</p>
227    pub fn get_column_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ColumnGroup>> {
228        self.inner.get_column_groups()
229    }
230    ///
231    /// Adds a key-value pair to `FieldFolders`.
232    ///
233    /// To override the contents of this collection use [`set_field_folders`](Self::set_field_folders).
234    ///
235    /// <p>The folder that contains fields and nested subfolders for your dataset.</p>
236    pub fn field_folders(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::FieldFolder) -> Self {
237        self.inner = self.inner.field_folders(k.into(), v);
238        self
239    }
240    /// <p>The folder that contains fields and nested subfolders for your dataset.</p>
241    pub fn set_field_folders(
242        mut self,
243        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::FieldFolder>>,
244    ) -> Self {
245        self.inner = self.inner.set_field_folders(input);
246        self
247    }
248    /// <p>The folder that contains fields and nested subfolders for your dataset.</p>
249    pub fn get_field_folders(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::FieldFolder>> {
250        self.inner.get_field_folders()
251    }
252    ///
253    /// Appends an item to `Permissions`.
254    ///
255    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
256    ///
257    /// <p>A list of resource permissions on the dataset.</p>
258    pub fn permissions(mut self, input: crate::types::ResourcePermission) -> Self {
259        self.inner = self.inner.permissions(input);
260        self
261    }
262    /// <p>A list of resource permissions on the dataset.</p>
263    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>) -> Self {
264        self.inner = self.inner.set_permissions(input);
265        self
266    }
267    /// <p>A list of resource permissions on the dataset.</p>
268    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>> {
269        self.inner.get_permissions()
270    }
271    /// <p>The row-level security configuration for the data that you want to create.</p>
272    pub fn row_level_permission_data_set(mut self, input: crate::types::RowLevelPermissionDataSet) -> Self {
273        self.inner = self.inner.row_level_permission_data_set(input);
274        self
275    }
276    /// <p>The row-level security configuration for the data that you want to create.</p>
277    pub fn set_row_level_permission_data_set(mut self, input: ::std::option::Option<crate::types::RowLevelPermissionDataSet>) -> Self {
278        self.inner = self.inner.set_row_level_permission_data_set(input);
279        self
280    }
281    /// <p>The row-level security configuration for the data that you want to create.</p>
282    pub fn get_row_level_permission_data_set(&self) -> &::std::option::Option<crate::types::RowLevelPermissionDataSet> {
283        self.inner.get_row_level_permission_data_set()
284    }
285    /// <p>The configuration of tags on a dataset to set row-level security. Row-level security tags are currently supported for anonymous embedding only.</p>
286    pub fn row_level_permission_tag_configuration(mut self, input: crate::types::RowLevelPermissionTagConfiguration) -> Self {
287        self.inner = self.inner.row_level_permission_tag_configuration(input);
288        self
289    }
290    /// <p>The configuration of tags on a dataset to set row-level security. Row-level security tags are currently supported for anonymous embedding only.</p>
291    pub fn set_row_level_permission_tag_configuration(
292        mut self,
293        input: ::std::option::Option<crate::types::RowLevelPermissionTagConfiguration>,
294    ) -> Self {
295        self.inner = self.inner.set_row_level_permission_tag_configuration(input);
296        self
297    }
298    /// <p>The configuration of tags on a dataset to set row-level security. Row-level security tags are currently supported for anonymous embedding only.</p>
299    pub fn get_row_level_permission_tag_configuration(&self) -> &::std::option::Option<crate::types::RowLevelPermissionTagConfiguration> {
300        self.inner.get_row_level_permission_tag_configuration()
301    }
302    ///
303    /// Appends an item to `ColumnLevelPermissionRules`.
304    ///
305    /// To override the contents of this collection use [`set_column_level_permission_rules`](Self::set_column_level_permission_rules).
306    ///
307    /// <p>A set of one or more definitions of a <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html">ColumnLevelPermissionRule</a> </code>.</p>
308    pub fn column_level_permission_rules(mut self, input: crate::types::ColumnLevelPermissionRule) -> Self {
309        self.inner = self.inner.column_level_permission_rules(input);
310        self
311    }
312    /// <p>A set of one or more definitions of a <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html">ColumnLevelPermissionRule</a> </code>.</p>
313    pub fn set_column_level_permission_rules(
314        mut self,
315        input: ::std::option::Option<::std::vec::Vec<crate::types::ColumnLevelPermissionRule>>,
316    ) -> Self {
317        self.inner = self.inner.set_column_level_permission_rules(input);
318        self
319    }
320    /// <p>A set of one or more definitions of a <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html">ColumnLevelPermissionRule</a> </code>.</p>
321    pub fn get_column_level_permission_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ColumnLevelPermissionRule>> {
322        self.inner.get_column_level_permission_rules()
323    }
324    ///
325    /// Appends an item to `Tags`.
326    ///
327    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
328    ///
329    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
330    pub fn tags(mut self, input: crate::types::Tag) -> Self {
331        self.inner = self.inner.tags(input);
332        self
333    }
334    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
335    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
336        self.inner = self.inner.set_tags(input);
337        self
338    }
339    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dataset.</p>
340    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
341        self.inner.get_tags()
342    }
343    /// <p>The usage configuration to apply to child datasets that reference this dataset as a source.</p>
344    pub fn data_set_usage_configuration(mut self, input: crate::types::DataSetUsageConfiguration) -> Self {
345        self.inner = self.inner.data_set_usage_configuration(input);
346        self
347    }
348    /// <p>The usage configuration to apply to child datasets that reference this dataset as a source.</p>
349    pub fn set_data_set_usage_configuration(mut self, input: ::std::option::Option<crate::types::DataSetUsageConfiguration>) -> Self {
350        self.inner = self.inner.set_data_set_usage_configuration(input);
351        self
352    }
353    /// <p>The usage configuration to apply to child datasets that reference this dataset as a source.</p>
354    pub fn get_data_set_usage_configuration(&self) -> &::std::option::Option<crate::types::DataSetUsageConfiguration> {
355        self.inner.get_data_set_usage_configuration()
356    }
357    ///
358    /// Appends an item to `DatasetParameters`.
359    ///
360    /// To override the contents of this collection use [`set_dataset_parameters`](Self::set_dataset_parameters).
361    ///
362    /// <p>The parameter declarations of the dataset.</p>
363    pub fn dataset_parameters(mut self, input: crate::types::DatasetParameter) -> Self {
364        self.inner = self.inner.dataset_parameters(input);
365        self
366    }
367    /// <p>The parameter declarations of the dataset.</p>
368    pub fn set_dataset_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DatasetParameter>>) -> Self {
369        self.inner = self.inner.set_dataset_parameters(input);
370        self
371    }
372    /// <p>The parameter declarations of the dataset.</p>
373    pub fn get_dataset_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DatasetParameter>> {
374        self.inner.get_dataset_parameters()
375    }
376    ///
377    /// Appends an item to `FolderArns`.
378    ///
379    /// To override the contents of this collection use [`set_folder_arns`](Self::set_folder_arns).
380    ///
381    /// <p>When you create the dataset, Amazon QuickSight adds the dataset to these folders.</p>
382    pub fn folder_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383        self.inner = self.inner.folder_arns(input.into());
384        self
385    }
386    /// <p>When you create the dataset, Amazon QuickSight adds the dataset to these folders.</p>
387    pub fn set_folder_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
388        self.inner = self.inner.set_folder_arns(input);
389        self
390    }
391    /// <p>When you create the dataset, Amazon QuickSight adds the dataset to these folders.</p>
392    pub fn get_folder_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
393        self.inner.get_folder_arns()
394    }
395    /// <p>The configuration for the performance optimization of the dataset that contains a <code>UniqueKey</code> configuration.</p>
396    pub fn performance_configuration(mut self, input: crate::types::PerformanceConfiguration) -> Self {
397        self.inner = self.inner.performance_configuration(input);
398        self
399    }
400    /// <p>The configuration for the performance optimization of the dataset that contains a <code>UniqueKey</code> configuration.</p>
401    pub fn set_performance_configuration(mut self, input: ::std::option::Option<crate::types::PerformanceConfiguration>) -> Self {
402        self.inner = self.inner.set_performance_configuration(input);
403        self
404    }
405    /// <p>The configuration for the performance optimization of the dataset that contains a <code>UniqueKey</code> configuration.</p>
406    pub fn get_performance_configuration(&self) -> &::std::option::Option<crate::types::PerformanceConfiguration> {
407        self.inner.get_performance_configuration()
408    }
409    /// <p>The usage of the dataset. <code>RLS_RULES</code> must be specified for RLS permission datasets.</p>
410    pub fn use_as(mut self, input: crate::types::DataSetUseAs) -> Self {
411        self.inner = self.inner.use_as(input);
412        self
413    }
414    /// <p>The usage of the dataset. <code>RLS_RULES</code> must be specified for RLS permission datasets.</p>
415    pub fn set_use_as(mut self, input: ::std::option::Option<crate::types::DataSetUseAs>) -> Self {
416        self.inner = self.inner.set_use_as(input);
417        self
418    }
419    /// <p>The usage of the dataset. <code>RLS_RULES</code> must be specified for RLS permission datasets.</p>
420    pub fn get_use_as(&self) -> &::std::option::Option<crate::types::DataSetUseAs> {
421        self.inner.get_use_as()
422    }
423}