aws_sdk_datazone/operation/update_glossary/
_update_glossary_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateGlossaryOutput {
6 pub domain_id: ::std::string::String,
8 pub id: ::std::string::String,
10 pub name: ::std::string::String,
12 pub owning_project_id: ::std::string::String,
14 pub description: ::std::option::Option<::std::string::String>,
16 pub status: ::std::option::Option<crate::types::GlossaryStatus>,
18 _request_id: Option<String>,
19}
20impl UpdateGlossaryOutput {
21 pub fn domain_id(&self) -> &str {
23 use std::ops::Deref;
24 self.domain_id.deref()
25 }
26 pub fn id(&self) -> &str {
28 use std::ops::Deref;
29 self.id.deref()
30 }
31 pub fn name(&self) -> &str {
33 use std::ops::Deref;
34 self.name.deref()
35 }
36 pub fn owning_project_id(&self) -> &str {
38 use std::ops::Deref;
39 self.owning_project_id.deref()
40 }
41 pub fn description(&self) -> ::std::option::Option<&str> {
43 self.description.as_deref()
44 }
45 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 pub fn builder() -> crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder {
71 crate::operation::update_glossary::builders::UpdateGlossaryOutputBuilder::default()
72 }
73}
74
75#[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 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 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.domain_id = input;
97 self
98 }
99 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
101 &self.domain_id
102 }
103 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.id = input;
112 self
113 }
114 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
116 &self.id
117 }
118 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.name = input;
127 self
128 }
129 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
131 &self.name
132 }
133 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 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 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
146 &self.owning_project_id
147 }
148 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.description = input;
156 self
157 }
158 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
160 &self.description
161 }
162 pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
164 self.status = ::std::option::Option::Some(input);
165 self
166 }
167 pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
169 self.status = input;
170 self
171 }
172 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 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}