#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourcePool
impl Debug for ResourcePool
Source§impl Default for ResourcePool
impl Default for ResourcePool
Source§fn default() -> ResourcePool
fn default() -> ResourcePool
Source§impl Message for ResourcePool
impl Message for ResourcePool
Source§impl PartialEq for ResourcePool
impl PartialEq for ResourcePool
impl StructuralPartialEq for ResourcePool
Auto Trait Implementations§
impl Freeze for ResourcePool
impl RefUnwindSafe for ResourcePool
impl Send for ResourcePool
impl Sync for ResourcePool
impl Unpin for ResourcePool
impl UnsafeUnpin for ResourcePool
impl UnwindSafe for ResourcePool
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