aws_sdk_datazone/operation/create_glossary/
_create_glossary_input.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 CreateGlossaryInput {
6    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The name of this business glossary.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the project that currently owns business glossary.</p>
11    pub owning_project_identifier: ::std::option::Option<::std::string::String>,
12    /// <p>The description of this business glossary.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The status of this business glossary.</p>
15    pub status: ::std::option::Option<crate::types::GlossaryStatus>,
16    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
17    pub client_token: ::std::option::Option<::std::string::String>,
18}
19impl CreateGlossaryInput {
20    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
21    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
22        self.domain_identifier.as_deref()
23    }
24    /// <p>The name of this business glossary.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The ID of the project that currently owns business glossary.</p>
29    pub fn owning_project_identifier(&self) -> ::std::option::Option<&str> {
30        self.owning_project_identifier.as_deref()
31    }
32    /// <p>The description of this business glossary.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>The status of this business glossary.</p>
37    pub fn status(&self) -> ::std::option::Option<&crate::types::GlossaryStatus> {
38        self.status.as_ref()
39    }
40    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
41    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    /// Creates a new builder-style object to manufacture [`CreateGlossaryInput`](crate::operation::create_glossary::CreateGlossaryInput).
59    pub fn builder() -> crate::operation::create_glossary::builders::CreateGlossaryInputBuilder {
60        crate::operation::create_glossary::builders::CreateGlossaryInputBuilder::default()
61    }
62}
63
64/// A builder for [`CreateGlossaryInput`](crate::operation::create_glossary::CreateGlossaryInput).
65#[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    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
77    /// This field is required.
78    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    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
83    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.domain_identifier = input;
85        self
86    }
87    /// <p>The ID of the Amazon DataZone domain in which this business glossary is created.</p>
88    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
89        &self.domain_identifier
90    }
91    /// <p>The name of this business glossary.</p>
92    /// This field is required.
93    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    /// <p>The name of this business glossary.</p>
98    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.name = input;
100        self
101    }
102    /// <p>The name of this business glossary.</p>
103    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
104        &self.name
105    }
106    /// <p>The ID of the project that currently owns business glossary.</p>
107    /// This field is required.
108    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    /// <p>The ID of the project that currently owns business glossary.</p>
113    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    /// <p>The ID of the project that currently owns business glossary.</p>
118    pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
119        &self.owning_project_identifier
120    }
121    /// <p>The description of this business glossary.</p>
122    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    /// <p>The description of this business glossary.</p>
127    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.description = input;
129        self
130    }
131    /// <p>The description of this business glossary.</p>
132    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133        &self.description
134    }
135    /// <p>The status of this business glossary.</p>
136    pub fn status(mut self, input: crate::types::GlossaryStatus) -> Self {
137        self.status = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The status of this business glossary.</p>
141    pub fn set_status(mut self, input: ::std::option::Option<crate::types::GlossaryStatus>) -> Self {
142        self.status = input;
143        self
144    }
145    /// <p>The status of this business glossary.</p>
146    pub fn get_status(&self) -> &::std::option::Option<crate::types::GlossaryStatus> {
147        &self.status
148    }
149    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
150    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    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
155    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.client_token = input;
157        self
158    }
159    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
160    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
161        &self.client_token
162    }
163    /// Consumes the builder and constructs a [`CreateGlossaryInput`](crate::operation::create_glossary::CreateGlossaryInput).
164    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}