#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Session {
pub id: ::std::option::Option<::std::string::String>,
pub created_on: ::std::option::Option<::aws_smithy_types::DateTime>,
pub status: ::std::option::Option<crate::types::SessionStatus>,
pub error_message: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub role: ::std::option::Option<::std::string::String>,
pub command: ::std::option::Option<crate::types::SessionCommand>,
pub default_arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub connections: ::std::option::Option<crate::types::ConnectionsList>,
pub progress: f64,
pub max_capacity: ::std::option::Option<f64>,
pub security_configuration: ::std::option::Option<::std::string::String>,
pub glue_version: ::std::option::Option<::std::string::String>,
pub number_of_workers: ::std::option::Option<i32>,
pub worker_type: ::std::option::Option<crate::types::WorkerType>,
pub completed_on: ::std::option::Option<::aws_smithy_types::DateTime>,
pub execution_time: ::std::option::Option<f64>,
pub dpu_seconds: ::std::option::Option<f64>,
pub idle_timeout: ::std::option::Option<i32>,
pub profile_name: ::std::option::Option<::std::string::String>,
pub session_type: ::std::option::Option<crate::types::SessionType>,
}
impl Session {
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
pub fn created_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_on.as_ref()
}
pub fn status(&self) -> ::std::option::Option<&crate::types::SessionStatus> {
self.status.as_ref()
}
pub fn error_message(&self) -> ::std::option::Option<&str> {
self.error_message.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn role(&self) -> ::std::option::Option<&str> {
self.role.as_deref()
}
pub fn command(&self) -> ::std::option::Option<&crate::types::SessionCommand> {
self.command.as_ref()
}
pub fn default_arguments(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.default_arguments.as_ref()
}
pub fn connections(&self) -> ::std::option::Option<&crate::types::ConnectionsList> {
self.connections.as_ref()
}
pub fn progress(&self) -> f64 {
self.progress
}
pub fn max_capacity(&self) -> ::std::option::Option<f64> {
self.max_capacity
}
pub fn security_configuration(&self) -> ::std::option::Option<&str> {
self.security_configuration.as_deref()
}
pub fn glue_version(&self) -> ::std::option::Option<&str> {
self.glue_version.as_deref()
}
pub fn number_of_workers(&self) -> ::std::option::Option<i32> {
self.number_of_workers
}
pub fn worker_type(&self) -> ::std::option::Option<&crate::types::WorkerType> {
self.worker_type.as_ref()
}
pub fn completed_on(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.completed_on.as_ref()
}
pub fn execution_time(&self) -> ::std::option::Option<f64> {
self.execution_time
}
pub fn dpu_seconds(&self) -> ::std::option::Option<f64> {
self.dpu_seconds
}
pub fn idle_timeout(&self) -> ::std::option::Option<i32> {
self.idle_timeout
}
pub fn profile_name(&self) -> ::std::option::Option<&str> {
self.profile_name.as_deref()
}
pub fn session_type(&self) -> ::std::option::Option<&crate::types::SessionType> {
self.session_type.as_ref()
}
}
impl Session {
pub fn builder() -> crate::types::builders::SessionBuilder {
crate::types::builders::SessionBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SessionBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) created_on: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status: ::std::option::Option<crate::types::SessionStatus>,
pub(crate) error_message: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) role: ::std::option::Option<::std::string::String>,
pub(crate) command: ::std::option::Option<crate::types::SessionCommand>,
pub(crate) default_arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) connections: ::std::option::Option<crate::types::ConnectionsList>,
pub(crate) progress: ::std::option::Option<f64>,
pub(crate) max_capacity: ::std::option::Option<f64>,
pub(crate) security_configuration: ::std::option::Option<::std::string::String>,
pub(crate) glue_version: ::std::option::Option<::std::string::String>,
pub(crate) number_of_workers: ::std::option::Option<i32>,
pub(crate) worker_type: ::std::option::Option<crate::types::WorkerType>,
pub(crate) completed_on: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) execution_time: ::std::option::Option<f64>,
pub(crate) dpu_seconds: ::std::option::Option<f64>,
pub(crate) idle_timeout: ::std::option::Option<i32>,
pub(crate) profile_name: ::std::option::Option<::std::string::String>,
pub(crate) session_type: ::std::option::Option<crate::types::SessionType>,
}
impl SessionBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
pub fn created_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_on = ::std::option::Option::Some(input);
self
}
pub fn set_created_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_on = input;
self
}
pub fn get_created_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_on
}
pub fn status(mut self, input: crate::types::SessionStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::SessionStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::SessionStatus> {
&self.status
}
pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.error_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.error_message = input;
self
}
pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
&self.error_message
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role = ::std::option::Option::Some(input.into());
self
}
pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role = input;
self
}
pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
&self.role
}
pub fn command(mut self, input: crate::types::SessionCommand) -> Self {
self.command = ::std::option::Option::Some(input);
self
}
pub fn set_command(mut self, input: ::std::option::Option<crate::types::SessionCommand>) -> Self {
self.command = input;
self
}
pub fn get_command(&self) -> &::std::option::Option<crate::types::SessionCommand> {
&self.command
}
pub fn default_arguments(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.default_arguments.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.default_arguments = ::std::option::Option::Some(hash_map);
self
}
pub fn set_default_arguments(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.default_arguments = input;
self
}
pub fn get_default_arguments(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.default_arguments
}
pub fn connections(mut self, input: crate::types::ConnectionsList) -> Self {
self.connections = ::std::option::Option::Some(input);
self
}
pub fn set_connections(mut self, input: ::std::option::Option<crate::types::ConnectionsList>) -> Self {
self.connections = input;
self
}
pub fn get_connections(&self) -> &::std::option::Option<crate::types::ConnectionsList> {
&self.connections
}
pub fn progress(mut self, input: f64) -> Self {
self.progress = ::std::option::Option::Some(input);
self
}
pub fn set_progress(mut self, input: ::std::option::Option<f64>) -> Self {
self.progress = input;
self
}
pub fn get_progress(&self) -> &::std::option::Option<f64> {
&self.progress
}
pub fn max_capacity(mut self, input: f64) -> Self {
self.max_capacity = ::std::option::Option::Some(input);
self
}
pub fn set_max_capacity(mut self, input: ::std::option::Option<f64>) -> Self {
self.max_capacity = input;
self
}
pub fn get_max_capacity(&self) -> &::std::option::Option<f64> {
&self.max_capacity
}
pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.security_configuration = ::std::option::Option::Some(input.into());
self
}
pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.security_configuration = input;
self
}
pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
&self.security_configuration
}
pub fn glue_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.glue_version = ::std::option::Option::Some(input.into());
self
}
pub fn set_glue_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.glue_version = input;
self
}
pub fn get_glue_version(&self) -> &::std::option::Option<::std::string::String> {
&self.glue_version
}
pub fn number_of_workers(mut self, input: i32) -> Self {
self.number_of_workers = ::std::option::Option::Some(input);
self
}
pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
self.number_of_workers = input;
self
}
pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
&self.number_of_workers
}
pub fn worker_type(mut self, input: crate::types::WorkerType) -> Self {
self.worker_type = ::std::option::Option::Some(input);
self
}
pub fn set_worker_type(mut self, input: ::std::option::Option<crate::types::WorkerType>) -> Self {
self.worker_type = input;
self
}
pub fn get_worker_type(&self) -> &::std::option::Option<crate::types::WorkerType> {
&self.worker_type
}
pub fn completed_on(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.completed_on = ::std::option::Option::Some(input);
self
}
pub fn set_completed_on(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.completed_on = input;
self
}
pub fn get_completed_on(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.completed_on
}
pub fn execution_time(mut self, input: f64) -> Self {
self.execution_time = ::std::option::Option::Some(input);
self
}
pub fn set_execution_time(mut self, input: ::std::option::Option<f64>) -> Self {
self.execution_time = input;
self
}
pub fn get_execution_time(&self) -> &::std::option::Option<f64> {
&self.execution_time
}
pub fn dpu_seconds(mut self, input: f64) -> Self {
self.dpu_seconds = ::std::option::Option::Some(input);
self
}
pub fn set_dpu_seconds(mut self, input: ::std::option::Option<f64>) -> Self {
self.dpu_seconds = input;
self
}
pub fn get_dpu_seconds(&self) -> &::std::option::Option<f64> {
&self.dpu_seconds
}
pub fn idle_timeout(mut self, input: i32) -> Self {
self.idle_timeout = ::std::option::Option::Some(input);
self
}
pub fn set_idle_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
self.idle_timeout = input;
self
}
pub fn get_idle_timeout(&self) -> &::std::option::Option<i32> {
&self.idle_timeout
}
pub fn profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_name = input;
self
}
pub fn get_profile_name(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_name
}
pub fn session_type(mut self, input: crate::types::SessionType) -> Self {
self.session_type = ::std::option::Option::Some(input);
self
}
pub fn set_session_type(mut self, input: ::std::option::Option<crate::types::SessionType>) -> Self {
self.session_type = input;
self
}
pub fn get_session_type(&self) -> &::std::option::Option<crate::types::SessionType> {
&self.session_type
}
pub fn build(self) -> crate::types::Session {
crate::types::Session {
id: self.id,
created_on: self.created_on,
status: self.status,
error_message: self.error_message,
description: self.description,
role: self.role,
command: self.command,
default_arguments: self.default_arguments,
connections: self.connections,
progress: self.progress.unwrap_or_default(),
max_capacity: self.max_capacity,
security_configuration: self.security_configuration,
glue_version: self.glue_version,
number_of_workers: self.number_of_workers,
worker_type: self.worker_type,
completed_on: self.completed_on,
execution_time: self.execution_time,
dpu_seconds: self.dpu_seconds,
idle_timeout: self.idle_timeout,
profile_name: self.profile_name,
session_type: self.session_type,
}
}
}