aws_sdk_datazone/operation/get_glossary/
_get_glossary_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetGlossaryOutput {
6 pub domain_id: ::std::string::String,
8 pub id: ::std::string::String,
10 pub owning_project_id: ::std::string::String,
12 pub name: ::std::string::String,
14 pub description: ::std::option::Option<::std::string::String>,
16 pub status: crate::types::GlossaryStatus,
18 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub created_by: ::std::option::Option<::std::string::String>,
22 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24 pub updated_by: ::std::option::Option<::std::string::String>,
26 _request_id: Option<String>,
27}
28impl GetGlossaryOutput {
29 pub fn domain_id(&self) -> &str {
31 use std::ops::Deref;
32 self.domain_id.deref()
33 }
34 pub fn id(&self) -> &str {
36 use std::ops::Deref;
37 self.id.deref()
38 }
39 pub fn owning_project_id(&self) -> &str {
41 use std::ops::Deref;
42 self.owning_project_id.deref()
43 }
44 pub fn name(&self) -> &str {
46 use std::ops::Deref;
47 self.name.deref()
48 }
49 pub fn description(&self) -> ::std::option::Option<&str> {
51 self.description.as_deref()
52 }
53 pub fn status(&self) -> &crate::types::GlossaryStatus {
55 &self.status
56 }
57 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59 self.created_at.as_ref()
60 }
61 pub fn created_by(&self) -> ::std::option::Option<&str> {
63 self.created_by.as_deref()
64 }
65 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67 self.updated_at.as_ref()
68 }
69 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 pub fn builder() -> crate::operation::get_glossary::builders::GetGlossaryOutputBuilder {
99 crate::operation::get_glossary::builders::GetGlossaryOutputBuilder::default()
100 }
101}
102
103#[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 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 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.domain_id = input;
129 self
130 }
131 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
133 &self.domain_id
134 }
135 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.id = input;
144 self
145 }
146 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
148 &self.id
149 }
150 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 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 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
163 &self.owning_project_id
164 }
165 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.name = input;
174 self
175 }
176 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
178 &self.name
179 }
180 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.description = input;
188 self
189 }
190 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
192 &self.description
193 }
194 pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
197 self.status = ::std::option::Option::Some(input);
198 self
199 }
200 pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
202 self.status = input;
203 self
204 }
205 pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryStatus> {
207 &self.status
208 }
209 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 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 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
221 &self.created_at
222 }
223 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 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.created_by = input;
231 self
232 }
233 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
235 &self.created_by
236 }
237 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 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 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
249 &self.updated_at
250 }
251 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 pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.updated_by = input;
259 self
260 }
261 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 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}