#[non_exhaustive]pub struct ResourcePool {
pub id: String,
pub machine_spec: Option<MachineSpec>,
pub replica_count: Option<i64>,
pub disk_spec: Option<DiskSpec>,
pub used_replica_count: i64,
pub autoscaling_spec: Option<AutoscalingSpec>,
/* private fields */
}persistent-resource-service only.Expand description
Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource.
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.id: StringImmutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it’s generated automatically.
machine_spec: Option<MachineSpec>Required. Immutable. The specification of a single machine.
replica_count: Option<i64>Optional. The total number of machines to use for this resource pool.
disk_spec: Option<DiskSpec>Optional. Disk spec for the machine in this node pool.
used_replica_count: i64Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count.
autoscaling_spec: Option<AutoscalingSpec>Optional. Optional spec to configure GKE or Ray-on-Vertex autoscaling
Implementations§
Source§impl ResourcePool
impl ResourcePool
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 = ResourcePool::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 = ResourcePool::new().set_or_clear_machine_spec(Some(MachineSpec::default()/* use setters */));
let x = ResourcePool::new().set_or_clear_machine_spec(None::<MachineSpec>);Sourcepub fn set_replica_count<T>(self, v: T) -> Self
pub fn set_replica_count<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_replica_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_replica_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of replica_count.
§Example
let x = ResourcePool::new().set_or_clear_replica_count(Some(42));
let x = ResourcePool::new().set_or_clear_replica_count(None::<i32>);Sourcepub fn set_disk_spec<T>(self, v: T) -> Self
pub fn set_disk_spec<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_disk_spec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disk_spec<T>(self, v: Option<T>) -> Self
Sourcepub fn set_used_replica_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_used_replica_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of used_replica_count.
§Example
let x = ResourcePool::new().set_used_replica_count(42);Sourcepub fn set_autoscaling_spec<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingSpec>,
pub fn set_autoscaling_spec<T>(self, v: T) -> Selfwhere
T: Into<AutoscalingSpec>,
Sets the value of autoscaling_spec.
§Example
use google_cloud_aiplatform_v1::model::resource_pool::AutoscalingSpec;
let x = ResourcePool::new().set_autoscaling_spec(AutoscalingSpec::default()/* use setters */);Sourcepub fn set_or_clear_autoscaling_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingSpec>,
pub fn set_or_clear_autoscaling_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoscalingSpec>,
Sets or clears the value of autoscaling_spec.
§Example
use google_cloud_aiplatform_v1::model::resource_pool::AutoscalingSpec;
let x = ResourcePool::new().set_or_clear_autoscaling_spec(Some(AutoscalingSpec::default()/* use setters */));
let x = ResourcePool::new().set_or_clear_autoscaling_spec(None::<AutoscalingSpec>);Trait Implementations§
Source§impl Clone for ResourcePool
impl Clone for ResourcePool
Source§fn clone(&self) -> ResourcePool
fn clone(&self) -> ResourcePool
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more