aws_sdk_athena/operation/import_notebook/_import_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 ImportNotebookInput {
6 /// <p>The name of the Spark enabled workgroup to import the notebook to.</p>
7 pub work_group: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the notebook to import.</p>
9 pub name: ::std::option::Option<::std::string::String>,
10 /// <p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>
11 pub payload: ::std::option::Option<::std::string::String>,
12 /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
13 pub r#type: ::std::option::Option<crate::types::NotebookType>,
14 /// <p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>
15 pub notebook_s3_location_uri: ::std::option::Option<::std::string::String>,
16 /// <p>A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).</p><important>
17 /// <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>
18 /// </important>
19 pub client_request_token: ::std::option::Option<::std::string::String>,
20}
21impl ImportNotebookInput {
22 /// <p>The name of the Spark enabled workgroup to import the notebook to.</p>
23 pub fn work_group(&self) -> ::std::option::Option<&str> {
24 self.work_group.as_deref()
25 }
26 /// <p>The name of the notebook to import.</p>
27 pub fn name(&self) -> ::std::option::Option<&str> {
28 self.name.as_deref()
29 }
30 /// <p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>
31 pub fn payload(&self) -> ::std::option::Option<&str> {
32 self.payload.as_deref()
33 }
34 /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
35 pub fn r#type(&self) -> ::std::option::Option<&crate::types::NotebookType> {
36 self.r#type.as_ref()
37 }
38 /// <p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>
39 pub fn notebook_s3_location_uri(&self) -> ::std::option::Option<&str> {
40 self.notebook_s3_location_uri.as_deref()
41 }
42 /// <p>A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).</p><important>
43 /// <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>
44 /// </important>
45 pub fn client_request_token(&self) -> ::std::option::Option<&str> {
46 self.client_request_token.as_deref()
47 }
48}
49impl ImportNotebookInput {
50 /// Creates a new builder-style object to manufacture [`ImportNotebookInput`](crate::operation::import_notebook::ImportNotebookInput).
51 pub fn builder() -> crate::operation::import_notebook::builders::ImportNotebookInputBuilder {
52 crate::operation::import_notebook::builders::ImportNotebookInputBuilder::default()
53 }
54}
55
56/// A builder for [`ImportNotebookInput`](crate::operation::import_notebook::ImportNotebookInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct ImportNotebookInputBuilder {
60 pub(crate) work_group: ::std::option::Option<::std::string::String>,
61 pub(crate) name: ::std::option::Option<::std::string::String>,
62 pub(crate) payload: ::std::option::Option<::std::string::String>,
63 pub(crate) r#type: ::std::option::Option<crate::types::NotebookType>,
64 pub(crate) notebook_s3_location_uri: ::std::option::Option<::std::string::String>,
65 pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
66}
67impl ImportNotebookInputBuilder {
68 /// <p>The name of the Spark enabled workgroup to import the notebook to.</p>
69 /// This field is required.
70 pub fn work_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.work_group = ::std::option::Option::Some(input.into());
72 self
73 }
74 /// <p>The name of the Spark enabled workgroup to import the notebook to.</p>
75 pub fn set_work_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.work_group = input;
77 self
78 }
79 /// <p>The name of the Spark enabled workgroup to import the notebook to.</p>
80 pub fn get_work_group(&self) -> &::std::option::Option<::std::string::String> {
81 &self.work_group
82 }
83 /// <p>The name of the notebook to import.</p>
84 /// This field is required.
85 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.name = ::std::option::Option::Some(input.into());
87 self
88 }
89 /// <p>The name of the notebook to import.</p>
90 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.name = input;
92 self
93 }
94 /// <p>The name of the notebook to import.</p>
95 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
96 &self.name
97 }
98 /// <p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>
99 pub fn payload(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.payload = ::std::option::Option::Some(input.into());
101 self
102 }
103 /// <p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>
104 pub fn set_payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.payload = input;
106 self
107 }
108 /// <p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>
109 pub fn get_payload(&self) -> &::std::option::Option<::std::string::String> {
110 &self.payload
111 }
112 /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
113 /// This field is required.
114 pub fn r#type(mut self, input: crate::types::NotebookType) -> Self {
115 self.r#type = ::std::option::Option::Some(input);
116 self
117 }
118 /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
119 pub fn set_type(mut self, input: ::std::option::Option<crate::types::NotebookType>) -> Self {
120 self.r#type = input;
121 self
122 }
123 /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
124 pub fn get_type(&self) -> &::std::option::Option<crate::types::NotebookType> {
125 &self.r#type
126 }
127 /// <p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>
128 pub fn notebook_s3_location_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.notebook_s3_location_uri = ::std::option::Option::Some(input.into());
130 self
131 }
132 /// <p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>
133 pub fn set_notebook_s3_location_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.notebook_s3_location_uri = input;
135 self
136 }
137 /// <p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>
138 pub fn get_notebook_s3_location_uri(&self) -> &::std::option::Option<::std::string::String> {
139 &self.notebook_s3_location_uri
140 }
141 /// <p>A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).</p><important>
142 /// <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>
143 /// </important>
144 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.client_request_token = ::std::option::Option::Some(input.into());
146 self
147 }
148 /// <p>A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).</p><important>
149 /// <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>
150 /// </important>
151 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.client_request_token = input;
153 self
154 }
155 /// <p>A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).</p><important>
156 /// <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>
157 /// </important>
158 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
159 &self.client_request_token
160 }
161 /// Consumes the builder and constructs a [`ImportNotebookInput`](crate::operation::import_notebook::ImportNotebookInput).
162 pub fn build(
163 self,
164 ) -> ::std::result::Result<crate::operation::import_notebook::ImportNotebookInput, ::aws_smithy_types::error::operation::BuildError> {
165 ::std::result::Result::Ok(crate::operation::import_notebook::ImportNotebookInput {
166 work_group: self.work_group,
167 name: self.name,
168 payload: self.payload,
169 r#type: self.r#type,
170 notebook_s3_location_uri: self.notebook_s3_location_uri,
171 client_request_token: self.client_request_token,
172 })
173 }
174}