aws_sdk_datazone/operation/create_glossary/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_glossary::_create_glossary_output::CreateGlossaryOutputBuilder;
3
4pub use crate::operation::create_glossary::_create_glossary_input::CreateGlossaryInputBuilder;
5
6impl crate::operation::create_glossary::builders::CreateGlossaryInputBuilder {
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::CreateGlossaryOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_glossary::CreateGlossaryError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_glossary();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateGlossary`.
24///
25/// <p>Creates an Amazon DataZone business glossary.</p>
26/// <p>Specifies that this is a create glossary policy.</p>
27/// <p>A glossary serves as the central repository for business terminology and definitions within an organization. It helps establish and maintain a common language across different departments and teams, reducing miscommunication and ensuring consistent interpretation of business concepts. Glossaries can include hierarchical relationships between terms, cross-references, and links to actual data assets, making them invaluable for both business users and technical teams trying to understand and use data correctly.</p>
28/// <p>Prerequisites:</p>
29/// <ul>
30/// <li>
31/// <p>Domain must exist and be in an active state.</p></li>
32/// <li>
33/// <p>Owning project must exist and be accessible by the caller.</p></li>
34/// <li>
35/// <p>The glossary name must be unique within the domain.</p></li>
36/// </ul>
37#[derive(::std::clone::Clone, ::std::fmt::Debug)]
38pub struct CreateGlossaryFluentBuilder {
39    handle: ::std::sync::Arc<crate::client::Handle>,
40    inner: crate::operation::create_glossary::builders::CreateGlossaryInputBuilder,
41    config_override: ::std::option::Option<crate::config::Builder>,
42}
43impl
44    crate::client::customize::internal::CustomizableSend<
45        crate::operation::create_glossary::CreateGlossaryOutput,
46        crate::operation::create_glossary::CreateGlossaryError,
47    > for CreateGlossaryFluentBuilder
48{
49    fn send(
50        self,
51        config_override: crate::config::Builder,
52    ) -> crate::client::customize::internal::BoxFuture<
53        crate::client::customize::internal::SendResult<
54            crate::operation::create_glossary::CreateGlossaryOutput,
55            crate::operation::create_glossary::CreateGlossaryError,
56        >,
57    > {
58        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59    }
60}
61impl CreateGlossaryFluentBuilder {
62    /// Creates a new `CreateGlossaryFluentBuilder`.
63    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
64        Self {
65            handle,
66            inner: ::std::default::Default::default(),
67            config_override: ::std::option::Option::None,
68        }
69    }
70    /// Access the CreateGlossary as a reference.
71    pub fn as_input(&self) -> &crate::operation::create_glossary::builders::CreateGlossaryInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::create_glossary::CreateGlossaryOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::create_glossary::CreateGlossaryError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins = crate::operation::create_glossary::CreateGlossary::operation_runtime_plugins(
96            self.handle.runtime_plugins.clone(),
97            &self.handle.conf,
98            self.config_override,
99        );
100        crate::operation::create_glossary::CreateGlossary::orchestrate(&runtime_plugins, input).await
101    }
102
103    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104    pub fn customize(
105        self,
106    ) -> crate::client::customize::CustomizableOperation<
107        crate::operation::create_glossary::CreateGlossaryOutput,
108        crate::operation::create_glossary::CreateGlossaryError,
109        Self,
110    > {
111        crate::client::customize::CustomizableOperation::new(self)
112    }
113    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114        self.set_config_override(::std::option::Option::Some(config_override.into()));
115        self
116    }
117
118    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119        self.config_override = config_override;
120        self
121    }
122    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
123    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.inner = self.inner.domain_identifier(input.into());
125        self
126    }
127    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
128    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.inner = self.inner.set_domain_identifier(input);
130        self
131    }
132    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
133    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
134        self.inner.get_domain_identifier()
135    }
136    /// <p>The name of this business glossary.</p>
137    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.name(input.into());
139        self
140    }
141    /// <p>The name of this business glossary.</p>
142    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.inner = self.inner.set_name(input);
144        self
145    }
146    /// <p>The name of this business glossary.</p>
147    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
148        self.inner.get_name()
149    }
150    /// <p>The ID of the project that currently owns business glossary.</p>
151    pub fn owning_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.inner = self.inner.owning_project_identifier(input.into());
153        self
154    }
155    /// <p>The ID of the project that currently owns business glossary.</p>
156    pub fn set_owning_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.inner = self.inner.set_owning_project_identifier(input);
158        self
159    }
160    /// <p>The ID of the project that currently owns business glossary.</p>
161    pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
162        self.inner.get_owning_project_identifier()
163    }
164    /// <p>The description of this business glossary.</p>
165    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.inner = self.inner.description(input.into());
167        self
168    }
169    /// <p>The description of this business glossary.</p>
170    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.inner = self.inner.set_description(input);
172        self
173    }
174    /// <p>The description of this business glossary.</p>
175    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
176        self.inner.get_description()
177    }
178    /// <p>The status of this business glossary.</p>
179    pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
180        self.inner = self.inner.status(input);
181        self
182    }
183    /// <p>The status of this business glossary.</p>
184    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
185        self.inner = self.inner.set_status(input);
186        self
187    }
188    /// <p>The status of this business glossary.</p>
189    pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryStatus> {
190        self.inner.get_status()
191    }
192    ///
193    /// Appends an item to `usageRestrictions`.
194    ///
195    /// To override the contents of this collection use [`set_usage_restrictions`](Self::set_usage_restrictions).
196    ///
197    /// <p>The usage restriction of the restricted glossary.</p>
198    pub fn usage_restrictions(mut self, input: crate::types::GlossaryUsageRestriction) -> Self {
199        self.inner = self.inner.usage_restrictions(input);
200        self
201    }
202    /// <p>The usage restriction of the restricted glossary.</p>
203    pub fn set_usage_restrictions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GlossaryUsageRestriction>>) -> Self {
204        self.inner = self.inner.set_usage_restrictions(input);
205        self
206    }
207    /// <p>The usage restriction of the restricted glossary.</p>
208    pub fn get_usage_restrictions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GlossaryUsageRestriction>> {
209        self.inner.get_usage_restrictions()
210    }
211    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
212    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.inner = self.inner.client_token(input.into());
214        self
215    }
216    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
217    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.inner = self.inner.set_client_token(input);
219        self
220    }
221    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
222    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
223        self.inner.get_client_token()
224    }
225}