aws_sdk_glue/operation/start_data_quality_ruleset_evaluation_run/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_data_quality_ruleset_evaluation_run::_start_data_quality_ruleset_evaluation_run_output::StartDataQualityRulesetEvaluationRunOutputBuilder;
3
4pub use crate::operation::start_data_quality_ruleset_evaluation_run::_start_data_quality_ruleset_evaluation_run_input::StartDataQualityRulesetEvaluationRunInputBuilder;
5
6impl crate::operation::start_data_quality_ruleset_evaluation_run::builders::StartDataQualityRulesetEvaluationRunInputBuilder {
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::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_data_quality_ruleset_evaluation_run();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartDataQualityRulesetEvaluationRun`.
24///
25/// <p>Once you have a ruleset definition (either recommended or your own), you call this operation to evaluate the ruleset against a data source (Glue table). The evaluation computes results which you can retrieve with the <code>GetDataQualityResult</code> API.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct StartDataQualityRulesetEvaluationRunFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::start_data_quality_ruleset_evaluation_run::builders::StartDataQualityRulesetEvaluationRunInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunOutput,
35        crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunError,
36    > for StartDataQualityRulesetEvaluationRunFluentBuilder
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::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunOutput,
44            crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl StartDataQualityRulesetEvaluationRunFluentBuilder {
51    /// Creates a new `StartDataQualityRulesetEvaluationRunFluentBuilder`.
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 StartDataQualityRulesetEvaluationRun as a reference.
60    pub fn as_input(
61        &self,
62    ) -> &crate::operation::start_data_quality_ruleset_evaluation_run::builders::StartDataQualityRulesetEvaluationRunInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins =
87            crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRun::operation_runtime_plugins(
88                self.handle.runtime_plugins.clone(),
89                &self.handle.conf,
90                self.config_override,
91            );
92        crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRun::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunOutput,
100        crate::operation::start_data_quality_ruleset_evaluation_run::StartDataQualityRulesetEvaluationRunError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>The data source (Glue table) associated with this run.</p>
115    pub fn data_source(mut self, input: crate::types::DataSource) -> Self {
116        self.inner = self.inner.data_source(input);
117        self
118    }
119    /// <p>The data source (Glue table) associated with this run.</p>
120    pub fn set_data_source(mut self, input: ::std::option::Option<crate::types::DataSource>) -> Self {
121        self.inner = self.inner.set_data_source(input);
122        self
123    }
124    /// <p>The data source (Glue table) associated with this run.</p>
125    pub fn get_data_source(&self) -> &::std::option::Option<crate::types::DataSource> {
126        self.inner.get_data_source()
127    }
128    /// <p>An IAM role supplied to encrypt the results of the run.</p>
129    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.inner = self.inner.role(input.into());
131        self
132    }
133    /// <p>An IAM role supplied to encrypt the results of the run.</p>
134    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.inner = self.inner.set_role(input);
136        self
137    }
138    /// <p>An IAM role supplied to encrypt the results of the run.</p>
139    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_role()
141    }
142    /// <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
143    pub fn number_of_workers(mut self, input: i32) -> Self {
144        self.inner = self.inner.number_of_workers(input);
145        self
146    }
147    /// <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
148    pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
149        self.inner = self.inner.set_number_of_workers(input);
150        self
151    }
152    /// <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
153    pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
154        self.inner.get_number_of_workers()
155    }
156    /// <p>The timeout for a run in minutes. This is the maximum time that a run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
157    pub fn timeout(mut self, input: i32) -> Self {
158        self.inner = self.inner.timeout(input);
159        self
160    }
161    /// <p>The timeout for a run in minutes. This is the maximum time that a run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
162    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
163        self.inner = self.inner.set_timeout(input);
164        self
165    }
166    /// <p>The timeout for a run in minutes. This is the maximum time that a run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
167    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
168        self.inner.get_timeout()
169    }
170    /// <p>Used for idempotency and is recommended to be set to a random ID (such as a UUID) to avoid creating or starting multiple instances of the same resource.</p>
171    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.inner = self.inner.client_token(input.into());
173        self
174    }
175    /// <p>Used for idempotency and is recommended to be set to a random ID (such as a UUID) to avoid creating or starting multiple instances of the same resource.</p>
176    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.inner = self.inner.set_client_token(input);
178        self
179    }
180    /// <p>Used for idempotency and is recommended to be set to a random ID (such as a UUID) to avoid creating or starting multiple instances of the same resource.</p>
181    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
182        self.inner.get_client_token()
183    }
184    /// <p>Additional run options you can specify for an evaluation run.</p>
185    pub fn additional_run_options(mut self, input: crate::types::DataQualityEvaluationRunAdditionalRunOptions) -> Self {
186        self.inner = self.inner.additional_run_options(input);
187        self
188    }
189    /// <p>Additional run options you can specify for an evaluation run.</p>
190    pub fn set_additional_run_options(mut self, input: ::std::option::Option<crate::types::DataQualityEvaluationRunAdditionalRunOptions>) -> Self {
191        self.inner = self.inner.set_additional_run_options(input);
192        self
193    }
194    /// <p>Additional run options you can specify for an evaluation run.</p>
195    pub fn get_additional_run_options(&self) -> &::std::option::Option<crate::types::DataQualityEvaluationRunAdditionalRunOptions> {
196        self.inner.get_additional_run_options()
197    }
198    ///
199    /// Appends an item to `RulesetNames`.
200    ///
201    /// To override the contents of this collection use [`set_ruleset_names`](Self::set_ruleset_names).
202    ///
203    /// <p>A list of ruleset names.</p>
204    pub fn ruleset_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.inner = self.inner.ruleset_names(input.into());
206        self
207    }
208    /// <p>A list of ruleset names.</p>
209    pub fn set_ruleset_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
210        self.inner = self.inner.set_ruleset_names(input);
211        self
212    }
213    /// <p>A list of ruleset names.</p>
214    pub fn get_ruleset_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
215        self.inner.get_ruleset_names()
216    }
217    ///
218    /// Adds a key-value pair to `AdditionalDataSources`.
219    ///
220    /// To override the contents of this collection use [`set_additional_data_sources`](Self::set_additional_data_sources).
221    ///
222    /// <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>
223    pub fn additional_data_sources(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::DataSource) -> Self {
224        self.inner = self.inner.additional_data_sources(k.into(), v);
225        self
226    }
227    /// <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>
228    pub fn set_additional_data_sources(
229        mut self,
230        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::DataSource>>,
231    ) -> Self {
232        self.inner = self.inner.set_additional_data_sources(input);
233        self
234    }
235    /// <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>
236    pub fn get_additional_data_sources(
237        &self,
238    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::DataSource>> {
239        self.inner.get_additional_data_sources()
240    }
241}