#[non_exhaustive]pub struct SessionTemplate {
pub name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub creator: String,
pub labels: HashMap<String, String>,
pub runtime_config: Option<RuntimeConfig>,
pub environment_config: Option<EnvironmentConfig>,
pub update_time: Option<Timestamp>,
pub uuid: String,
pub session_config: Option<SessionConfig>,
/* private fields */
}Expand description
A representation of a session template.
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. Identifier. The resource name of the session template.
description: StringOptional. Brief description of the template.
create_time: Option<Timestamp>Output only. The time when the template was created.
creator: StringOutput only. The email address of the user who created the template.
labels: HashMap<String, String>Optional. Labels to associate with sessions created using this template. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values can be empty, but, if present, must contain 1 to 63 characters and conform to RFC 1035. No more than 32 labels can be associated with a session.
runtime_config: Option<RuntimeConfig>Optional. Runtime configuration for session execution.
environment_config: Option<EnvironmentConfig>Optional. Environment configuration for session execution.
update_time: Option<Timestamp>Output only. The time the template was last updated.
uuid: StringOutput only. A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.
session_config: Option<SessionConfig>The session configuration.
Implementations§
Source§impl SessionTemplate
impl SessionTemplate
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> 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.
§Example
use wkt::Timestamp;
let x = SessionTemplate::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 = SessionTemplate::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = SessionTemplate::new().set_or_clear_create_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 = SessionTemplate::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 = SessionTemplate::new().set_or_clear_runtime_config(Some(RuntimeConfig::default()/* use setters */));
let x = SessionTemplate::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 = SessionTemplate::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 = SessionTemplate::new().set_or_clear_environment_config(Some(EnvironmentConfig::default()/* use setters */));
let x = SessionTemplate::new().set_or_clear_environment_config(None::<EnvironmentConfig>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = SessionTemplate::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = SessionTemplate::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = SessionTemplate::new().set_or_clear_update_time(None::<Timestamp>);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 = SessionTemplate::new().set_session_config(Some(
google_cloud_dataproc_v1::model::session_template::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 = SessionTemplate::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 = SessionTemplate::new().set_spark_connect_session(SparkConnectConfig::default()/* use setters */);
assert!(x.spark_connect_session().is_some());
assert!(x.jupyter_session().is_none());Trait Implementations§
Source§impl Clone for SessionTemplate
impl Clone for SessionTemplate
Source§fn clone(&self) -> SessionTemplate
fn clone(&self) -> SessionTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionTemplate
impl Debug for SessionTemplate
Source§impl Default for SessionTemplate
impl Default for SessionTemplate
Source§fn default() -> SessionTemplate
fn default() -> SessionTemplate
Source§impl Message for SessionTemplate
impl Message for SessionTemplate
Source§impl PartialEq for SessionTemplate
impl PartialEq for SessionTemplate
impl StructuralPartialEq for SessionTemplate
Auto Trait Implementations§
impl Freeze for SessionTemplate
impl RefUnwindSafe for SessionTemplate
impl Send for SessionTemplate
impl Sync for SessionTemplate
impl Unpin for SessionTemplate
impl UnsafeUnpin for SessionTemplate
impl UnwindSafe for SessionTemplate
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