#[non_exhaustive]pub struct Instance {Show 14 fields
pub name: String,
pub proxy_uri: String,
pub instance_owners: Vec<String>,
pub creator: String,
pub state: State,
pub upgrade_history: Vec<UpgradeHistoryEntry>,
pub id: String,
pub health_state: HealthState,
pub health_info: HashMap<String, String>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub disable_proxy_access: bool,
pub labels: HashMap<String, String>,
pub infrastructure: Option<Infrastructure>,
/* private fields */
}Expand description
The definition of a notebook instance.
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: StringOutput only. The name of this notebook instance. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
proxy_uri: StringOutput only. The proxy endpoint that is used to access the Jupyter notebook.
instance_owners: Vec<String>Optional. Input only. The owner of this instance after creation. Format:
alias@example.com
Currently supports one owner only. If not specified, all of the service account users of your VM instance’s service account can use the instance.
creator: StringOutput only. Email address of entity that sent original CreateInstance request.
state: StateOutput only. The state of this instance.
upgrade_history: Vec<UpgradeHistoryEntry>Output only. The upgrade history of this instance.
id: StringOutput only. Unique ID of the resource.
health_state: HealthStateOutput only. Instance health_state.
health_info: HashMap<String, String>Output only. Additional information about instance health. Example:
healthInfo": {
"docker_proxy_agent_status": "1",
"docker_status": "1",
"jupyterlab_api_status": "-1",
"jupyterlab_status": "-1",
"updated": "2020-10-18 09:40:03.573409"
}create_time: Option<Timestamp>Output only. Instance creation time.
update_time: Option<Timestamp>Output only. Instance update time.
disable_proxy_access: boolOptional. If true, the notebook instance will not register with the proxy.
labels: HashMap<String, String>Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method.
infrastructure: Option<Infrastructure>Setup for the Notebook instance.
Implementations§
Source§impl Instance
impl Instance
Sourcepub fn set_proxy_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_proxy_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_instance_owners<T, V>(self, v: T) -> Self
pub fn set_instance_owners<T, V>(self, v: T) -> Self
Sets the value of instance_owners.
§Example
let x = Instance::new().set_instance_owners(["a", "b", "c"]);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_upgrade_history<T, V>(self, v: T) -> Self
pub fn set_upgrade_history<T, V>(self, v: T) -> Self
Sets the value of upgrade_history.
§Example
use google_cloud_notebooks_v2::model::UpgradeHistoryEntry;
let x = Instance::new()
.set_upgrade_history([
UpgradeHistoryEntry::default()/* use setters */,
UpgradeHistoryEntry::default()/* use (different) setters */,
]);Sourcepub fn set_health_state<T: Into<HealthState>>(self, v: T) -> Self
pub fn set_health_state<T: Into<HealthState>>(self, v: T) -> Self
Sets the value of health_state.
§Example
use google_cloud_notebooks_v2::model::HealthState;
let x0 = Instance::new().set_health_state(HealthState::Healthy);
let x1 = Instance::new().set_health_state(HealthState::Unhealthy);
let x2 = Instance::new().set_health_state(HealthState::AgentNotInstalled);Sourcepub fn set_health_info<T, K, V>(self, v: T) -> Self
pub fn set_health_info<T, K, V>(self, v: T) -> Self
Sets the value of health_info.
§Example
let x = Instance::new().set_health_info([
("key0", "abc"),
("key1", "xyz"),
]);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 = Instance::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 = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);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 = Instance::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 = Instance::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_disable_proxy_access<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_proxy_access<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_proxy_access.
§Example
let x = Instance::new().set_disable_proxy_access(true);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_infrastructure<T: Into<Option<Infrastructure>>>(self, v: T) -> Self
pub fn set_infrastructure<T: Into<Option<Infrastructure>>>(self, v: T) -> Self
Sets the value of infrastructure.
Note that all the setters affecting infrastructure are mutually
exclusive.
§Example
use google_cloud_notebooks_v2::model::GceSetup;
let x = Instance::new().set_infrastructure(Some(
google_cloud_notebooks_v2::model::instance::Infrastructure::GceSetup(GceSetup::default().into())));Sourcepub fn gce_setup(&self) -> Option<&Box<GceSetup>>
pub fn gce_setup(&self) -> Option<&Box<GceSetup>>
The value of infrastructure
if it holds a GceSetup, None if the field is not set or
holds a different branch.
Sourcepub fn set_gce_setup<T: Into<Box<GceSetup>>>(self, v: T) -> Self
pub fn set_gce_setup<T: Into<Box<GceSetup>>>(self, v: T) -> Self
Sets the value of infrastructure
to hold a GceSetup.
Note that all the setters affecting infrastructure are
mutually exclusive.
§Example
use google_cloud_notebooks_v2::model::GceSetup;
let x = Instance::new().set_gce_setup(GceSetup::default()/* use setters */);
assert!(x.gce_setup().is_some());Trait Implementations§
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instance
impl UnwindSafe for Instance
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