Skip to main content

aws_sdk_glue/operation/update_data_quality_evaluation_config/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_data_quality_evaluation_config::_update_data_quality_evaluation_config_input::UpdateDataQualityEvaluationConfigInputBuilder;
3
4pub use crate::operation::update_data_quality_evaluation_config::_update_data_quality_evaluation_config_output::UpdateDataQualityEvaluationConfigOutputBuilder;
5
6impl crate::operation::update_data_quality_evaluation_config::builders::UpdateDataQualityEvaluationConfigInputBuilder {
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::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_data_quality_evaluation_config();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateDataQualityEvaluationConfig`.
24///
25/// <p>Updates a data quality evaluation configuration. Fields that you don't specify keep their current values.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateDataQualityEvaluationConfigFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_data_quality_evaluation_config::builders::UpdateDataQualityEvaluationConfigInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput,
35        crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
36    > for UpdateDataQualityEvaluationConfigFluentBuilder
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::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput,
44            crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateDataQualityEvaluationConfigFluentBuilder {
51    /// Creates a new `UpdateDataQualityEvaluationConfigFluentBuilder`.
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 UpdateDataQualityEvaluationConfig as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_data_quality_evaluation_config::builders::UpdateDataQualityEvaluationConfigInputBuilder {
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::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
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::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfig::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfig::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::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput,
97        crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
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 name of the data quality evaluation configuration to update.</p>
112    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.name(input.into());
114        self
115    }
116    /// <p>The name of the data quality evaluation configuration to update.</p>
117    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_name(input);
119        self
120    }
121    /// <p>The name of the data quality evaluation configuration to update.</p>
122    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_name()
124    }
125    /// <p>The database or table that the configuration applies to. Replaces the current data source.</p>
126    pub fn data_source(mut self, input: crate::types::DataQualityEvaluationConfigDataSource) -> Self {
127        self.inner = self.inner.data_source(input);
128        self
129    }
130    /// <p>The database or table that the configuration applies to. Replaces the current data source.</p>
131    pub fn set_data_source(mut self, input: ::std::option::Option<crate::types::DataQualityEvaluationConfigDataSource>) -> Self {
132        self.inner = self.inner.set_data_source(input);
133        self
134    }
135    /// <p>The database or table that the configuration applies to. Replaces the current data source.</p>
136    pub fn get_data_source(&self) -> &::std::option::Option<crate::types::DataQualityEvaluationConfigDataSource> {
137        self.inner.get_data_source()
138    }
139    /// <p>The name of a Data Quality Definition Language (DQDL) ruleset, containing analyzers, rules, or both, to evaluate tables with. You create the ruleset using the <code>CreateDataQualityRuleset</code> API. Specify either <code>RulesetName</code> or <code>ManagedRulesetName</code>, not both.</p>
140    pub fn ruleset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.ruleset_name(input.into());
142        self
143    }
144    /// <p>The name of a Data Quality Definition Language (DQDL) ruleset, containing analyzers, rules, or both, to evaluate tables with. You create the ruleset using the <code>CreateDataQualityRuleset</code> API. Specify either <code>RulesetName</code> or <code>ManagedRulesetName</code>, not both.</p>
145    pub fn set_ruleset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_ruleset_name(input);
147        self
148    }
149    /// <p>The name of a Data Quality Definition Language (DQDL) ruleset, containing analyzers, rules, or both, to evaluate tables with. You create the ruleset using the <code>CreateDataQualityRuleset</code> API. Specify either <code>RulesetName</code> or <code>ManagedRulesetName</code>, not both.</p>
150    pub fn get_ruleset_name(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_ruleset_name()
152    }
153    /// <p>A built-in ruleset, <code>SIMPLE</code> or <code>ADVANCED</code>, that profiles each table.</p>
154    pub fn managed_ruleset_name(mut self, input: crate::types::DataQualityEvaluationConfigManagedRuleset) -> Self {
155        self.inner = self.inner.managed_ruleset_name(input);
156        self
157    }
158    /// <p>A built-in ruleset, <code>SIMPLE</code> or <code>ADVANCED</code>, that profiles each table.</p>
159    pub fn set_managed_ruleset_name(mut self, input: ::std::option::Option<crate::types::DataQualityEvaluationConfigManagedRuleset>) -> Self {
160        self.inner = self.inner.set_managed_ruleset_name(input);
161        self
162    }
163    /// <p>A built-in ruleset, <code>SIMPLE</code> or <code>ADVANCED</code>, that profiles each table.</p>
164    pub fn get_managed_ruleset_name(&self) -> &::std::option::Option<crate::types::DataQualityEvaluationConfigManagedRuleset> {
165        self.inner.get_managed_ruleset_name()
166    }
167    ///
168    /// Appends an item to `Triggers`.
169    ///
170    /// To override the contents of this collection use [`set_triggers`](Self::set_triggers).
171    ///
172    /// <p>When the configuration evaluates tables. Replaces the current triggers. Choose from the following triggers:</p>
173    /// <dl>
174    /// <dt>
175    /// ONCE
176    /// </dt>
177    /// <dd>
178    /// <p>Evaluates each table one time, including when tables are added to a database or catalog.</p>
179    /// </dd>
180    /// <dt>
181    /// SCHEDULE
182    /// </dt>
183    /// <dd>
184    /// <p>Evaluates each table on the cron or rate expression in <code>ScheduleExpression</code>, between the optional <code>StartAt</code> and <code>EndAt</code> times.</p>
185    /// </dd>
186    /// <dt>
187    /// METADATA_CHANGE
188    /// </dt>
189    /// <dd>
190    /// <p>Evaluates a table whenever its Glue Data Catalog metadata changes, such as a schema change or an Apache Iceberg commit.</p>
191    /// </dd>
192    /// </dl>
193    pub fn triggers(mut self, input: crate::types::DataQualityEvaluationConfigTrigger) -> Self {
194        self.inner = self.inner.triggers(input);
195        self
196    }
197    /// <p>When the configuration evaluates tables. Replaces the current triggers. Choose from the following triggers:</p>
198    /// <dl>
199    /// <dt>
200    /// ONCE
201    /// </dt>
202    /// <dd>
203    /// <p>Evaluates each table one time, including when tables are added to a database or catalog.</p>
204    /// </dd>
205    /// <dt>
206    /// SCHEDULE
207    /// </dt>
208    /// <dd>
209    /// <p>Evaluates each table on the cron or rate expression in <code>ScheduleExpression</code>, between the optional <code>StartAt</code> and <code>EndAt</code> times.</p>
210    /// </dd>
211    /// <dt>
212    /// METADATA_CHANGE
213    /// </dt>
214    /// <dd>
215    /// <p>Evaluates a table whenever its Glue Data Catalog metadata changes, such as a schema change or an Apache Iceberg commit.</p>
216    /// </dd>
217    /// </dl>
218    pub fn set_triggers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataQualityEvaluationConfigTrigger>>) -> Self {
219        self.inner = self.inner.set_triggers(input);
220        self
221    }
222    /// <p>When the configuration evaluates tables. Replaces the current triggers. Choose from the following triggers:</p>
223    /// <dl>
224    /// <dt>
225    /// ONCE
226    /// </dt>
227    /// <dd>
228    /// <p>Evaluates each table one time, including when tables are added to a database or catalog.</p>
229    /// </dd>
230    /// <dt>
231    /// SCHEDULE
232    /// </dt>
233    /// <dd>
234    /// <p>Evaluates each table on the cron or rate expression in <code>ScheduleExpression</code>, between the optional <code>StartAt</code> and <code>EndAt</code> times.</p>
235    /// </dd>
236    /// <dt>
237    /// METADATA_CHANGE
238    /// </dt>
239    /// <dd>
240    /// <p>Evaluates a table whenever its Glue Data Catalog metadata changes, such as a schema change or an Apache Iceberg commit.</p>
241    /// </dd>
242    /// </dl>
243    pub fn get_triggers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataQualityEvaluationConfigTrigger>> {
244        self.inner.get_triggers()
245    }
246    /// <p>A cron or rate expression, in UTC, for the <code>SCHEDULE</code> trigger, for example <code>cron(0 6 * * ? *)</code>. The schedule can run at most once an hour.</p>
247    pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248        self.inner = self.inner.schedule_expression(input.into());
249        self
250    }
251    /// <p>A cron or rate expression, in UTC, for the <code>SCHEDULE</code> trigger, for example <code>cron(0 6 * * ? *)</code>. The schedule can run at most once an hour.</p>
252    pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253        self.inner = self.inner.set_schedule_expression(input);
254        self
255    }
256    /// <p>A cron or rate expression, in UTC, for the <code>SCHEDULE</code> trigger, for example <code>cron(0 6 * * ? *)</code>. The schedule can run at most once an hour.</p>
257    pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
258        self.inner.get_schedule_expression()
259    }
260    /// <p>The time from which the schedule runs, inclusive.</p>
261    pub fn start_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
262        self.inner = self.inner.start_at(input);
263        self
264    }
265    /// <p>The time from which the schedule runs, inclusive.</p>
266    pub fn set_start_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
267        self.inner = self.inner.set_start_at(input);
268        self
269    }
270    /// <p>The time from which the schedule runs, inclusive.</p>
271    pub fn get_start_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
272        self.inner.get_start_at()
273    }
274    /// <p>The time at which the schedule stops running, exclusive.</p>
275    pub fn end_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
276        self.inner = self.inner.end_at(input);
277        self
278    }
279    /// <p>The time at which the schedule stops running, exclusive.</p>
280    pub fn set_end_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
281        self.inner = self.inner.set_end_at(input);
282        self
283    }
284    /// <p>The time at which the schedule stops running, exclusive.</p>
285    pub fn get_end_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
286        self.inner.get_end_at()
287    }
288    /// <p>Specifies whether to pause the configuration. While paused, the configuration evaluates nothing, including tables added to the catalog or database.</p>
289    pub fn pause_runs(mut self, input: bool) -> Self {
290        self.inner = self.inner.pause_runs(input);
291        self
292    }
293    /// <p>Specifies whether to pause the configuration. While paused, the configuration evaluates nothing, including tables added to the catalog or database.</p>
294    pub fn set_pause_runs(mut self, input: ::std::option::Option<bool>) -> Self {
295        self.inner = self.inner.set_pause_runs(input);
296        self
297    }
298    /// <p>Specifies whether to pause the configuration. While paused, the configuration evaluates nothing, including tables added to the catalog or database.</p>
299    pub fn get_pause_runs(&self) -> &::std::option::Option<bool> {
300        self.inner.get_pause_runs()
301    }
302    /// <p>The IAM role that evaluations assume. You can specify the role name or the role Amazon Resource Name (ARN). The role needs the trust policy and permissions described for <code>CreateDataQualityEvaluationConfig</code>.</p>
303    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304        self.inner = self.inner.role(input.into());
305        self
306    }
307    /// <p>The IAM role that evaluations assume. You can specify the role name or the role Amazon Resource Name (ARN). The role needs the trust policy and permissions described for <code>CreateDataQualityEvaluationConfig</code>.</p>
308    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
309        self.inner = self.inner.set_role(input);
310        self
311    }
312    /// <p>The IAM role that evaluations assume. You can specify the role name or the role Amazon Resource Name (ARN). The role needs the trust policy and permissions described for <code>CreateDataQualityEvaluationConfig</code>.</p>
313    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
314        self.inner.get_role()
315    }
316    /// <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
317    pub fn number_of_workers(mut self, input: i32) -> Self {
318        self.inner = self.inner.number_of_workers(input);
319        self
320    }
321    /// <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
322    pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
323        self.inner = self.inner.set_number_of_workers(input);
324        self
325    }
326    /// <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
327    pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
328        self.inner.get_number_of_workers()
329    }
330    /// <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>
331    pub fn timeout(mut self, input: i32) -> Self {
332        self.inner = self.inner.timeout(input);
333        self
334    }
335    /// <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>
336    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
337        self.inner = self.inner.set_timeout(input);
338        self
339    }
340    /// <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>
341    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
342        self.inner.get_timeout()
343    }
344    /// <p>Additional run options you can specify for an evaluation run.</p>
345    pub fn additional_run_options(mut self, input: crate::types::DataQualityEvaluationConfigAdditionalRunOptions) -> Self {
346        self.inner = self.inner.additional_run_options(input);
347        self
348    }
349    /// <p>Additional run options you can specify for an evaluation run.</p>
350    pub fn set_additional_run_options(mut self, input: ::std::option::Option<crate::types::DataQualityEvaluationConfigAdditionalRunOptions>) -> Self {
351        self.inner = self.inner.set_additional_run_options(input);
352        self
353    }
354    /// <p>Additional run options you can specify for an evaluation run.</p>
355    pub fn get_additional_run_options(&self) -> &::std::option::Option<crate::types::DataQualityEvaluationConfigAdditionalRunOptions> {
356        self.inner.get_additional_run_options()
357    }
358    ///
359    /// Adds a key-value pair to `AdditionalDataSources`.
360    ///
361    /// To override the contents of this collection use [`set_additional_data_sources`](Self::set_additional_data_sources).
362    ///
363    /// <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>
364    pub fn additional_data_sources(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::DataSource) -> Self {
365        self.inner = self.inner.additional_data_sources(k.into(), v);
366        self
367    }
368    /// <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>
369    pub fn set_additional_data_sources(
370        mut self,
371        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::DataSource>>,
372    ) -> Self {
373        self.inner = self.inner.set_additional_data_sources(input);
374        self
375    }
376    /// <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>
377    pub fn get_additional_data_sources(
378        &self,
379    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::DataSource>> {
380        self.inner.get_additional_data_sources()
381    }
382}