#[non_exhaustive]pub struct CustomEnvironmentSpec {
pub machine_spec: Option<MachineSpec>,
pub persistent_disk_spec: Option<PersistentDiskSpec>,
pub network_spec: Option<NetworkSpec>,
/* private fields */
}Available on crate features
notebook-service or schedule-service only.Expand description
Compute configuration to use for an execution job.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.machine_spec: Option<MachineSpec>The specification of a single machine for the execution job.
persistent_disk_spec: Option<PersistentDiskSpec>The specification of a persistent disk to attach for the execution job.
network_spec: Option<NetworkSpec>The network configuration to use for the execution job.
Implementations§
Source§impl CustomEnvironmentSpec
impl CustomEnvironmentSpec
pub fn new() -> Self
Sourcepub fn set_machine_spec<T>(self, v: T) -> Selfwhere
T: Into<MachineSpec>,
pub fn set_machine_spec<T>(self, v: T) -> Selfwhere
T: Into<MachineSpec>,
Sets the value of machine_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::MachineSpec;
let x = CustomEnvironmentSpec::new().set_machine_spec(MachineSpec::default()/* use setters */);Sourcepub fn set_or_clear_machine_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<MachineSpec>,
pub fn set_or_clear_machine_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<MachineSpec>,
Sets or clears the value of machine_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::MachineSpec;
let x = CustomEnvironmentSpec::new().set_or_clear_machine_spec(Some(MachineSpec::default()/* use setters */));
let x = CustomEnvironmentSpec::new().set_or_clear_machine_spec(None::<MachineSpec>);Sourcepub fn set_persistent_disk_spec<T>(self, v: T) -> Selfwhere
T: Into<PersistentDiskSpec>,
pub fn set_persistent_disk_spec<T>(self, v: T) -> Selfwhere
T: Into<PersistentDiskSpec>,
Sets the value of persistent_disk_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::PersistentDiskSpec;
let x = CustomEnvironmentSpec::new().set_persistent_disk_spec(PersistentDiskSpec::default()/* use setters */);Sourcepub fn set_or_clear_persistent_disk_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<PersistentDiskSpec>,
pub fn set_or_clear_persistent_disk_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<PersistentDiskSpec>,
Sets or clears the value of persistent_disk_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::PersistentDiskSpec;
let x = CustomEnvironmentSpec::new().set_or_clear_persistent_disk_spec(Some(PersistentDiskSpec::default()/* use setters */));
let x = CustomEnvironmentSpec::new().set_or_clear_persistent_disk_spec(None::<PersistentDiskSpec>);Sourcepub fn set_network_spec<T>(self, v: T) -> Selfwhere
T: Into<NetworkSpec>,
pub fn set_network_spec<T>(self, v: T) -> Selfwhere
T: Into<NetworkSpec>,
Sets the value of network_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::NetworkSpec;
let x = CustomEnvironmentSpec::new().set_network_spec(NetworkSpec::default()/* use setters */);Sourcepub fn set_or_clear_network_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkSpec>,
pub fn set_or_clear_network_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkSpec>,
Sets or clears the value of network_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::NetworkSpec;
let x = CustomEnvironmentSpec::new().set_or_clear_network_spec(Some(NetworkSpec::default()/* use setters */));
let x = CustomEnvironmentSpec::new().set_or_clear_network_spec(None::<NetworkSpec>);Trait Implementations§
Source§impl Clone for CustomEnvironmentSpec
impl Clone for CustomEnvironmentSpec
Source§fn clone(&self) -> CustomEnvironmentSpec
fn clone(&self) -> CustomEnvironmentSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomEnvironmentSpec
impl Debug for CustomEnvironmentSpec
Source§impl Default for CustomEnvironmentSpec
impl Default for CustomEnvironmentSpec
Source§fn default() -> CustomEnvironmentSpec
fn default() -> CustomEnvironmentSpec
Returns the “default value” for a type. Read more
Source§impl Message for CustomEnvironmentSpec
impl Message for CustomEnvironmentSpec
Source§impl PartialEq for CustomEnvironmentSpec
impl PartialEq for CustomEnvironmentSpec
impl StructuralPartialEq for CustomEnvironmentSpec
Auto Trait Implementations§
impl Freeze for CustomEnvironmentSpec
impl RefUnwindSafe for CustomEnvironmentSpec
impl Send for CustomEnvironmentSpec
impl Sync for CustomEnvironmentSpec
impl Unpin for CustomEnvironmentSpec
impl UnwindSafe for CustomEnvironmentSpec
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
Mutably borrows from an owned value. Read more