Skip to main content

aws_sdk_glue/operation/publish_data_quality_result_v2/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::publish_data_quality_result_v2::_publish_data_quality_result_v2_input::PublishDataQualityResultV2InputBuilder;
3
4pub use crate::operation::publish_data_quality_result_v2::_publish_data_quality_result_v2_output::PublishDataQualityResultV2OutputBuilder;
5
6impl crate::operation::publish_data_quality_result_v2::builders::PublishDataQualityResultV2InputBuilder {
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::publish_data_quality_result_v2::PublishDataQualityResultV2Output,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Error,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.publish_data_quality_result_v2();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `PublishDataQualityResultV2`.
24///
25/// <note>
26/// <p>This operation is intended for internal use. Do not call it directly.</p>
27/// </note>
28/// <p>AWS Glue Data Quality uses this operation to publish a data quality result.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct PublishDataQualityResultV2FluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::publish_data_quality_result_v2::builders::PublishDataQualityResultV2InputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Output,
38        crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Error,
39    > for PublishDataQualityResultV2FluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Output,
47            crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Error,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl PublishDataQualityResultV2FluentBuilder {
54    /// Creates a new `PublishDataQualityResultV2FluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the PublishDataQualityResultV2 as a reference.
63    pub fn as_input(&self) -> &crate::operation::publish_data_quality_result_v2::builders::PublishDataQualityResultV2InputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Output,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Error,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2::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::publish_data_quality_result_v2::PublishDataQualityResultV2Output,
100        crate::operation::publish_data_quality_result_v2::PublishDataQualityResultV2Error,
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    ///
115    /// Adds a key-value pair to `Dimensions`.
116    ///
117    /// To override the contents of this collection use [`set_dimensions`](Self::set_dimensions).
118    ///
119    /// <p>The dimensions for the result.</p>
120    pub fn dimensions(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.dimensions(k.into(), v.into());
122        self
123    }
124    /// <p>The dimensions for the result.</p>
125    pub fn set_dimensions(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
126        self.inner = self.inner.set_dimensions(input);
127        self
128    }
129    /// <p>The dimensions for the result.</p>
130    pub fn get_dimensions(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
131        self.inner.get_dimensions()
132    }
133    ///
134    /// Adds a key-value pair to `Tags`.
135    ///
136    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
137    ///
138    /// <p>The tags for the result.</p>
139    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.inner = self.inner.tags(k.into(), v.into());
141        self
142    }
143    /// <p>The tags for the result.</p>
144    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
145        self.inner = self.inner.set_tags(input);
146        self
147    }
148    /// <p>The tags for the result.</p>
149    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
150        self.inner.get_tags()
151    }
152    /// <p>The time execution started for the result.</p>
153    pub fn execution_started_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
154        self.inner = self.inner.execution_started_on(input);
155        self
156    }
157    /// <p>The time execution started for the result.</p>
158    pub fn set_execution_started_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
159        self.inner = self.inner.set_execution_started_on(input);
160        self
161    }
162    /// <p>The time execution started for the result.</p>
163    pub fn get_execution_started_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
164        self.inner.get_execution_started_on()
165    }
166    /// <p>The time execution completed for the result.</p>
167    pub fn execution_completed_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
168        self.inner = self.inner.execution_completed_on(input);
169        self
170    }
171    /// <p>The time execution completed for the result.</p>
172    pub fn set_execution_completed_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
173        self.inner = self.inner.set_execution_completed_on(input);
174        self
175    }
176    /// <p>The time execution completed for the result.</p>
177    pub fn get_execution_completed_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
178        self.inner.get_execution_completed_on()
179    }
180    /// <p>The score for the result.</p>
181    pub fn score(mut self, input: f64) -> Self {
182        self.inner = self.inner.score(input);
183        self
184    }
185    /// <p>The score for the result.</p>
186    pub fn set_score(mut self, input: ::std::option::Option<f64>) -> Self {
187        self.inner = self.inner.set_score(input);
188        self
189    }
190    /// <p>The score for the result.</p>
191    pub fn get_score(&self) -> &::std::option::Option<f64> {
192        self.inner.get_score()
193    }
194    ///
195    /// Appends an item to `RuleResults`.
196    ///
197    /// To override the contents of this collection use [`set_rule_results`](Self::set_rule_results).
198    ///
199    /// <p>The rule level results.</p>
200    pub fn rule_results(mut self, input: crate::types::DataQualityRuleResult) -> Self {
201        self.inner = self.inner.rule_results(input);
202        self
203    }
204    /// <p>The rule level results.</p>
205    pub fn set_rule_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataQualityRuleResult>>) -> Self {
206        self.inner = self.inner.set_rule_results(input);
207        self
208    }
209    /// <p>The rule level results.</p>
210    pub fn get_rule_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataQualityRuleResult>> {
211        self.inner.get_rule_results()
212    }
213    ///
214    /// Appends an item to `AnalyzerResults`.
215    ///
216    /// To override the contents of this collection use [`set_analyzer_results`](Self::set_analyzer_results).
217    ///
218    /// <p>The analyzer level results.</p>
219    pub fn analyzer_results(mut self, input: crate::types::DataQualityAnalyzerResult) -> Self {
220        self.inner = self.inner.analyzer_results(input);
221        self
222    }
223    /// <p>The analyzer level results.</p>
224    pub fn set_analyzer_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataQualityAnalyzerResult>>) -> Self {
225        self.inner = self.inner.set_analyzer_results(input);
226        self
227    }
228    /// <p>The analyzer level results.</p>
229    pub fn get_analyzer_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataQualityAnalyzerResult>> {
230        self.inner.get_analyzer_results()
231    }
232    ///
233    /// Appends an item to `Observations`.
234    ///
235    /// To override the contents of this collection use [`set_observations`](Self::set_observations).
236    ///
237    /// <p>The observations for the result.</p>
238    pub fn observations(mut self, input: crate::types::DataQualityObservation) -> Self {
239        self.inner = self.inner.observations(input);
240        self
241    }
242    /// <p>The observations for the result.</p>
243    pub fn set_observations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataQualityObservation>>) -> Self {
244        self.inner = self.inner.set_observations(input);
245        self
246    }
247    /// <p>The observations for the result.</p>
248    pub fn get_observations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataQualityObservation>> {
249        self.inner.get_observations()
250    }
251    /// <p>The aggregated metrics for the result.</p>
252    pub fn aggregated_metrics(mut self, input: crate::types::DataQualityAggregatedMetrics) -> Self {
253        self.inner = self.inner.aggregated_metrics(input);
254        self
255    }
256    /// <p>The aggregated metrics for the result.</p>
257    pub fn set_aggregated_metrics(mut self, input: ::std::option::Option<crate::types::DataQualityAggregatedMetrics>) -> Self {
258        self.inner = self.inner.set_aggregated_metrics(input);
259        self
260    }
261    /// <p>The aggregated metrics for the result.</p>
262    pub fn get_aggregated_metrics(&self) -> &::std::option::Option<crate::types::DataQualityAggregatedMetrics> {
263        self.inner.get_aggregated_metrics()
264    }
265    ///
266    /// Appends an item to `Statistics`.
267    ///
268    /// To override the contents of this collection use [`set_statistics`](Self::set_statistics).
269    ///
270    /// <p>The statistics for the result.</p>
271    pub fn statistics(mut self, input: crate::types::StatisticSummary) -> Self {
272        self.inner = self.inner.statistics(input);
273        self
274    }
275    /// <p>The statistics for the result.</p>
276    pub fn set_statistics(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StatisticSummary>>) -> Self {
277        self.inner = self.inner.set_statistics(input);
278        self
279    }
280    /// <p>The statistics for the result.</p>
281    pub fn get_statistics(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StatisticSummary>> {
282        self.inner.get_statistics()
283    }
284    /// <p>The run configuration for the result.</p>
285    pub fn run_configuration(mut self, input: crate::types::DataQualityConfigurationV2) -> Self {
286        self.inner = self.inner.run_configuration(input);
287        self
288    }
289    /// <p>The run configuration for the result.</p>
290    pub fn set_run_configuration(mut self, input: ::std::option::Option<crate::types::DataQualityConfigurationV2>) -> Self {
291        self.inner = self.inner.set_run_configuration(input);
292        self
293    }
294    /// <p>The run configuration for the result.</p>
295    pub fn get_run_configuration(&self) -> &::std::option::Option<crate::types::DataQualityConfigurationV2> {
296        self.inner.get_run_configuration()
297    }
298    /// <p>The client token for the request.</p>
299    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300        self.inner = self.inner.client_token(input.into());
301        self
302    }
303    /// <p>The client token for the request.</p>
304    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
305        self.inner = self.inner.set_client_token(input);
306        self
307    }
308    /// <p>The client token for the request.</p>
309    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
310        self.inner.get_client_token()
311    }
312    /// <p>The evaluation context for the result.</p>
313    pub fn evaluation_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
314        self.inner = self.inner.evaluation_context(input.into());
315        self
316    }
317    /// <p>The evaluation context for the result.</p>
318    pub fn set_evaluation_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
319        self.inner = self.inner.set_evaluation_context(input);
320        self
321    }
322    /// <p>The evaluation context for the result.</p>
323    pub fn get_evaluation_context(&self) -> &::std::option::Option<::std::string::String> {
324        self.inner.get_evaluation_context()
325    }
326    ///
327    /// Adds a key-value pair to `Descriptors`.
328    ///
329    /// To override the contents of this collection use [`set_descriptors`](Self::set_descriptors).
330    ///
331    /// <p>The descriptors for the result.</p>
332    pub fn descriptors(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
333        self.inner = self.inner.descriptors(k.into(), v.into());
334        self
335    }
336    /// <p>The descriptors for the result.</p>
337    pub fn set_descriptors(
338        mut self,
339        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
340    ) -> Self {
341        self.inner = self.inner.set_descriptors(input);
342        self
343    }
344    /// <p>The descriptors for the result.</p>
345    pub fn get_descriptors(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
346        self.inner.get_descriptors()
347    }
348    /// <p>The ruleset name for the result.</p>
349    pub fn ruleset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350        self.inner = self.inner.ruleset_name(input.into());
351        self
352    }
353    /// <p>The ruleset name for the result.</p>
354    pub fn set_ruleset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
355        self.inner = self.inner.set_ruleset_name(input);
356        self
357    }
358    /// <p>The ruleset name for the result.</p>
359    pub fn get_ruleset_name(&self) -> &::std::option::Option<::std::string::String> {
360        self.inner.get_ruleset_name()
361    }
362    /// <p>The security configuration for the result.</p>
363    pub fn data_quality_security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
364        self.inner = self.inner.data_quality_security_configuration(input.into());
365        self
366    }
367    /// <p>The security configuration for the result.</p>
368    pub fn set_data_quality_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
369        self.inner = self.inner.set_data_quality_security_configuration(input);
370        self
371    }
372    /// <p>The security configuration for the result.</p>
373    pub fn get_data_quality_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
374        self.inner.get_data_quality_security_configuration()
375    }
376    #[allow(missing_docs)] // documentation missing in model
377    pub fn telemetry(mut self, input: crate::types::DataQualityTelemetry) -> Self {
378        self.inner = self.inner.telemetry(input);
379        self
380    }
381    #[allow(missing_docs)] // documentation missing in model
382    pub fn set_telemetry(mut self, input: ::std::option::Option<crate::types::DataQualityTelemetry>) -> Self {
383        self.inner = self.inner.set_telemetry(input);
384        self
385    }
386    #[allow(missing_docs)] // documentation missing in model
387    pub fn get_telemetry(&self) -> &::std::option::Option<crate::types::DataQualityTelemetry> {
388        self.inner.get_telemetry()
389    }
390}