aws_sdk_datazone/operation/start_metadata_generation_run/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_metadata_generation_run::_start_metadata_generation_run_output::StartMetadataGenerationRunOutputBuilder;
3
4pub use crate::operation::start_metadata_generation_run::_start_metadata_generation_run_input::StartMetadataGenerationRunInputBuilder;
5
6impl crate::operation::start_metadata_generation_run::builders::StartMetadataGenerationRunInputBuilder {
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_metadata_generation_run::StartMetadataGenerationRunOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_metadata_generation_run::StartMetadataGenerationRunError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_metadata_generation_run();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartMetadataGenerationRun`.
24///
25/// <p>Starts the metadata generation run.</p>
26/// <p>Prerequisites:</p>
27/// <ul>
28/// <li>
29/// <p>Asset must be created and belong to the specified domain and project.</p></li>
30/// <li>
31/// <p>Asset type must be supported for metadata generation (e.g., Amazon Web Services Glue table).</p></li>
32/// <li>
33/// <p>Asset must have a structured schema with valid rows and columns.</p></li>
34/// <li>
35/// <p>Valid values for --type: BUSINESS_DESCRIPTIONS, BUSINESS_NAMES, BUSINESS_GLOSSARY_ASSOCIATIONS.</p></li>
36/// <li>
37/// <p>The user must have permission to run metadata generation in the domain/project.</p></li>
38/// </ul>
39#[derive(::std::clone::Clone, ::std::fmt::Debug)]
40pub struct StartMetadataGenerationRunFluentBuilder {
41    handle: ::std::sync::Arc<crate::client::Handle>,
42    inner: crate::operation::start_metadata_generation_run::builders::StartMetadataGenerationRunInputBuilder,
43    config_override: ::std::option::Option<crate::config::Builder>,
44}
45impl
46    crate::client::customize::internal::CustomizableSend<
47        crate::operation::start_metadata_generation_run::StartMetadataGenerationRunOutput,
48        crate::operation::start_metadata_generation_run::StartMetadataGenerationRunError,
49    > for StartMetadataGenerationRunFluentBuilder
50{
51    fn send(
52        self,
53        config_override: crate::config::Builder,
54    ) -> crate::client::customize::internal::BoxFuture<
55        crate::client::customize::internal::SendResult<
56            crate::operation::start_metadata_generation_run::StartMetadataGenerationRunOutput,
57            crate::operation::start_metadata_generation_run::StartMetadataGenerationRunError,
58        >,
59    > {
60        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
61    }
62}
63impl StartMetadataGenerationRunFluentBuilder {
64    /// Creates a new `StartMetadataGenerationRunFluentBuilder`.
65    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
66        Self {
67            handle,
68            inner: ::std::default::Default::default(),
69            config_override: ::std::option::Option::None,
70        }
71    }
72    /// Access the StartMetadataGenerationRun as a reference.
73    pub fn as_input(&self) -> &crate::operation::start_metadata_generation_run::builders::StartMetadataGenerationRunInputBuilder {
74        &self.inner
75    }
76    /// Sends the request and returns the response.
77    ///
78    /// If an error occurs, an `SdkError` will be returned with additional details that
79    /// can be matched against.
80    ///
81    /// By default, any retryable failures will be retried twice. Retry behavior
82    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
83    /// set when configuring the client.
84    pub async fn send(
85        self,
86    ) -> ::std::result::Result<
87        crate::operation::start_metadata_generation_run::StartMetadataGenerationRunOutput,
88        ::aws_smithy_runtime_api::client::result::SdkError<
89            crate::operation::start_metadata_generation_run::StartMetadataGenerationRunError,
90            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
91        >,
92    > {
93        let input = self
94            .inner
95            .build()
96            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
97        let runtime_plugins = crate::operation::start_metadata_generation_run::StartMetadataGenerationRun::operation_runtime_plugins(
98            self.handle.runtime_plugins.clone(),
99            &self.handle.conf,
100            self.config_override,
101        );
102        crate::operation::start_metadata_generation_run::StartMetadataGenerationRun::orchestrate(&runtime_plugins, input).await
103    }
104
105    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
106    pub fn customize(
107        self,
108    ) -> crate::client::customize::CustomizableOperation<
109        crate::operation::start_metadata_generation_run::StartMetadataGenerationRunOutput,
110        crate::operation::start_metadata_generation_run::StartMetadataGenerationRunError,
111        Self,
112    > {
113        crate::client::customize::CustomizableOperation::new(self)
114    }
115    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116        self.set_config_override(::std::option::Option::Some(config_override.into()));
117        self
118    }
119
120    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121        self.config_override = config_override;
122        self
123    }
124    /// <p>The ID of the Amazon DataZone domain where you want to start a metadata generation run.</p>
125    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.domain_identifier(input.into());
127        self
128    }
129    /// <p>The ID of the Amazon DataZone domain where you want to start a metadata generation run.</p>
130    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_domain_identifier(input);
132        self
133    }
134    /// <p>The ID of the Amazon DataZone domain where you want to start a metadata generation run.</p>
135    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_domain_identifier()
137    }
138    /// <p>The type of the metadata generation run.</p>
139    #[deprecated(
140        note = "This field is going to be deprecated, please use the 'types' field to provide the MetadataGenerationRun types",
141        since = "2025-11-21"
142    )]
143    pub fn r#type(mut self, input: crate::types::MetadataGenerationRunType) -> Self {
144        self.inner = self.inner.r#type(input);
145        self
146    }
147    /// <p>The type of the metadata generation run.</p>
148    #[deprecated(
149        note = "This field is going to be deprecated, please use the 'types' field to provide the MetadataGenerationRun types",
150        since = "2025-11-21"
151    )]
152    pub fn set_type(mut self, input: ::std::option::Option<crate::types::MetadataGenerationRunType>) -> Self {
153        self.inner = self.inner.set_type(input);
154        self
155    }
156    /// <p>The type of the metadata generation run.</p>
157    #[deprecated(
158        note = "This field is going to be deprecated, please use the 'types' field to provide the MetadataGenerationRun types",
159        since = "2025-11-21"
160    )]
161    pub fn get_type(&self) -> &::std::option::Option<crate::types::MetadataGenerationRunType> {
162        self.inner.get_type()
163    }
164    ///
165    /// Appends an item to `types`.
166    ///
167    /// To override the contents of this collection use [`set_types`](Self::set_types).
168    ///
169    /// <p>The types of the metadata generation run.</p>
170    pub fn types(mut self, input: crate::types::MetadataGenerationRunType) -> Self {
171        self.inner = self.inner.types(input);
172        self
173    }
174    /// <p>The types of the metadata generation run.</p>
175    pub fn set_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MetadataGenerationRunType>>) -> Self {
176        self.inner = self.inner.set_types(input);
177        self
178    }
179    /// <p>The types of the metadata generation run.</p>
180    pub fn get_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MetadataGenerationRunType>> {
181        self.inner.get_types()
182    }
183    /// <p>The asset for which you want to start a metadata generation run.</p>
184    pub fn target(mut self, input: crate::types::MetadataGenerationRunTarget) -> Self {
185        self.inner = self.inner.target(input);
186        self
187    }
188    /// <p>The asset for which you want to start a metadata generation run.</p>
189    pub fn set_target(mut self, input: ::std::option::Option<crate::types::MetadataGenerationRunTarget>) -> Self {
190        self.inner = self.inner.set_target(input);
191        self
192    }
193    /// <p>The asset for which you want to start a metadata generation run.</p>
194    pub fn get_target(&self) -> &::std::option::Option<crate::types::MetadataGenerationRunTarget> {
195        self.inner.get_target()
196    }
197    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
198    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.inner = self.inner.client_token(input.into());
200        self
201    }
202    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
203    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.inner = self.inner.set_client_token(input);
205        self
206    }
207    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
208    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
209        self.inner.get_client_token()
210    }
211    /// <p>The ID of the project that owns the asset for which you want to start a metadata generation run.</p>
212    pub fn owning_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.inner = self.inner.owning_project_identifier(input.into());
214        self
215    }
216    /// <p>The ID of the project that owns the asset for which you want to start a metadata generation run.</p>
217    pub fn set_owning_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.inner = self.inner.set_owning_project_identifier(input);
219        self
220    }
221    /// <p>The ID of the project that owns the asset for which you want to start a metadata generation run.</p>
222    pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
223        self.inner.get_owning_project_identifier()
224    }
225}