#[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: StringIdentifier. 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
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.
§Example
use wkt::Timestamp;
let x = Session::new().set_create_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Session::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Session::new().set_or_clear_create_time(None::<Timestamp>);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.
§Example
use google_cloud_dataproc_v1::model::RuntimeInfo;
let x = Session::new().set_runtime_info(RuntimeInfo::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::RuntimeInfo;
let x = Session::new().set_or_clear_runtime_info(Some(RuntimeInfo::default()/* use setters */));
let x = Session::new().set_or_clear_runtime_info(None::<RuntimeInfo>);Sourcepub fn set_state_message<T: Into<String>>(self, v: T) -> Self
pub fn set_state_message<T: Into<String>>(self, v: T) -> Self
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.
§Example
use wkt::Timestamp;
let x = Session::new().set_state_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Session::new().set_or_clear_state_time(Some(Timestamp::default()/* use setters */));
let x = Session::new().set_or_clear_state_time(None::<Timestamp>);Sourcepub fn set_creator<T: Into<String>>(self, v: T) -> Self
pub fn set_creator<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
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.
§Example
use google_cloud_dataproc_v1::model::RuntimeConfig;
let x = Session::new().set_runtime_config(RuntimeConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::RuntimeConfig;
let x = Session::new().set_or_clear_runtime_config(Some(RuntimeConfig::default()/* use setters */));
let x = Session::new().set_or_clear_runtime_config(None::<RuntimeConfig>);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.
§Example
use google_cloud_dataproc_v1::model::EnvironmentConfig;
let x = Session::new().set_environment_config(EnvironmentConfig::default()/* use setters */);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.
§Example
use google_cloud_dataproc_v1::model::EnvironmentConfig;
let x = Session::new().set_or_clear_environment_config(Some(EnvironmentConfig::default()/* use setters */));
let x = Session::new().set_or_clear_environment_config(None::<EnvironmentConfig>);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.
§Example
use google_cloud_dataproc_v1::model::session::SessionStateHistory;
let x = Session::new()
.set_state_history([
SessionStateHistory::default()/* use setters */,
SessionStateHistory::default()/* use (different) setters */,
]);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.
§Example
let x = Session::new().set_session_template(format!("projects/{project_id}/locations/{location_id}/sessionTemplates/{template_id}"));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.
§Example
use google_cloud_dataproc_v1::model::JupyterConfig;
let x = Session::new().set_session_config(Some(
google_cloud_dataproc_v1::model::session::SessionConfig::JupyterSession(JupyterConfig::default().into())));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.
§Example
use google_cloud_dataproc_v1::model::JupyterConfig;
let x = Session::new().set_jupyter_session(JupyterConfig::default()/* use setters */);
assert!(x.jupyter_session().is_some());
assert!(x.spark_connect_session().is_none());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.
§Example
use google_cloud_dataproc_v1::model::SparkConnectConfig;
let x = Session::new().set_spark_connect_session(SparkConnectConfig::default()/* use setters */);
assert!(x.spark_connect_session().is_some());
assert!(x.jupyter_session().is_none());Trait Implementations§
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request