aws_sdk_datazone/operation/create_glossary/
_create_glossary_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateGlossaryInput {
6 pub domain_identifier: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub owning_project_identifier: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub status: ::std::option::Option<crate::types::GlossaryStatus>,
16 pub client_token: ::std::option::Option<::std::string::String>,
18}
19impl CreateGlossaryInput {
20 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
22 self.domain_identifier.as_deref()
23 }
24 pub fn name(&self) -> ::std::option::Option<&str> {
26 self.name.as_deref()
27 }
28 pub fn owning_project_identifier(&self) -> ::std::option::Option<&str> {
30 self.owning_project_identifier.as_deref()
31 }
32 pub fn description(&self) -> ::std::option::Option<&str> {
34 self.description.as_deref()
35 }
36 pub fn status(&self) -> ::std::option::Option<&crate::types::GlossaryStatus> {
38 self.status.as_ref()
39 }
40 pub fn client_token(&self) -> ::std::option::Option<&str> {
42 self.client_token.as_deref()
43 }
44}
45impl ::std::fmt::Debug for CreateGlossaryInput {
46 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47 let mut formatter = f.debug_struct("CreateGlossaryInput");
48 formatter.field("domain_identifier", &self.domain_identifier);
49 formatter.field("name", &"*** Sensitive Data Redacted ***");
50 formatter.field("owning_project_identifier", &self.owning_project_identifier);
51 formatter.field("description", &"*** Sensitive Data Redacted ***");
52 formatter.field("status", &self.status);
53 formatter.field("client_token", &self.client_token);
54 formatter.finish()
55 }
56}
57impl CreateGlossaryInput {
58 pub fn builder() -> crate::operation::create_glossary::builders::CreateGlossaryInputBuilder {
60 crate::operation::create_glossary::builders::CreateGlossaryInputBuilder::default()
61 }
62}
63
64#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct CreateGlossaryInputBuilder {
68 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
69 pub(crate) name: ::std::option::Option<::std::string::String>,
70 pub(crate) owning_project_identifier: ::std::option::Option<::std::string::String>,
71 pub(crate) description: ::std::option::Option<::std::string::String>,
72 pub(crate) status: ::std::option::Option<crate::types::GlossaryStatus>,
73 pub(crate) client_token: ::std::option::Option<::std::string::String>,
74}
75impl CreateGlossaryInputBuilder {
76 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.domain_identifier = ::std::option::Option::Some(input.into());
80 self
81 }
82 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.domain_identifier = input;
85 self
86 }
87 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
89 &self.domain_identifier
90 }
91 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.name = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.name = input;
100 self
101 }
102 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
104 &self.name
105 }
106 pub fn owning_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.owning_project_identifier = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_owning_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.owning_project_identifier = input;
115 self
116 }
117 pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
119 &self.owning_project_identifier
120 }
121 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.description = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.description = input;
129 self
130 }
131 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133 &self.description
134 }
135 pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
137 self.status = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
142 self.status = input;
143 self
144 }
145 pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryStatus> {
147 &self.status
148 }
149 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.client_token = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.client_token = input;
157 self
158 }
159 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
161 &self.client_token
162 }
163 pub fn build(
165 self,
166 ) -> ::std::result::Result<crate::operation::create_glossary::CreateGlossaryInput, ::aws_smithy_types::error::operation::BuildError> {
167 ::std::result::Result::Ok(crate::operation::create_glossary::CreateGlossaryInput {
168 domain_identifier: self.domain_identifier,
169 name: self.name,
170 owning_project_identifier: self.owning_project_identifier,
171 description: self.description,
172 status: self.status,
173 client_token: self.client_token,
174 })
175 }
176}
177impl ::std::fmt::Debug for CreateGlossaryInputBuilder {
178 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
179 let mut formatter = f.debug_struct("CreateGlossaryInputBuilder");
180 formatter.field("domain_identifier", &self.domain_identifier);
181 formatter.field("name", &"*** Sensitive Data Redacted ***");
182 formatter.field("owning_project_identifier", &self.owning_project_identifier);
183 formatter.field("description", &"*** Sensitive Data Redacted ***");
184 formatter.field("status", &self.status);
185 formatter.field("client_token", &self.client_token);
186 formatter.finish()
187 }
188}