Skip to main content

aws_sdk_athena/operation/update_notebook_metadata/
_update_notebook_metadata_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 UpdateNotebookMetadataInput {
6    /// <p>The ID of the notebook to update the metadata for.</p>
7    pub notebook_id: ::std::option::Option<::std::string::String>,
8    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
9    /// <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>
10    /// </important>
11    pub client_request_token: ::std::option::Option<::std::string::String>,
12    /// <p>The name to update the notebook to.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14}
15impl UpdateNotebookMetadataInput {
16    /// <p>The ID of the notebook to update the metadata for.</p>
17    pub fn notebook_id(&self) -> ::std::option::Option<&str> {
18        self.notebook_id.as_deref()
19    }
20    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
21    /// <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>
22    /// </important>
23    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
24        self.client_request_token.as_deref()
25    }
26    /// <p>The name to update the notebook to.</p>
27    pub fn name(&self) -> ::std::option::Option<&str> {
28        self.name.as_deref()
29    }
30}
31impl UpdateNotebookMetadataInput {
32    /// Creates a new builder-style object to manufacture [`UpdateNotebookMetadataInput`](crate::operation::update_notebook_metadata::UpdateNotebookMetadataInput).
33    pub fn builder() -> crate::operation::update_notebook_metadata::builders::UpdateNotebookMetadataInputBuilder {
34        crate::operation::update_notebook_metadata::builders::UpdateNotebookMetadataInputBuilder::default()
35    }
36}
37
38/// A builder for [`UpdateNotebookMetadataInput`](crate::operation::update_notebook_metadata::UpdateNotebookMetadataInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct UpdateNotebookMetadataInputBuilder {
42    pub(crate) notebook_id: ::std::option::Option<::std::string::String>,
43    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
44    pub(crate) name: ::std::option::Option<::std::string::String>,
45}
46impl UpdateNotebookMetadataInputBuilder {
47    /// <p>The ID of the notebook to update the metadata for.</p>
48    /// This field is required.
49    pub fn notebook_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50        self.notebook_id = ::std::option::Option::Some(input.into());
51        self
52    }
53    /// <p>The ID of the notebook to update the metadata for.</p>
54    pub fn set_notebook_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55        self.notebook_id = input;
56        self
57    }
58    /// <p>The ID of the notebook to update the metadata for.</p>
59    pub fn get_notebook_id(&self) -> &::std::option::Option<::std::string::String> {
60        &self.notebook_id
61    }
62    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
63    /// <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>
64    /// </important>
65    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.client_request_token = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
70    /// <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>
71    /// </important>
72    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.client_request_token = input;
74        self
75    }
76    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
77    /// <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>
78    /// </important>
79    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
80        &self.client_request_token
81    }
82    /// <p>The name to update the notebook to.</p>
83    /// This field is required.
84    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.name = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The name to update the notebook to.</p>
89    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.name = input;
91        self
92    }
93    /// <p>The name to update the notebook to.</p>
94    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
95        &self.name
96    }
97    /// Consumes the builder and constructs a [`UpdateNotebookMetadataInput`](crate::operation::update_notebook_metadata::UpdateNotebookMetadataInput).
98    pub fn build(
99        self,
100    ) -> ::std::result::Result<
101        crate::operation::update_notebook_metadata::UpdateNotebookMetadataInput,
102        ::aws_smithy_types::error::operation::BuildError,
103    > {
104        ::std::result::Result::Ok(crate::operation::update_notebook_metadata::UpdateNotebookMetadataInput {
105            notebook_id: self.notebook_id,
106            client_request_token: self.client_request_token,
107            name: self.name,
108        })
109    }
110}