Skip to main content

aws_sdk_glue/operation/start_ml_labeling_set_generation_task_run/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_ml_labeling_set_generation_task_run::_start_ml_labeling_set_generation_task_run_input::StartMlLabelingSetGenerationTaskRunInputBuilder;
3
4pub use crate::operation::start_ml_labeling_set_generation_task_run::_start_ml_labeling_set_generation_task_run_output::StartMlLabelingSetGenerationTaskRunOutputBuilder;
5
6impl crate::operation::start_ml_labeling_set_generation_task_run::builders::StartMlLabelingSetGenerationTaskRunInputBuilder {
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_ml_labeling_set_generation_task_run::StartMlLabelingSetGenerationTaskRunOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRunError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_ml_labeling_set_generation_task_run();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartMLLabelingSetGenerationTaskRun`.
24///
25/// <p>Starts the active learning workflow for your machine learning transform to improve the transform's quality by generating label sets and adding labels.</p>
26/// <p>When the <code>StartMLLabelingSetGenerationTaskRun</code> finishes, Glue will have generated a "labeling set" or a set of questions for humans to answer.</p>
27/// <p>In the case of the <code>FindMatches</code> transform, these questions are of the form, “What is the correct way to group these rows together into groups composed entirely of matching records?”</p>
28/// <p>After the labeling process is finished, you can upload your labels with a call to <code>StartImportLabelsTaskRun</code>. After <code>StartImportLabelsTaskRun</code> finishes, all future runs of the machine learning transform will use the new and improved labels and perform a higher-quality transformation.</p>
29/// <p>Note: The role used to write the generated labeling set to the <code>OutputS3Path</code> is the role associated with the Machine Learning Transform, specified in the <code>CreateMLTransform</code> API.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct StartMLLabelingSetGenerationTaskRunFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::start_ml_labeling_set_generation_task_run::builders::StartMlLabelingSetGenerationTaskRunInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::start_ml_labeling_set_generation_task_run::StartMlLabelingSetGenerationTaskRunOutput,
39        crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRunError,
40    > for StartMLLabelingSetGenerationTaskRunFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::start_ml_labeling_set_generation_task_run::StartMlLabelingSetGenerationTaskRunOutput,
48            crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRunError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl StartMLLabelingSetGenerationTaskRunFluentBuilder {
55    /// Creates a new `StartMLLabelingSetGenerationTaskRunFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the StartMLLabelingSetGenerationTaskRun as a reference.
64    pub fn as_input(
65        &self,
66    ) -> &crate::operation::start_ml_labeling_set_generation_task_run::builders::StartMlLabelingSetGenerationTaskRunInputBuilder {
67        &self.inner
68    }
69    /// Sends the request and returns the response.
70    ///
71    /// If an error occurs, an `SdkError` will be returned with additional details that
72    /// can be matched against.
73    ///
74    /// By default, any retryable failures will be retried twice. Retry behavior
75    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
76    /// set when configuring the client.
77    pub async fn send(
78        self,
79    ) -> ::std::result::Result<
80        crate::operation::start_ml_labeling_set_generation_task_run::StartMlLabelingSetGenerationTaskRunOutput,
81        ::aws_smithy_runtime_api::client::result::SdkError<
82            crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRunError,
83            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
84        >,
85    > {
86        let input = self
87            .inner
88            .build()
89            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
90        let runtime_plugins =
91            crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRun::operation_runtime_plugins(
92                self.handle.runtime_plugins.clone(),
93                &self.handle.conf,
94                self.config_override,
95            );
96        crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRun::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::start_ml_labeling_set_generation_task_run::StartMlLabelingSetGenerationTaskRunOutput,
104        crate::operation::start_ml_labeling_set_generation_task_run::StartMLLabelingSetGenerationTaskRunError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <p>The unique identifier of the machine learning transform.</p>
119    pub fn transform_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.transform_id(input.into());
121        self
122    }
123    /// <p>The unique identifier of the machine learning transform.</p>
124    pub fn set_transform_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_transform_id(input);
126        self
127    }
128    /// <p>The unique identifier of the machine learning transform.</p>
129    pub fn get_transform_id(&self) -> &::std::option::Option<::std::string::String> {
130        self.inner.get_transform_id()
131    }
132    /// <p>The Amazon Simple Storage Service (Amazon S3) path where you generate the labeling set.</p>
133    pub fn output_s3_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.inner = self.inner.output_s3_path(input.into());
135        self
136    }
137    /// <p>The Amazon Simple Storage Service (Amazon S3) path where you generate the labeling set.</p>
138    pub fn set_output_s3_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.inner = self.inner.set_output_s3_path(input);
140        self
141    }
142    /// <p>The Amazon Simple Storage Service (Amazon S3) path where you generate the labeling set.</p>
143    pub fn get_output_s3_path(&self) -> &::std::option::Option<::std::string::String> {
144        self.inner.get_output_s3_path()
145    }
146}