#[non_exhaustive]pub struct Session {Show 15 fields
pub name: String,
pub uuid: String,
pub create_time: Option<Timestamp>,
pub runtime_info: Option<RuntimeInfo>,
pub state: State,
pub state_message: String,
pub state_time: Option<Timestamp>,
pub creator: String,
pub labels: HashMap<String, String>,
pub runtime_config: Option<RuntimeConfig>,
pub environment_config: Option<EnvironmentConfig>,
pub user: String,
pub state_history: Vec<SessionStateHistory>,
pub session_template: String,
pub session_config: Option<SessionConfig>,
/* private fields */
}Expand description
A representation of a session.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. The resource name of the session.
uuid: StringOutput only. A session UUID (Unique Universal Identifier). The service generates this value when it creates the session.
create_time: Option<Timestamp>Output only. The time when the session was created.
runtime_info: Option<RuntimeInfo>Output only. Runtime information about session execution.
state: StateOutput only. A state of the session.
state_message: StringOutput only. Session state details, such as the failure
description if the state is FAILED.
state_time: Option<Timestamp>Output only. The time when the session entered the current state.
creator: StringOutput only. The email address of the user who created the session.
labels: HashMap<String, String>Optional. The labels to associate with the session. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a session.
runtime_config: Option<RuntimeConfig>Optional. Runtime configuration for the session execution.
environment_config: Option<EnvironmentConfig>Optional. Environment configuration for the session execution.
user: StringOptional. The email address of the user who owns the session.
state_history: Vec<SessionStateHistory>Output only. Historical state information for the session.
session_template: StringOptional. The session template used by the session.
Only resource names, including project ID and location, are valid.
Example:
<https://www.googleapis.com/compute/v1/projects/>[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]projects/[project_id]/locations/[dataproc_region]/sessionTemplates/[template_id]
The template must be in the same project and Dataproc region as the session.
session_config: Option<SessionConfig>The session configuration.
Implementations§
Source§impl Session
impl Session
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_runtime_info<T>(self, v: T) -> Selfwhere
T: Into<RuntimeInfo>,
pub fn set_runtime_info<T>(self, v: T) -> Selfwhere
T: Into<RuntimeInfo>,
Sets the value of runtime_info.
Sourcepub fn set_or_clear_runtime_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeInfo>,
pub fn set_or_clear_runtime_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeInfo>,
Sets or clears the value of runtime_info.
Sourcepub fn set_state_message<T: Into<String>>(self, v: T) -> Self
pub fn set_state_message<T: Into<String>>(self, v: T) -> Self
Sets the value of state_message.
Sourcepub fn set_state_time<T>(self, v: T) -> Self
pub fn set_state_time<T>(self, v: T) -> Self
Sets the value of state_time.
Sourcepub fn set_or_clear_state_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of state_time.
Sourcepub fn set_creator<T: Into<String>>(self, v: T) -> Self
pub fn set_creator<T: Into<String>>(self, v: T) -> Self
Sets the value of creator.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_runtime_config<T>(self, v: T) -> Selfwhere
T: Into<RuntimeConfig>,
pub fn set_runtime_config<T>(self, v: T) -> Selfwhere
T: Into<RuntimeConfig>,
Sets the value of runtime_config.
Sourcepub fn set_or_clear_runtime_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeConfig>,
pub fn set_or_clear_runtime_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RuntimeConfig>,
Sets or clears the value of runtime_config.
Sourcepub fn set_environment_config<T>(self, v: T) -> Selfwhere
T: Into<EnvironmentConfig>,
pub fn set_environment_config<T>(self, v: T) -> Selfwhere
T: Into<EnvironmentConfig>,
Sets the value of environment_config.
Sourcepub fn set_or_clear_environment_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EnvironmentConfig>,
pub fn set_or_clear_environment_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EnvironmentConfig>,
Sets or clears the value of environment_config.
Sourcepub fn set_state_history<T, V>(self, v: T) -> Self
pub fn set_state_history<T, V>(self, v: T) -> Self
Sets the value of state_history.
Sourcepub fn set_session_template<T: Into<String>>(self, v: T) -> Self
pub fn set_session_template<T: Into<String>>(self, v: T) -> Self
Sets the value of session_template.
Sourcepub fn set_session_config<T: Into<Option<SessionConfig>>>(self, v: T) -> Self
pub fn set_session_config<T: Into<Option<SessionConfig>>>(self, v: T) -> Self
Sets the value of session_config.
Note that all the setters affecting session_config are mutually
exclusive.
Sourcepub fn jupyter_session(&self) -> Option<&Box<JupyterConfig>>
pub fn jupyter_session(&self) -> Option<&Box<JupyterConfig>>
The value of session_config
if it holds a JupyterSession, None if the field is not set or
holds a different branch.
Sourcepub fn set_jupyter_session<T: Into<Box<JupyterConfig>>>(self, v: T) -> Self
pub fn set_jupyter_session<T: Into<Box<JupyterConfig>>>(self, v: T) -> Self
Sets the value of session_config
to hold a JupyterSession.
Note that all the setters affecting session_config are
mutually exclusive.
Sourcepub fn spark_connect_session(&self) -> Option<&Box<SparkConnectConfig>>
pub fn spark_connect_session(&self) -> Option<&Box<SparkConnectConfig>>
The value of session_config
if it holds a SparkConnectSession, None if the field is not set or
holds a different branch.
Sourcepub fn set_spark_connect_session<T: Into<Box<SparkConnectConfig>>>(
self,
v: T,
) -> Self
pub fn set_spark_connect_session<T: Into<Box<SparkConnectConfig>>>( self, v: T, ) -> Self
Sets the value of session_config
to hold a SparkConnectSession.
Note that all the setters affecting session_config are
mutually exclusive.