#[non_exhaustive]pub struct AllocationResourceStatusHealthInfo {
pub degraded_block_count: Option<i32>,
pub health_status: Option<HealthStatus>,
pub healthy_block_count: Option<i32>,
/* private fields */
}Available on crate features
region-commitments or reservations only.Expand description
Health information for the reservation.
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.degraded_block_count: Option<i32>The number of reservation blocks that are degraded.
health_status: Option<HealthStatus>The health status of the reservation.
healthy_block_count: Option<i32>The number of reservation blocks that are healthy.
Implementations§
Source§impl AllocationResourceStatusHealthInfo
impl AllocationResourceStatusHealthInfo
pub fn new() -> Self
Sourcepub fn set_degraded_block_count<T>(self, v: T) -> Self
pub fn set_degraded_block_count<T>(self, v: T) -> Self
Sets the value of degraded_block_count.
§Example
ⓘ
let x = AllocationResourceStatusHealthInfo::new().set_degraded_block_count(42);Sourcepub fn set_or_clear_degraded_block_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_degraded_block_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of degraded_block_count.
§Example
ⓘ
let x = AllocationResourceStatusHealthInfo::new().set_or_clear_degraded_block_count(Some(42));
let x = AllocationResourceStatusHealthInfo::new().set_or_clear_degraded_block_count(None::<i32>);Sourcepub fn set_health_status<T>(self, v: T) -> Selfwhere
T: Into<HealthStatus>,
pub fn set_health_status<T>(self, v: T) -> Selfwhere
T: Into<HealthStatus>,
Sets the value of health_status.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_resource_status_health_info::HealthStatus;
let x0 = AllocationResourceStatusHealthInfo::new().set_health_status(HealthStatus::Healthy);
let x1 = AllocationResourceStatusHealthInfo::new().set_health_status(HealthStatus::Unspecified);Sourcepub fn set_or_clear_health_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<HealthStatus>,
pub fn set_or_clear_health_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<HealthStatus>,
Sets or clears the value of health_status.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_resource_status_health_info::HealthStatus;
let x0 = AllocationResourceStatusHealthInfo::new().set_or_clear_health_status(Some(HealthStatus::Healthy));
let x1 = AllocationResourceStatusHealthInfo::new().set_or_clear_health_status(Some(HealthStatus::Unspecified));
let x_none = AllocationResourceStatusHealthInfo::new().set_or_clear_health_status(None::<HealthStatus>);Sourcepub fn set_healthy_block_count<T>(self, v: T) -> Self
pub fn set_healthy_block_count<T>(self, v: T) -> Self
Sets the value of healthy_block_count.
§Example
ⓘ
let x = AllocationResourceStatusHealthInfo::new().set_healthy_block_count(42);Sourcepub fn set_or_clear_healthy_block_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_healthy_block_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of healthy_block_count.
§Example
ⓘ
let x = AllocationResourceStatusHealthInfo::new().set_or_clear_healthy_block_count(Some(42));
let x = AllocationResourceStatusHealthInfo::new().set_or_clear_healthy_block_count(None::<i32>);Trait Implementations§
Source§impl Clone for AllocationResourceStatusHealthInfo
impl Clone for AllocationResourceStatusHealthInfo
Source§fn clone(&self) -> AllocationResourceStatusHealthInfo
fn clone(&self) -> AllocationResourceStatusHealthInfo
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 Default for AllocationResourceStatusHealthInfo
impl Default for AllocationResourceStatusHealthInfo
Source§fn default() -> AllocationResourceStatusHealthInfo
fn default() -> AllocationResourceStatusHealthInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for AllocationResourceStatusHealthInfo
impl PartialEq for AllocationResourceStatusHealthInfo
Source§fn eq(&self, other: &AllocationResourceStatusHealthInfo) -> bool
fn eq(&self, other: &AllocationResourceStatusHealthInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AllocationResourceStatusHealthInfo
Auto Trait Implementations§
impl Freeze for AllocationResourceStatusHealthInfo
impl RefUnwindSafe for AllocationResourceStatusHealthInfo
impl Send for AllocationResourceStatusHealthInfo
impl Sync for AllocationResourceStatusHealthInfo
impl Unpin for AllocationResourceStatusHealthInfo
impl UnwindSafe for AllocationResourceStatusHealthInfo
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