1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNotebookInput {
    /// <p>The ID of the notebook to update.</p>
    pub notebook_id: ::std::option::Option<::std::string::String>,
    /// <p>The updated content for the notebook.</p>
    pub payload: ::std::option::Option<::std::string::String>,
    /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
    pub r#type: ::std::option::Option<crate::types::NotebookType>,
    /// <p>The active notebook session ID. Required if the notebook has an active session.</p>
    pub session_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
    /// <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>
    /// </important>
    pub client_request_token: ::std::option::Option<::std::string::String>,
}
impl UpdateNotebookInput {
    /// <p>The ID of the notebook to update.</p>
    pub fn notebook_id(&self) -> ::std::option::Option<&str> {
        self.notebook_id.as_deref()
    }
    /// <p>The updated content for the notebook.</p>
    pub fn payload(&self) -> ::std::option::Option<&str> {
        self.payload.as_deref()
    }
    /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::NotebookType> {
        self.r#type.as_ref()
    }
    /// <p>The active notebook session ID. Required if the notebook has an active session.</p>
    pub fn session_id(&self) -> ::std::option::Option<&str> {
        self.session_id.as_deref()
    }
    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
    /// <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>
    /// </important>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
}
impl UpdateNotebookInput {
    /// Creates a new builder-style object to manufacture [`UpdateNotebookInput`](crate::operation::update_notebook::UpdateNotebookInput).
    pub fn builder() -> crate::operation::update_notebook::builders::UpdateNotebookInputBuilder {
        crate::operation::update_notebook::builders::UpdateNotebookInputBuilder::default()
    }
}

/// A builder for [`UpdateNotebookInput`](crate::operation::update_notebook::UpdateNotebookInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateNotebookInputBuilder {
    pub(crate) notebook_id: ::std::option::Option<::std::string::String>,
    pub(crate) payload: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::NotebookType>,
    pub(crate) session_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
}
impl UpdateNotebookInputBuilder {
    /// <p>The ID of the notebook to update.</p>
    /// This field is required.
    pub fn notebook_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notebook_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the notebook to update.</p>
    pub fn set_notebook_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notebook_id = input;
        self
    }
    /// <p>The ID of the notebook to update.</p>
    pub fn get_notebook_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.notebook_id
    }
    /// <p>The updated content for the notebook.</p>
    /// This field is required.
    pub fn payload(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.payload = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated content for the notebook.</p>
    pub fn set_payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.payload = input;
        self
    }
    /// <p>The updated content for the notebook.</p>
    pub fn get_payload(&self) -> &::std::option::Option<::std::string::String> {
        &self.payload
    }
    /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::NotebookType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::NotebookType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The notebook content type. Currently, the only valid type is <code>IPYNB</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::NotebookType> {
        &self.r#type
    }
    /// <p>The active notebook session ID. Required if the notebook has an active session.</p>
    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The active notebook session ID. Required if the notebook has an active session.</p>
    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_id = input;
        self
    }
    /// <p>The active notebook session ID. Required if the notebook has an active session.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_id
    }
    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
    /// <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>
    /// </important>
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
    /// <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>
    /// </important>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).</p><important>
    /// <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>
    /// </important>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// Consumes the builder and constructs a [`UpdateNotebookInput`](crate::operation::update_notebook::UpdateNotebookInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_notebook::UpdateNotebookInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_notebook::UpdateNotebookInput {
            notebook_id: self.notebook_id,
            payload: self.payload,
            r#type: self.r#type,
            session_id: self.session_id,
            client_request_token: self.client_request_token,
        })
    }
}