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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
// 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 StartSessionInput {
/// <p>The session description.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The workgroup to which the session belongs.</p>
pub work_group: ::std::option::Option<::std::string::String>,
/// <p>Contains engine data processing unit (DPU) configuration settings and parameter mappings.</p>
pub engine_configuration: ::std::option::Option<crate::types::EngineConfiguration>,
/// <p>The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is <code>Athena notebook version 1</code>. If you specify a value for <code>NotebookVersion</code>, you must also specify a value for <code>NotebookId</code>. See <code>EngineConfiguration$AdditionalConfigs</code>.</p>
pub notebook_version: ::std::option::Option<::std::string::String>,
/// <p>The idle timeout in minutes for the session.</p>
pub session_idle_timeout_in_minutes: ::std::option::Option<i32>,
/// <p>A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another <code>StartSessionRequest</code> is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.</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 users. 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 StartSessionInput {
/// <p>The session description.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The workgroup to which the session belongs.</p>
pub fn work_group(&self) -> ::std::option::Option<&str> {
self.work_group.as_deref()
}
/// <p>Contains engine data processing unit (DPU) configuration settings and parameter mappings.</p>
pub fn engine_configuration(&self) -> ::std::option::Option<&crate::types::EngineConfiguration> {
self.engine_configuration.as_ref()
}
/// <p>The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is <code>Athena notebook version 1</code>. If you specify a value for <code>NotebookVersion</code>, you must also specify a value for <code>NotebookId</code>. See <code>EngineConfiguration$AdditionalConfigs</code>.</p>
pub fn notebook_version(&self) -> ::std::option::Option<&str> {
self.notebook_version.as_deref()
}
/// <p>The idle timeout in minutes for the session.</p>
pub fn session_idle_timeout_in_minutes(&self) -> ::std::option::Option<i32> {
self.session_idle_timeout_in_minutes
}
/// <p>A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another <code>StartSessionRequest</code> is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.</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 users. 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 StartSessionInput {
/// Creates a new builder-style object to manufacture [`StartSessionInput`](crate::operation::start_session::StartSessionInput).
pub fn builder() -> crate::operation::start_session::builders::StartSessionInputBuilder {
crate::operation::start_session::builders::StartSessionInputBuilder::default()
}
}
/// A builder for [`StartSessionInput`](crate::operation::start_session::StartSessionInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StartSessionInputBuilder {
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) work_group: ::std::option::Option<::std::string::String>,
pub(crate) engine_configuration: ::std::option::Option<crate::types::EngineConfiguration>,
pub(crate) notebook_version: ::std::option::Option<::std::string::String>,
pub(crate) session_idle_timeout_in_minutes: ::std::option::Option<i32>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
}
impl StartSessionInputBuilder {
/// <p>The session description.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The session description.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The session description.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The workgroup to which the session belongs.</p>
pub fn work_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.work_group = ::std::option::Option::Some(input.into());
self
}
/// <p>The workgroup to which the session belongs.</p>
pub fn set_work_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.work_group = input;
self
}
/// <p>The workgroup to which the session belongs.</p>
pub fn get_work_group(&self) -> &::std::option::Option<::std::string::String> {
&self.work_group
}
/// <p>Contains engine data processing unit (DPU) configuration settings and parameter mappings.</p>
pub fn engine_configuration(mut self, input: crate::types::EngineConfiguration) -> Self {
self.engine_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Contains engine data processing unit (DPU) configuration settings and parameter mappings.</p>
pub fn set_engine_configuration(mut self, input: ::std::option::Option<crate::types::EngineConfiguration>) -> Self {
self.engine_configuration = input;
self
}
/// <p>Contains engine data processing unit (DPU) configuration settings and parameter mappings.</p>
pub fn get_engine_configuration(&self) -> &::std::option::Option<crate::types::EngineConfiguration> {
&self.engine_configuration
}
/// <p>The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is <code>Athena notebook version 1</code>. If you specify a value for <code>NotebookVersion</code>, you must also specify a value for <code>NotebookId</code>. See <code>EngineConfiguration$AdditionalConfigs</code>.</p>
pub fn notebook_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.notebook_version = ::std::option::Option::Some(input.into());
self
}
/// <p>The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is <code>Athena notebook version 1</code>. If you specify a value for <code>NotebookVersion</code>, you must also specify a value for <code>NotebookId</code>. See <code>EngineConfiguration$AdditionalConfigs</code>.</p>
pub fn set_notebook_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.notebook_version = input;
self
}
/// <p>The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is <code>Athena notebook version 1</code>. If you specify a value for <code>NotebookVersion</code>, you must also specify a value for <code>NotebookId</code>. See <code>EngineConfiguration$AdditionalConfigs</code>.</p>
pub fn get_notebook_version(&self) -> &::std::option::Option<::std::string::String> {
&self.notebook_version
}
/// <p>The idle timeout in minutes for the session.</p>
pub fn session_idle_timeout_in_minutes(mut self, input: i32) -> Self {
self.session_idle_timeout_in_minutes = ::std::option::Option::Some(input);
self
}
/// <p>The idle timeout in minutes for the session.</p>
pub fn set_session_idle_timeout_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
self.session_idle_timeout_in_minutes = input;
self
}
/// <p>The idle timeout in minutes for the session.</p>
pub fn get_session_idle_timeout_in_minutes(&self) -> &::std::option::Option<i32> {
&self.session_idle_timeout_in_minutes
}
/// <p>A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another <code>StartSessionRequest</code> is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.</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 users. 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 session is idempotent (executes only once). If another <code>StartSessionRequest</code> is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.</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 users. 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 session is idempotent (executes only once). If another <code>StartSessionRequest</code> is received, the same response is returned and another session is not created. If a parameter has changed, an error is returned.</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 users. 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 [`StartSessionInput`](crate::operation::start_session::StartSessionInput).
pub fn build(self) -> ::std::result::Result<crate::operation::start_session::StartSessionInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::start_session::StartSessionInput {
description: self.description,
work_group: self.work_group,
engine_configuration: self.engine_configuration,
notebook_version: self.notebook_version,
session_idle_timeout_in_minutes: self.session_idle_timeout_in_minutes,
client_request_token: self.client_request_token,
})
}
}