1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateNotebookOutput {
6 pub id: ::std::string::String,
8 pub name: ::std::string::String,
10 pub owning_project_id: ::std::string::String,
12 pub domain_id: ::std::string::String,
14 pub cell_order: ::std::vec::Vec<crate::types::CellInformation>,
16 pub status: crate::types::NotebookStatus,
18 pub description: ::std::option::Option<::std::string::String>,
20 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub created_by: ::std::option::Option<::std::string::String>,
24 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
26 pub updated_by: ::std::option::Option<::std::string::String>,
28 pub locked_by: ::std::option::Option<::std::string::String>,
30 pub locked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
32 pub lock_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
34 pub compute_id: ::std::option::Option<::std::string::String>,
36 pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
38 pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
40 pub environment_configuration: ::std::option::Option<crate::types::EnvironmentConfig>,
42 pub error: ::std::option::Option<crate::types::NotebookError>,
44 _request_id: Option<String>,
45}
46impl CreateNotebookOutput {
47 pub fn id(&self) -> &str {
49 use std::ops::Deref;
50 self.id.deref()
51 }
52 pub fn name(&self) -> &str {
54 use std::ops::Deref;
55 self.name.deref()
56 }
57 pub fn owning_project_id(&self) -> &str {
59 use std::ops::Deref;
60 self.owning_project_id.deref()
61 }
62 pub fn domain_id(&self) -> &str {
64 use std::ops::Deref;
65 self.domain_id.deref()
66 }
67 pub fn cell_order(&self) -> &[crate::types::CellInformation] {
69 use std::ops::Deref;
70 self.cell_order.deref()
71 }
72 pub fn status(&self) -> &crate::types::NotebookStatus {
74 &self.status
75 }
76 pub fn description(&self) -> ::std::option::Option<&str> {
78 self.description.as_deref()
79 }
80 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
82 self.created_at.as_ref()
83 }
84 pub fn created_by(&self) -> ::std::option::Option<&str> {
86 self.created_by.as_deref()
87 }
88 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
90 self.updated_at.as_ref()
91 }
92 pub fn updated_by(&self) -> ::std::option::Option<&str> {
94 self.updated_by.as_deref()
95 }
96 pub fn locked_by(&self) -> ::std::option::Option<&str> {
98 self.locked_by.as_deref()
99 }
100 pub fn locked_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
102 self.locked_at.as_ref()
103 }
104 pub fn lock_expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
106 self.lock_expires_at.as_ref()
107 }
108 pub fn compute_id(&self) -> ::std::option::Option<&str> {
110 self.compute_id.as_deref()
111 }
112 pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
114 self.metadata.as_ref()
115 }
116 pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
118 self.parameters.as_ref()
119 }
120 pub fn environment_configuration(&self) -> ::std::option::Option<&crate::types::EnvironmentConfig> {
122 self.environment_configuration.as_ref()
123 }
124 pub fn error(&self) -> ::std::option::Option<&crate::types::NotebookError> {
126 self.error.as_ref()
127 }
128}
129impl ::std::fmt::Debug for CreateNotebookOutput {
130 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
131 let mut formatter = f.debug_struct("CreateNotebookOutput");
132 formatter.field("id", &self.id);
133 formatter.field("name", &"*** Sensitive Data Redacted ***");
134 formatter.field("owning_project_id", &self.owning_project_id);
135 formatter.field("domain_id", &self.domain_id);
136 formatter.field("cell_order", &self.cell_order);
137 formatter.field("status", &self.status);
138 formatter.field("description", &"*** Sensitive Data Redacted ***");
139 formatter.field("created_at", &self.created_at);
140 formatter.field("created_by", &self.created_by);
141 formatter.field("updated_at", &self.updated_at);
142 formatter.field("updated_by", &self.updated_by);
143 formatter.field("locked_by", &self.locked_by);
144 formatter.field("locked_at", &self.locked_at);
145 formatter.field("lock_expires_at", &self.lock_expires_at);
146 formatter.field("compute_id", &self.compute_id);
147 formatter.field("metadata", &"*** Sensitive Data Redacted ***");
148 formatter.field("parameters", &"*** Sensitive Data Redacted ***");
149 formatter.field("environment_configuration", &self.environment_configuration);
150 formatter.field("error", &self.error);
151 formatter.field("_request_id", &self._request_id);
152 formatter.finish()
153 }
154}
155impl ::aws_types::request_id::RequestId for CreateNotebookOutput {
156 fn request_id(&self) -> Option<&str> {
157 self._request_id.as_deref()
158 }
159}
160impl CreateNotebookOutput {
161 pub fn builder() -> crate::operation::create_notebook::builders::CreateNotebookOutputBuilder {
163 crate::operation::create_notebook::builders::CreateNotebookOutputBuilder::default()
164 }
165}
166
167#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
169#[non_exhaustive]
170pub struct CreateNotebookOutputBuilder {
171 pub(crate) id: ::std::option::Option<::std::string::String>,
172 pub(crate) name: ::std::option::Option<::std::string::String>,
173 pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
174 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
175 pub(crate) cell_order: ::std::option::Option<::std::vec::Vec<crate::types::CellInformation>>,
176 pub(crate) status: ::std::option::Option<crate::types::NotebookStatus>,
177 pub(crate) description: ::std::option::Option<::std::string::String>,
178 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
179 pub(crate) created_by: ::std::option::Option<::std::string::String>,
180 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
181 pub(crate) updated_by: ::std::option::Option<::std::string::String>,
182 pub(crate) locked_by: ::std::option::Option<::std::string::String>,
183 pub(crate) locked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
184 pub(crate) lock_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
185 pub(crate) compute_id: ::std::option::Option<::std::string::String>,
186 pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
187 pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
188 pub(crate) environment_configuration: ::std::option::Option<crate::types::EnvironmentConfig>,
189 pub(crate) error: ::std::option::Option<crate::types::NotebookError>,
190 _request_id: Option<String>,
191}
192impl CreateNotebookOutputBuilder {
193 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196 self.id = ::std::option::Option::Some(input.into());
197 self
198 }
199 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201 self.id = input;
202 self
203 }
204 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
206 &self.id
207 }
208 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211 self.name = ::std::option::Option::Some(input.into());
212 self
213 }
214 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216 self.name = input;
217 self
218 }
219 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
221 &self.name
222 }
223 pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226 self.owning_project_id = ::std::option::Option::Some(input.into());
227 self
228 }
229 pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231 self.owning_project_id = input;
232 self
233 }
234 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
236 &self.owning_project_id
237 }
238 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241 self.domain_id = ::std::option::Option::Some(input.into());
242 self
243 }
244 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246 self.domain_id = input;
247 self
248 }
249 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
251 &self.domain_id
252 }
253 pub fn cell_order(mut self, input: crate::types::CellInformation) -> Self {
259 let mut v = self.cell_order.unwrap_or_default();
260 v.push(input);
261 self.cell_order = ::std::option::Option::Some(v);
262 self
263 }
264 pub fn set_cell_order(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CellInformation>>) -> Self {
266 self.cell_order = input;
267 self
268 }
269 pub fn get_cell_order(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CellInformation>> {
271 &self.cell_order
272 }
273 pub fn status(mut self, input: crate::types::NotebookStatus) -> Self {
276 self.status = ::std::option::Option::Some(input);
277 self
278 }
279 pub fn set_status(mut self, input: ::std::option::Option<crate::types::NotebookStatus>) -> Self {
281 self.status = input;
282 self
283 }
284 pub fn get_status(&self) -> &::std::option::Option<crate::types::NotebookStatus> {
286 &self.status
287 }
288 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 self.description = ::std::option::Option::Some(input.into());
291 self
292 }
293 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
295 self.description = input;
296 self
297 }
298 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
300 &self.description
301 }
302 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
304 self.created_at = ::std::option::Option::Some(input);
305 self
306 }
307 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
309 self.created_at = input;
310 self
311 }
312 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
314 &self.created_at
315 }
316 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
318 self.created_by = ::std::option::Option::Some(input.into());
319 self
320 }
321 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
323 self.created_by = input;
324 self
325 }
326 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
328 &self.created_by
329 }
330 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
332 self.updated_at = ::std::option::Option::Some(input);
333 self
334 }
335 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
337 self.updated_at = input;
338 self
339 }
340 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
342 &self.updated_at
343 }
344 pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346 self.updated_by = ::std::option::Option::Some(input.into());
347 self
348 }
349 pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
351 self.updated_by = input;
352 self
353 }
354 pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
356 &self.updated_by
357 }
358 pub fn locked_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360 self.locked_by = ::std::option::Option::Some(input.into());
361 self
362 }
363 pub fn set_locked_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365 self.locked_by = input;
366 self
367 }
368 pub fn get_locked_by(&self) -> &::std::option::Option<::std::string::String> {
370 &self.locked_by
371 }
372 pub fn locked_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
374 self.locked_at = ::std::option::Option::Some(input);
375 self
376 }
377 pub fn set_locked_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
379 self.locked_at = input;
380 self
381 }
382 pub fn get_locked_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
384 &self.locked_at
385 }
386 pub fn lock_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
388 self.lock_expires_at = ::std::option::Option::Some(input);
389 self
390 }
391 pub fn set_lock_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
393 self.lock_expires_at = input;
394 self
395 }
396 pub fn get_lock_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
398 &self.lock_expires_at
399 }
400 pub fn compute_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402 self.compute_id = ::std::option::Option::Some(input.into());
403 self
404 }
405 pub fn set_compute_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
407 self.compute_id = input;
408 self
409 }
410 pub fn get_compute_id(&self) -> &::std::option::Option<::std::string::String> {
412 &self.compute_id
413 }
414 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
420 let mut hash_map = self.metadata.unwrap_or_default();
421 hash_map.insert(k.into(), v.into());
422 self.metadata = ::std::option::Option::Some(hash_map);
423 self
424 }
425 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
427 self.metadata = input;
428 self
429 }
430 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
432 &self.metadata
433 }
434 pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
440 let mut hash_map = self.parameters.unwrap_or_default();
441 hash_map.insert(k.into(), v.into());
442 self.parameters = ::std::option::Option::Some(hash_map);
443 self
444 }
445 pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
447 self.parameters = input;
448 self
449 }
450 pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
452 &self.parameters
453 }
454 pub fn environment_configuration(mut self, input: crate::types::EnvironmentConfig) -> Self {
456 self.environment_configuration = ::std::option::Option::Some(input);
457 self
458 }
459 pub fn set_environment_configuration(mut self, input: ::std::option::Option<crate::types::EnvironmentConfig>) -> Self {
461 self.environment_configuration = input;
462 self
463 }
464 pub fn get_environment_configuration(&self) -> &::std::option::Option<crate::types::EnvironmentConfig> {
466 &self.environment_configuration
467 }
468 pub fn error(mut self, input: crate::types::NotebookError) -> Self {
470 self.error = ::std::option::Option::Some(input);
471 self
472 }
473 pub fn set_error(mut self, input: ::std::option::Option<crate::types::NotebookError>) -> Self {
475 self.error = input;
476 self
477 }
478 pub fn get_error(&self) -> &::std::option::Option<crate::types::NotebookError> {
480 &self.error
481 }
482 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
483 self._request_id = Some(request_id.into());
484 self
485 }
486
487 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
488 self._request_id = request_id;
489 self
490 }
491 pub fn build(
500 self,
501 ) -> ::std::result::Result<crate::operation::create_notebook::CreateNotebookOutput, ::aws_smithy_types::error::operation::BuildError> {
502 ::std::result::Result::Ok(crate::operation::create_notebook::CreateNotebookOutput {
503 id: self.id.ok_or_else(|| {
504 ::aws_smithy_types::error::operation::BuildError::missing_field(
505 "id",
506 "id was not specified but it is required when building CreateNotebookOutput",
507 )
508 })?,
509 name: self.name.ok_or_else(|| {
510 ::aws_smithy_types::error::operation::BuildError::missing_field(
511 "name",
512 "name was not specified but it is required when building CreateNotebookOutput",
513 )
514 })?,
515 owning_project_id: self.owning_project_id.ok_or_else(|| {
516 ::aws_smithy_types::error::operation::BuildError::missing_field(
517 "owning_project_id",
518 "owning_project_id was not specified but it is required when building CreateNotebookOutput",
519 )
520 })?,
521 domain_id: self.domain_id.ok_or_else(|| {
522 ::aws_smithy_types::error::operation::BuildError::missing_field(
523 "domain_id",
524 "domain_id was not specified but it is required when building CreateNotebookOutput",
525 )
526 })?,
527 cell_order: self.cell_order.ok_or_else(|| {
528 ::aws_smithy_types::error::operation::BuildError::missing_field(
529 "cell_order",
530 "cell_order was not specified but it is required when building CreateNotebookOutput",
531 )
532 })?,
533 status: self.status.ok_or_else(|| {
534 ::aws_smithy_types::error::operation::BuildError::missing_field(
535 "status",
536 "status was not specified but it is required when building CreateNotebookOutput",
537 )
538 })?,
539 description: self.description,
540 created_at: self.created_at,
541 created_by: self.created_by,
542 updated_at: self.updated_at,
543 updated_by: self.updated_by,
544 locked_by: self.locked_by,
545 locked_at: self.locked_at,
546 lock_expires_at: self.lock_expires_at,
547 compute_id: self.compute_id,
548 metadata: self.metadata,
549 parameters: self.parameters,
550 environment_configuration: self.environment_configuration,
551 error: self.error,
552 _request_id: self._request_id,
553 })
554 }
555}
556impl ::std::fmt::Debug for CreateNotebookOutputBuilder {
557 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
558 let mut formatter = f.debug_struct("CreateNotebookOutputBuilder");
559 formatter.field("id", &self.id);
560 formatter.field("name", &"*** Sensitive Data Redacted ***");
561 formatter.field("owning_project_id", &self.owning_project_id);
562 formatter.field("domain_id", &self.domain_id);
563 formatter.field("cell_order", &self.cell_order);
564 formatter.field("status", &self.status);
565 formatter.field("description", &"*** Sensitive Data Redacted ***");
566 formatter.field("created_at", &self.created_at);
567 formatter.field("created_by", &self.created_by);
568 formatter.field("updated_at", &self.updated_at);
569 formatter.field("updated_by", &self.updated_by);
570 formatter.field("locked_by", &self.locked_by);
571 formatter.field("locked_at", &self.locked_at);
572 formatter.field("lock_expires_at", &self.lock_expires_at);
573 formatter.field("compute_id", &self.compute_id);
574 formatter.field("metadata", &"*** Sensitive Data Redacted ***");
575 formatter.field("parameters", &"*** Sensitive Data Redacted ***");
576 formatter.field("environment_configuration", &self.environment_configuration);
577 formatter.field("error", &self.error);
578 formatter.field("_request_id", &self._request_id);
579 formatter.finish()
580 }
581}