aws_sdk_datazone/operation/create_glossary_term/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_glossary_term::_create_glossary_term_output::CreateGlossaryTermOutputBuilder;
3
4pub use crate::operation::create_glossary_term::_create_glossary_term_input::CreateGlossaryTermInputBuilder;
5
6impl crate::operation::create_glossary_term::builders::CreateGlossaryTermInputBuilder {
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::create_glossary_term::CreateGlossaryTermOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_glossary_term::CreateGlossaryTermError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_glossary_term();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateGlossaryTerm`.
24///
25/// <p>Creates a business glossary term.</p>
26/// <p>A glossary term represents an individual entry within the Amazon DataZone glossary, serving as a standardized definition for a specific business concept or data element. Each term can include rich metadata such as detailed definitions, synonyms, related terms, and usage examples. Glossary terms can be linked directly to data assets, providing business context to technical data elements. This linking capability helps users understand the business meaning of data fields and ensures consistent interpretation across different systems and teams. Terms can also have relationships with other terms, creating a semantic network that reflects the complexity of business concepts.</p>
27/// <p>Prerequisites:</p>
28/// <ul>
29/// <li>
30/// <p>Domain must exist.</p></li>
31/// <li>
32/// <p>Glossary must exist.</p></li>
33/// <li>
34/// <p>The term name must be unique within the glossary.</p></li>
35/// <li>
36/// <p>Ensure term does not conflict with existing terms in hierarchy.</p></li>
37/// </ul>
38#[derive(::std::clone::Clone, ::std::fmt::Debug)]
39pub struct CreateGlossaryTermFluentBuilder {
40    handle: ::std::sync::Arc<crate::client::Handle>,
41    inner: crate::operation::create_glossary_term::builders::CreateGlossaryTermInputBuilder,
42    config_override: ::std::option::Option<crate::config::Builder>,
43}
44impl
45    crate::client::customize::internal::CustomizableSend<
46        crate::operation::create_glossary_term::CreateGlossaryTermOutput,
47        crate::operation::create_glossary_term::CreateGlossaryTermError,
48    > for CreateGlossaryTermFluentBuilder
49{
50    fn send(
51        self,
52        config_override: crate::config::Builder,
53    ) -> crate::client::customize::internal::BoxFuture<
54        crate::client::customize::internal::SendResult<
55            crate::operation::create_glossary_term::CreateGlossaryTermOutput,
56            crate::operation::create_glossary_term::CreateGlossaryTermError,
57        >,
58    > {
59        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
60    }
61}
62impl CreateGlossaryTermFluentBuilder {
63    /// Creates a new `CreateGlossaryTermFluentBuilder`.
64    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
65        Self {
66            handle,
67            inner: ::std::default::Default::default(),
68            config_override: ::std::option::Option::None,
69        }
70    }
71    /// Access the CreateGlossaryTerm as a reference.
72    pub fn as_input(&self) -> &crate::operation::create_glossary_term::builders::CreateGlossaryTermInputBuilder {
73        &self.inner
74    }
75    /// Sends the request and returns the response.
76    ///
77    /// If an error occurs, an `SdkError` will be returned with additional details that
78    /// can be matched against.
79    ///
80    /// By default, any retryable failures will be retried twice. Retry behavior
81    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
82    /// set when configuring the client.
83    pub async fn send(
84        self,
85    ) -> ::std::result::Result<
86        crate::operation::create_glossary_term::CreateGlossaryTermOutput,
87        ::aws_smithy_runtime_api::client::result::SdkError<
88            crate::operation::create_glossary_term::CreateGlossaryTermError,
89            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
90        >,
91    > {
92        let input = self
93            .inner
94            .build()
95            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
96        let runtime_plugins = crate::operation::create_glossary_term::CreateGlossaryTerm::operation_runtime_plugins(
97            self.handle.runtime_plugins.clone(),
98            &self.handle.conf,
99            self.config_override,
100        );
101        crate::operation::create_glossary_term::CreateGlossaryTerm::orchestrate(&runtime_plugins, input).await
102    }
103
104    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105    pub fn customize(
106        self,
107    ) -> crate::client::customize::CustomizableOperation<
108        crate::operation::create_glossary_term::CreateGlossaryTermOutput,
109        crate::operation::create_glossary_term::CreateGlossaryTermError,
110        Self,
111    > {
112        crate::client::customize::CustomizableOperation::new(self)
113    }
114    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115        self.set_config_override(::std::option::Option::Some(config_override.into()));
116        self
117    }
118
119    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120        self.config_override = config_override;
121        self
122    }
123    /// <p>The ID of the Amazon DataZone domain in which this business glossary term is created.</p>
124    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.inner = self.inner.domain_identifier(input.into());
126        self
127    }
128    /// <p>The ID of the Amazon DataZone domain in which this business glossary term is created.</p>
129    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.inner = self.inner.set_domain_identifier(input);
131        self
132    }
133    /// <p>The ID of the Amazon DataZone domain in which this business glossary term is created.</p>
134    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
135        self.inner.get_domain_identifier()
136    }
137    /// <p>The ID of the business glossary in which this term is created.</p>
138    pub fn glossary_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.inner = self.inner.glossary_identifier(input.into());
140        self
141    }
142    /// <p>The ID of the business glossary in which this term is created.</p>
143    pub fn set_glossary_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.inner = self.inner.set_glossary_identifier(input);
145        self
146    }
147    /// <p>The ID of the business glossary in which this term is created.</p>
148    pub fn get_glossary_identifier(&self) -> &::std::option::Option<::std::string::String> {
149        self.inner.get_glossary_identifier()
150    }
151    /// <p>The name of this business glossary term.</p>
152    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.inner = self.inner.name(input.into());
154        self
155    }
156    /// <p>The name of this business glossary term.</p>
157    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.inner = self.inner.set_name(input);
159        self
160    }
161    /// <p>The name of this business glossary term.</p>
162    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
163        self.inner.get_name()
164    }
165    /// <p>The status of this business glossary term.</p>
166    pub fn status(mut self, input: crate::types::GlossaryTermStatus) -> Self {
167        self.inner = self.inner.status(input);
168        self
169    }
170    /// <p>The status of this business glossary term.</p>
171    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryTermStatus>) -> Self {
172        self.inner = self.inner.set_status(input);
173        self
174    }
175    /// <p>The status of this business glossary term.</p>
176    pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryTermStatus> {
177        self.inner.get_status()
178    }
179    /// <p>The short description of this business glossary term.</p>
180    pub fn short_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.inner = self.inner.short_description(input.into());
182        self
183    }
184    /// <p>The short description of this business glossary term.</p>
185    pub fn set_short_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.inner = self.inner.set_short_description(input);
187        self
188    }
189    /// <p>The short description of this business glossary term.</p>
190    pub fn get_short_description(&self) -> &::std::option::Option<::std::string::String> {
191        self.inner.get_short_description()
192    }
193    /// <p>The long description of this business glossary term.</p>
194    pub fn long_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.long_description(input.into());
196        self
197    }
198    /// <p>The long description of this business glossary term.</p>
199    pub fn set_long_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.inner = self.inner.set_long_description(input);
201        self
202    }
203    /// <p>The long description of this business glossary term.</p>
204    pub fn get_long_description(&self) -> &::std::option::Option<::std::string::String> {
205        self.inner.get_long_description()
206    }
207    /// <p>The term relations of this business glossary term.</p>
208    pub fn term_relations(mut self, input: crate::types::TermRelations) -> Self {
209        self.inner = self.inner.term_relations(input);
210        self
211    }
212    /// <p>The term relations of this business glossary term.</p>
213    pub fn set_term_relations(mut self, input: ::std::option::Option<crate::types::TermRelations>) -> Self {
214        self.inner = self.inner.set_term_relations(input);
215        self
216    }
217    /// <p>The term relations of this business glossary term.</p>
218    pub fn get_term_relations(&self) -> &::std::option::Option<crate::types::TermRelations> {
219        self.inner.get_term_relations()
220    }
221    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
222    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.inner = self.inner.client_token(input.into());
224        self
225    }
226    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
227    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.inner = self.inner.set_client_token(input);
229        self
230    }
231    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
232    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_client_token()
234    }
235}