aws_sdk_datazone/operation/update_glossary/
_update_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 UpdateGlossaryOutput {
6    /// <p>The identifier of the Amazon DataZone domain in which a business glossary is to be updated.</p>
7    pub domain_id: ::std::string::String,
8    /// <p>The identifier of the business glossary that is to be updated.</p>
9    pub id: ::std::string::String,
10    /// <p>The name to be updated as part of the <code>UpdateGlossary</code> action.</p>
11    pub name: ::std::string::String,
12    /// <p>The identifier of the project in which to update a business glossary.</p>
13    pub owning_project_id: ::std::string::String,
14    /// <p>The description to be updated as part of the <code>UpdateGlossary</code> action.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The status to be updated as part of the <code>UpdateGlossary</code> action.</p>
17    pub status: ::std::option::Option<crate::types::GlossaryStatus>,
18    _request_id: Option<String>,
19}
20impl UpdateGlossaryOutput {
21    /// <p>The identifier of the Amazon DataZone domain in which a business glossary is to be updated.</p>
22    pub fn domain_id(&self) -> &str {
23        use std::ops::Deref;
24        self.domain_id.deref()
25    }
26    /// <p>The identifier of the business glossary that is to be updated.</p>
27    pub fn id(&self) -> &str {
28        use std::ops::Deref;
29        self.id.deref()
30    }
31    /// <p>The name to be updated as part of the <code>UpdateGlossary</code> action.</p>
32    pub fn name(&self) -> &str {
33        use std::ops::Deref;
34        self.name.deref()
35    }
36    /// <p>The identifier of the project in which to update a business glossary.</p>
37    pub fn owning_project_id(&self) -> &str {
38        use std::ops::Deref;
39        self.owning_project_id.deref()
40    }
41    /// <p>The description to be updated as part of the <code>UpdateGlossary</code> action.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45    /// <p>The status to be updated as part of the <code>UpdateGlossary</code> action.</p>
46    pub fn status(&self) -> ::std::option::Option<&crate::types::GlossaryStatus> {
47        self.status.as_ref()
48    }
49}
50impl ::std::fmt::Debug for UpdateGlossaryOutput {
51    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
52        let mut formatter = f.debug_struct("UpdateGlossaryOutput");
53        formatter.field("domain_id", &self.domain_id);
54        formatter.field("id", &self.id);
55        formatter.field("name", &"*** Sensitive Data Redacted ***");
56        formatter.field("owning_project_id", &self.owning_project_id);
57        formatter.field("description", &"*** Sensitive Data Redacted ***");
58        formatter.field("status", &self.status);
59        formatter.field("_request_id", &self._request_id);
60        formatter.finish()
61    }
62}
63impl ::aws_types::request_id::RequestId for UpdateGlossaryOutput {
64    fn request_id(&self) -> Option<&str> {
65        self._request_id.as_deref()
66    }
67}
68impl UpdateGlossaryOutput {
69    /// Creates a new builder-style object to manufacture [`UpdateGlossaryOutput`](crate::operation::update_glossary::UpdateGlossaryOutput).
70    pub fn builder() -> crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder {
71        crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder::default()
72    }
73}
74
75/// A builder for [`UpdateGlossaryOutput`](crate::operation::update_glossary::UpdateGlossaryOutput).
76#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
77#[non_exhaustive]
78pub struct UpdateGlossaryOutputBuilder {
79    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
80    pub(crate) id: ::std::option::Option<::std::string::String>,
81    pub(crate) name: ::std::option::Option<::std::string::String>,
82    pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
83    pub(crate) description: ::std::option::Option<::std::string::String>,
84    pub(crate) status: ::std::option::Option<crate::types::GlossaryStatus>,
85    _request_id: Option<String>,
86}
87impl UpdateGlossaryOutputBuilder {
88    /// <p>The identifier of the Amazon DataZone domain in which a business glossary is to be updated.</p>
89    /// This field is required.
90    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91        self.domain_id = ::std::option::Option::Some(input.into());
92        self
93    }
94    /// <p>The identifier of the Amazon DataZone domain in which a business glossary is to be updated.</p>
95    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96        self.domain_id = input;
97        self
98    }
99    /// <p>The identifier of the Amazon DataZone domain in which a business glossary is to be updated.</p>
100    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
101        &self.domain_id
102    }
103    /// <p>The identifier of the business glossary that is to be updated.</p>
104    /// This field is required.
105    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.id = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// <p>The identifier of the business glossary that is to be updated.</p>
110    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.id = input;
112        self
113    }
114    /// <p>The identifier of the business glossary that is to be updated.</p>
115    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
116        &self.id
117    }
118    /// <p>The name to be updated as part of the <code>UpdateGlossary</code> action.</p>
119    /// This field is required.
120    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.name = ::std::option::Option::Some(input.into());
122        self
123    }
124    /// <p>The name to be updated as part of the <code>UpdateGlossary</code> action.</p>
125    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.name = input;
127        self
128    }
129    /// <p>The name to be updated as part of the <code>UpdateGlossary</code> action.</p>
130    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
131        &self.name
132    }
133    /// <p>The identifier of the project in which to update a business glossary.</p>
134    /// This field is required.
135    pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.owning_project_id = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The identifier of the project in which to update a business glossary.</p>
140    pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.owning_project_id = input;
142        self
143    }
144    /// <p>The identifier of the project in which to update a business glossary.</p>
145    pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
146        &self.owning_project_id
147    }
148    /// <p>The description to be updated as part of the <code>UpdateGlossary</code> action.</p>
149    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.description = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The description to be updated as part of the <code>UpdateGlossary</code> action.</p>
154    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.description = input;
156        self
157    }
158    /// <p>The description to be updated as part of the <code>UpdateGlossary</code> action.</p>
159    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
160        &self.description
161    }
162    /// <p>The status to be updated as part of the <code>UpdateGlossary</code> action.</p>
163    pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
164        self.status = ::std::option::Option::Some(input);
165        self
166    }
167    /// <p>The status to be updated as part of the <code>UpdateGlossary</code> action.</p>
168    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
169        self.status = input;
170        self
171    }
172    /// <p>The status to be updated as part of the <code>UpdateGlossary</code> action.</p>
173    pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryStatus> {
174        &self.status
175    }
176    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
177        self._request_id = Some(request_id.into());
178        self
179    }
180
181    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
182        self._request_id = request_id;
183        self
184    }
185    /// Consumes the builder and constructs a [`UpdateGlossaryOutput`](crate::operation::update_glossary::UpdateGlossaryOutput).
186    /// This method will fail if any of the following fields are not set:
187    /// - [`domain_id`](crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder::domain_id)
188    /// - [`id`](crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder::id)
189    /// - [`name`](crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder::name)
190    /// - [`owning_project_id`](crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder::owning_project_id)
191    pub fn build(
192        self,
193    ) -> ::std::result::Result<crate::operation::update_glossary::UpdateGlossaryOutput, ::aws_smithy_types::error::operation::BuildError> {
194        ::std::result::Result::Ok(crate::operation::update_glossary::UpdateGlossaryOutput {
195            domain_id: self.domain_id.ok_or_else(|| {
196                ::aws_smithy_types::error::operation::BuildError::missing_field(
197                    "domain_id",
198                    "domain_id was not specified but it is required when building UpdateGlossaryOutput",
199                )
200            })?,
201            id: self.id.ok_or_else(|| {
202                ::aws_smithy_types::error::operation::BuildError::missing_field(
203                    "id",
204                    "id was not specified but it is required when building UpdateGlossaryOutput",
205                )
206            })?,
207            name: self.name.ok_or_else(|| {
208                ::aws_smithy_types::error::operation::BuildError::missing_field(
209                    "name",
210                    "name was not specified but it is required when building UpdateGlossaryOutput",
211                )
212            })?,
213            owning_project_id: self.owning_project_id.ok_or_else(|| {
214                ::aws_smithy_types::error::operation::BuildError::missing_field(
215                    "owning_project_id",
216                    "owning_project_id was not specified but it is required when building UpdateGlossaryOutput",
217                )
218            })?,
219            description: self.description,
220            status: self.status,
221            _request_id: self._request_id,
222        })
223    }
224}
225impl ::std::fmt::Debug for UpdateGlossaryOutputBuilder {
226    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
227        let mut formatter = f.debug_struct("UpdateGlossaryOutputBuilder");
228        formatter.field("domain_id", &self.domain_id);
229        formatter.field("id", &self.id);
230        formatter.field("name", &"*** Sensitive Data Redacted ***");
231        formatter.field("owning_project_id", &self.owning_project_id);
232        formatter.field("description", &"*** Sensitive Data Redacted ***");
233        formatter.field("status", &self.status);
234        formatter.field("_request_id", &self._request_id);
235        formatter.finish()
236    }
237}