aws_sdk_datazone/operation/create_notebook/
_create_notebook_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateNotebookInput {
6 pub domain_identifier: ::std::option::Option<::std::string::String>,
8 pub owning_project_identifier: ::std::option::Option<::std::string::String>,
10 pub name: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16 pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18 pub client_token: ::std::option::Option<::std::string::String>,
20}
21impl CreateNotebookInput {
22 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
24 self.domain_identifier.as_deref()
25 }
26 pub fn owning_project_identifier(&self) -> ::std::option::Option<&str> {
28 self.owning_project_identifier.as_deref()
29 }
30 pub fn name(&self) -> ::std::option::Option<&str> {
32 self.name.as_deref()
33 }
34 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.as_deref()
37 }
38 pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
40 self.metadata.as_ref()
41 }
42 pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
44 self.parameters.as_ref()
45 }
46 pub fn client_token(&self) -> ::std::option::Option<&str> {
48 self.client_token.as_deref()
49 }
50}
51impl ::std::fmt::Debug for CreateNotebookInput {
52 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53 let mut formatter = f.debug_struct("CreateNotebookInput");
54 formatter.field("domain_identifier", &self.domain_identifier);
55 formatter.field("owning_project_identifier", &self.owning_project_identifier);
56 formatter.field("name", &"*** Sensitive Data Redacted ***");
57 formatter.field("description", &"*** Sensitive Data Redacted ***");
58 formatter.field("metadata", &"*** Sensitive Data Redacted ***");
59 formatter.field("parameters", &"*** Sensitive Data Redacted ***");
60 formatter.field("client_token", &self.client_token);
61 formatter.finish()
62 }
63}
64impl CreateNotebookInput {
65 pub fn builder() -> crate::operation::create_notebook::builders::CreateNotebookInputBuilder {
67 crate::operation::create_notebook::builders::CreateNotebookInputBuilder::default()
68 }
69}
70
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateNotebookInputBuilder {
75 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
76 pub(crate) owning_project_identifier: ::std::option::Option<::std::string::String>,
77 pub(crate) name: ::std::option::Option<::std::string::String>,
78 pub(crate) description: ::std::option::Option<::std::string::String>,
79 pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
80 pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
81 pub(crate) client_token: ::std::option::Option<::std::string::String>,
82}
83impl CreateNotebookInputBuilder {
84 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.domain_identifier = ::std::option::Option::Some(input.into());
88 self
89 }
90 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.domain_identifier = input;
93 self
94 }
95 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
97 &self.domain_identifier
98 }
99 pub fn owning_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.owning_project_identifier = ::std::option::Option::Some(input.into());
103 self
104 }
105 pub fn set_owning_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.owning_project_identifier = input;
108 self
109 }
110 pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
112 &self.owning_project_identifier
113 }
114 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.name = ::std::option::Option::Some(input.into());
118 self
119 }
120 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.name = input;
123 self
124 }
125 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
127 &self.name
128 }
129 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.description = ::std::option::Option::Some(input.into());
132 self
133 }
134 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.description = input;
137 self
138 }
139 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
141 &self.description
142 }
143 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
149 let mut hash_map = self.metadata.unwrap_or_default();
150 hash_map.insert(k.into(), v.into());
151 self.metadata = ::std::option::Option::Some(hash_map);
152 self
153 }
154 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
156 self.metadata = input;
157 self
158 }
159 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
161 &self.metadata
162 }
163 pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
169 let mut hash_map = self.parameters.unwrap_or_default();
170 hash_map.insert(k.into(), v.into());
171 self.parameters = ::std::option::Option::Some(hash_map);
172 self
173 }
174 pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
176 self.parameters = input;
177 self
178 }
179 pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
181 &self.parameters
182 }
183 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.client_token = ::std::option::Option::Some(input.into());
186 self
187 }
188 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.client_token = input;
191 self
192 }
193 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
195 &self.client_token
196 }
197 pub fn build(
199 self,
200 ) -> ::std::result::Result<crate::operation::create_notebook::CreateNotebookInput, ::aws_smithy_types::error::operation::BuildError> {
201 ::std::result::Result::Ok(crate::operation::create_notebook::CreateNotebookInput {
202 domain_identifier: self.domain_identifier,
203 owning_project_identifier: self.owning_project_identifier,
204 name: self.name,
205 description: self.description,
206 metadata: self.metadata,
207 parameters: self.parameters,
208 client_token: self.client_token,
209 })
210 }
211}
212impl ::std::fmt::Debug for CreateNotebookInputBuilder {
213 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
214 let mut formatter = f.debug_struct("CreateNotebookInputBuilder");
215 formatter.field("domain_identifier", &self.domain_identifier);
216 formatter.field("owning_project_identifier", &self.owning_project_identifier);
217 formatter.field("name", &"*** Sensitive Data Redacted ***");
218 formatter.field("description", &"*** Sensitive Data Redacted ***");
219 formatter.field("metadata", &"*** Sensitive Data Redacted ***");
220 formatter.field("parameters", &"*** Sensitive Data Redacted ***");
221 formatter.field("client_token", &self.client_token);
222 formatter.finish()
223 }
224}