aws_sdk_datazone/operation/get_glossary/
_get_glossary_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetGlossaryOutput {
6    /// <p>The ID of the Amazon DataZone domain in which this business glossary exists.</p>
7    pub domain_id: ::std::string::String,
8    /// <p>The ID of the business glossary.</p>
9    pub id: ::std::string::String,
10    /// <p>The ID of the project that owns this business glossary.</p>
11    pub owning_project_id: ::std::string::String,
12    /// <p>The name of the business glossary.</p>
13    pub name: ::std::string::String,
14    /// <p>The description of the business glossary.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The status of the business glossary.</p>
17    pub status: crate::types::GlossaryStatus,
18    /// <p>The timestamp of when this business glossary was created.</p>
19    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The Amazon DataZone user who created this business glossary.</p>
21    pub created_by: ::std::option::Option<::std::string::String>,
22    /// <p>The timestamp of when the business glossary was updated.</p>
23    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The Amazon DataZone user who updated the business glossary.</p>
25    pub updated_by: ::std::option::Option<::std::string::String>,
26    _request_id: Option<String>,
27}
28impl GetGlossaryOutput {
29    /// <p>The ID of the Amazon DataZone domain in which this business glossary exists.</p>
30    pub fn domain_id(&self) -> &str {
31        use std::ops::Deref;
32        self.domain_id.deref()
33    }
34    /// <p>The ID of the business glossary.</p>
35    pub fn id(&self) -> &str {
36        use std::ops::Deref;
37        self.id.deref()
38    }
39    /// <p>The ID of the project that owns this business glossary.</p>
40    pub fn owning_project_id(&self) -> &str {
41        use std::ops::Deref;
42        self.owning_project_id.deref()
43    }
44    /// <p>The name of the business glossary.</p>
45    pub fn name(&self) -> &str {
46        use std::ops::Deref;
47        self.name.deref()
48    }
49    /// <p>The description of the business glossary.</p>
50    pub fn description(&self) -> ::std::option::Option<&str> {
51        self.description.as_deref()
52    }
53    /// <p>The status of the business glossary.</p>
54    pub fn status(&self) -> &crate::types::GlossaryStatus {
55        &self.status
56    }
57    /// <p>The timestamp of when this business glossary was created.</p>
58    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59        self.created_at.as_ref()
60    }
61    /// <p>The Amazon DataZone user who created this business glossary.</p>
62    pub fn created_by(&self) -> ::std::option::Option<&str> {
63        self.created_by.as_deref()
64    }
65    /// <p>The timestamp of when the business glossary was updated.</p>
66    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67        self.updated_at.as_ref()
68    }
69    /// <p>The Amazon DataZone user who updated the business glossary.</p>
70    pub fn updated_by(&self) -> ::std::option::Option<&str> {
71        self.updated_by.as_deref()
72    }
73}
74impl ::std::fmt::Debug for GetGlossaryOutput {
75    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
76        let mut formatter = f.debug_struct("GetGlossaryOutput");
77        formatter.field("domain_id", &self.domain_id);
78        formatter.field("id", &self.id);
79        formatter.field("owning_project_id", &self.owning_project_id);
80        formatter.field("name", &"*** Sensitive Data Redacted ***");
81        formatter.field("description", &"*** Sensitive Data Redacted ***");
82        formatter.field("status", &self.status);
83        formatter.field("created_at", &self.created_at);
84        formatter.field("created_by", &self.created_by);
85        formatter.field("updated_at", &self.updated_at);
86        formatter.field("updated_by", &self.updated_by);
87        formatter.field("_request_id", &self._request_id);
88        formatter.finish()
89    }
90}
91impl ::aws_types::request_id::RequestId for GetGlossaryOutput {
92    fn request_id(&self) -> Option<&str> {
93        self._request_id.as_deref()
94    }
95}
96impl GetGlossaryOutput {
97    /// Creates a new builder-style object to manufacture [`GetGlossaryOutput`](crate::operation::get_glossary::GetGlossaryOutput).
98    pub fn builder() -> crate::operation::get_glossary::builders::GetGlossaryOutputBuilder {
99        crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::default()
100    }
101}
102
103/// A builder for [`GetGlossaryOutput`](crate::operation::get_glossary::GetGlossaryOutput).
104#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
105#[non_exhaustive]
106pub struct GetGlossaryOutputBuilder {
107    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
108    pub(crate) id: ::std::option::Option<::std::string::String>,
109    pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
110    pub(crate) name: ::std::option::Option<::std::string::String>,
111    pub(crate) description: ::std::option::Option<::std::string::String>,
112    pub(crate) status: ::std::option::Option<crate::types::GlossaryStatus>,
113    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
114    pub(crate) created_by: ::std::option::Option<::std::string::String>,
115    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
116    pub(crate) updated_by: ::std::option::Option<::std::string::String>,
117    _request_id: Option<String>,
118}
119impl GetGlossaryOutputBuilder {
120    /// <p>The ID of the Amazon DataZone domain in which this business glossary exists.</p>
121    /// This field is required.
122    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.domain_id = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The ID of the Amazon DataZone domain in which this business glossary exists.</p>
127    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.domain_id = input;
129        self
130    }
131    /// <p>The ID of the Amazon DataZone domain in which this business glossary exists.</p>
132    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
133        &self.domain_id
134    }
135    /// <p>The ID of the business glossary.</p>
136    /// This field is required.
137    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.id = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The ID of the business glossary.</p>
142    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.id = input;
144        self
145    }
146    /// <p>The ID of the business glossary.</p>
147    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
148        &self.id
149    }
150    /// <p>The ID of the project that owns this business glossary.</p>
151    /// This field is required.
152    pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.owning_project_id = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The ID of the project that owns this business glossary.</p>
157    pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.owning_project_id = input;
159        self
160    }
161    /// <p>The ID of the project that owns this business glossary.</p>
162    pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
163        &self.owning_project_id
164    }
165    /// <p>The name of the business glossary.</p>
166    /// This field is required.
167    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168        self.name = ::std::option::Option::Some(input.into());
169        self
170    }
171    /// <p>The name of the business glossary.</p>
172    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.name = input;
174        self
175    }
176    /// <p>The name of the business glossary.</p>
177    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
178        &self.name
179    }
180    /// <p>The description of the business glossary.</p>
181    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.description = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>The description of the business glossary.</p>
186    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.description = input;
188        self
189    }
190    /// <p>The description of the business glossary.</p>
191    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
192        &self.description
193    }
194    /// <p>The status of the business glossary.</p>
195    /// This field is required.
196    pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
197        self.status = ::std::option::Option::Some(input);
198        self
199    }
200    /// <p>The status of the business glossary.</p>
201    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
202        self.status = input;
203        self
204    }
205    /// <p>The status of the business glossary.</p>
206    pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryStatus> {
207        &self.status
208    }
209    /// <p>The timestamp of when this business glossary was created.</p>
210    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
211        self.created_at = ::std::option::Option::Some(input);
212        self
213    }
214    /// <p>The timestamp of when this business glossary was created.</p>
215    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
216        self.created_at = input;
217        self
218    }
219    /// <p>The timestamp of when this business glossary was created.</p>
220    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
221        &self.created_at
222    }
223    /// <p>The Amazon DataZone user who created this business glossary.</p>
224    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225        self.created_by = ::std::option::Option::Some(input.into());
226        self
227    }
228    /// <p>The Amazon DataZone user who created this business glossary.</p>
229    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230        self.created_by = input;
231        self
232    }
233    /// <p>The Amazon DataZone user who created this business glossary.</p>
234    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
235        &self.created_by
236    }
237    /// <p>The timestamp of when the business glossary was updated.</p>
238    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
239        self.updated_at = ::std::option::Option::Some(input);
240        self
241    }
242    /// <p>The timestamp of when the business glossary was updated.</p>
243    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
244        self.updated_at = input;
245        self
246    }
247    /// <p>The timestamp of when the business glossary was updated.</p>
248    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
249        &self.updated_at
250    }
251    /// <p>The Amazon DataZone user who updated the business glossary.</p>
252    pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253        self.updated_by = ::std::option::Option::Some(input.into());
254        self
255    }
256    /// <p>The Amazon DataZone user who updated the business glossary.</p>
257    pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.updated_by = input;
259        self
260    }
261    /// <p>The Amazon DataZone user who updated the business glossary.</p>
262    pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
263        &self.updated_by
264    }
265    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
266        self._request_id = Some(request_id.into());
267        self
268    }
269
270    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
271        self._request_id = request_id;
272        self
273    }
274    /// Consumes the builder and constructs a [`GetGlossaryOutput`](crate::operation::get_glossary::GetGlossaryOutput).
275    /// This method will fail if any of the following fields are not set:
276    /// - [`domain_id`](crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::domain_id)
277    /// - [`id`](crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::id)
278    /// - [`owning_project_id`](crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::owning_project_id)
279    /// - [`name`](crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::name)
280    /// - [`status`](crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::status)
281    pub fn build(self) -> ::std::result::Result<crate::operation::get_glossary::GetGlossaryOutput, ::aws_smithy_types::error::operation::BuildError> {
282        ::std::result::Result::Ok(crate::operation::get_glossary::GetGlossaryOutput {
283            domain_id: self.domain_id.ok_or_else(|| {
284                ::aws_smithy_types::error::operation::BuildError::missing_field(
285                    "domain_id",
286                    "domain_id was not specified but it is required when building GetGlossaryOutput",
287                )
288            })?,
289            id: self.id.ok_or_else(|| {
290                ::aws_smithy_types::error::operation::BuildError::missing_field(
291                    "id",
292                    "id was not specified but it is required when building GetGlossaryOutput",
293                )
294            })?,
295            owning_project_id: self.owning_project_id.ok_or_else(|| {
296                ::aws_smithy_types::error::operation::BuildError::missing_field(
297                    "owning_project_id",
298                    "owning_project_id was not specified but it is required when building GetGlossaryOutput",
299                )
300            })?,
301            name: self.name.ok_or_else(|| {
302                ::aws_smithy_types::error::operation::BuildError::missing_field(
303                    "name",
304                    "name was not specified but it is required when building GetGlossaryOutput",
305                )
306            })?,
307            description: self.description,
308            status: self.status.ok_or_else(|| {
309                ::aws_smithy_types::error::operation::BuildError::missing_field(
310                    "status",
311                    "status was not specified but it is required when building GetGlossaryOutput",
312                )
313            })?,
314            created_at: self.created_at,
315            created_by: self.created_by,
316            updated_at: self.updated_at,
317            updated_by: self.updated_by,
318            _request_id: self._request_id,
319        })
320    }
321}
322impl ::std::fmt::Debug for GetGlossaryOutputBuilder {
323    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
324        let mut formatter = f.debug_struct("GetGlossaryOutputBuilder");
325        formatter.field("domain_id", &self.domain_id);
326        formatter.field("id", &self.id);
327        formatter.field("owning_project_id", &self.owning_project_id);
328        formatter.field("name", &"*** Sensitive Data Redacted ***");
329        formatter.field("description", &"*** Sensitive Data Redacted ***");
330        formatter.field("status", &self.status);
331        formatter.field("created_at", &self.created_at);
332        formatter.field("created_by", &self.created_by);
333        formatter.field("updated_at", &self.updated_at);
334        formatter.field("updated_by", &self.updated_by);
335        formatter.field("_request_id", &self._request_id);
336        formatter.finish()
337    }
338}