aws_sdk_athena/operation/create_notebook/_create_notebook_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, ::std::fmt::Debug)]
5pub struct CreateNotebookInput {
6 /// <p>The name of the Spark enabled workgroup in which the notebook will be created.</p>
7 pub work_group: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the <code>ipynb</code> file to be created in the Spark workgroup, without the <code>.ipynb</code> extension.</p>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
11 /// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
12 /// </important>
13 pub client_request_token: ::std::option::Option<::std::string::String>,
14}
15impl CreateNotebookInput {
16 /// <p>The name of the Spark enabled workgroup in which the notebook will be created.</p>
17 pub fn work_group(&self) -> ::std::option::Option<&str> {
18 self.work_group.as_deref()
19 }
20 /// <p>The name of the <code>ipynb</code> file to be created in the Spark workgroup, without the <code>.ipynb</code> extension.</p>
21 pub fn name(&self) -> ::std::option::Option<&str> {
22 self.name.as_deref()
23 }
24 /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
25 /// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
26 /// </important>
27 pub fn client_request_token(&self) -> ::std::option::Option<&str> {
28 self.client_request_token.as_deref()
29 }
30}
31impl CreateNotebookInput {
32 /// Creates a new builder-style object to manufacture [`CreateNotebookInput`](crate::operation::create_notebook::CreateNotebookInput).
33 pub fn builder() -> crate::operation::create_notebook::builders::CreateNotebookInputBuilder {
34 crate::operation::create_notebook::builders::CreateNotebookInputBuilder::default()
35 }
36}
37
38/// A builder for [`CreateNotebookInput`](crate::operation::create_notebook::CreateNotebookInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct CreateNotebookInputBuilder {
42 pub(crate) work_group: ::std::option::Option<::std::string::String>,
43 pub(crate) name: ::std::option::Option<::std::string::String>,
44 pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
45}
46impl CreateNotebookInputBuilder {
47 /// <p>The name of the Spark enabled workgroup in which the notebook will be created.</p>
48 /// This field is required.
49 pub fn work_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.work_group = ::std::option::Option::Some(input.into());
51 self
52 }
53 /// <p>The name of the Spark enabled workgroup in which the notebook will be created.</p>
54 pub fn set_work_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.work_group = input;
56 self
57 }
58 /// <p>The name of the Spark enabled workgroup in which the notebook will be created.</p>
59 pub fn get_work_group(&self) -> &::std::option::Option<::std::string::String> {
60 &self.work_group
61 }
62 /// <p>The name of the <code>ipynb</code> file to be created in the Spark workgroup, without the <code>.ipynb</code> extension.</p>
63 /// This field is required.
64 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.name = ::std::option::Option::Some(input.into());
66 self
67 }
68 /// <p>The name of the <code>ipynb</code> file to be created in the Spark workgroup, without the <code>.ipynb</code> extension.</p>
69 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.name = input;
71 self
72 }
73 /// <p>The name of the <code>ipynb</code> file to be created in the Spark workgroup, without the <code>.ipynb</code> extension.</p>
74 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
75 &self.name
76 }
77 /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
78 /// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
79 /// </important>
80 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.client_request_token = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
85 /// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
86 /// </important>
87 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.client_request_token = input;
89 self
90 }
91 /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
92 /// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for you. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
93 /// </important>
94 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
95 &self.client_request_token
96 }
97 /// Consumes the builder and constructs a [`CreateNotebookInput`](crate::operation::create_notebook::CreateNotebookInput).
98 pub fn build(
99 self,
100 ) -> ::std::result::Result<crate::operation::create_notebook::CreateNotebookInput, ::aws_smithy_types::error::operation::BuildError> {
101 ::std::result::Result::Ok(crate::operation::create_notebook::CreateNotebookInput {
102 work_group: self.work_group,
103 name: self.name,
104 client_request_token: self.client_request_token,
105 })
106 }
107}