#[non_exhaustive]pub struct ReservationBlockHealthInfo {
pub degraded_sub_block_count: Option<i32>,
pub health_status: Option<HealthStatus>,
pub healthy_sub_block_count: Option<i32>,
/* private fields */
}Available on crate feature
reservation-blocks only.Expand description
Health information for the reservation block.
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_sub_block_count: Option<i32>The number of subBlocks that are degraded.
health_status: Option<HealthStatus>The health status of the reservation block.
healthy_sub_block_count: Option<i32>The number of subBlocks that are healthy.
Implementations§
Source§impl ReservationBlockHealthInfo
impl ReservationBlockHealthInfo
pub fn new() -> Self
Sourcepub fn set_degraded_sub_block_count<T>(self, v: T) -> Self
pub fn set_degraded_sub_block_count<T>(self, v: T) -> Self
Sets the value of degraded_sub_block_count.
§Example
ⓘ
let x = ReservationBlockHealthInfo::new().set_degraded_sub_block_count(42);Sourcepub fn set_or_clear_degraded_sub_block_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_degraded_sub_block_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of degraded_sub_block_count.
§Example
ⓘ
let x = ReservationBlockHealthInfo::new().set_or_clear_degraded_sub_block_count(Some(42));
let x = ReservationBlockHealthInfo::new().set_or_clear_degraded_sub_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::reservation_block_health_info::HealthStatus;
let x0 = ReservationBlockHealthInfo::new().set_health_status(HealthStatus::Healthy);
let x1 = ReservationBlockHealthInfo::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::reservation_block_health_info::HealthStatus;
let x0 = ReservationBlockHealthInfo::new().set_or_clear_health_status(Some(HealthStatus::Healthy));
let x1 = ReservationBlockHealthInfo::new().set_or_clear_health_status(Some(HealthStatus::Unspecified));
let x_none = ReservationBlockHealthInfo::new().set_or_clear_health_status(None::<HealthStatus>);Sourcepub fn set_healthy_sub_block_count<T>(self, v: T) -> Self
pub fn set_healthy_sub_block_count<T>(self, v: T) -> Self
Sets the value of healthy_sub_block_count.
§Example
ⓘ
let x = ReservationBlockHealthInfo::new().set_healthy_sub_block_count(42);Sourcepub fn set_or_clear_healthy_sub_block_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_healthy_sub_block_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of healthy_sub_block_count.
§Example
ⓘ
let x = ReservationBlockHealthInfo::new().set_or_clear_healthy_sub_block_count(Some(42));
let x = ReservationBlockHealthInfo::new().set_or_clear_healthy_sub_block_count(None::<i32>);Trait Implementations§
Source§impl Clone for ReservationBlockHealthInfo
impl Clone for ReservationBlockHealthInfo
Source§fn clone(&self) -> ReservationBlockHealthInfo
fn clone(&self) -> ReservationBlockHealthInfo
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 ReservationBlockHealthInfo
impl Debug for ReservationBlockHealthInfo
Source§impl Default for ReservationBlockHealthInfo
impl Default for ReservationBlockHealthInfo
Source§fn default() -> ReservationBlockHealthInfo
fn default() -> ReservationBlockHealthInfo
Returns the “default value” for a type. Read more
Source§impl Message for ReservationBlockHealthInfo
impl Message for ReservationBlockHealthInfo
impl StructuralPartialEq for ReservationBlockHealthInfo
Auto Trait Implementations§
impl Freeze for ReservationBlockHealthInfo
impl RefUnwindSafe for ReservationBlockHealthInfo
impl Send for ReservationBlockHealthInfo
impl Sync for ReservationBlockHealthInfo
impl Unpin for ReservationBlockHealthInfo
impl UnwindSafe for ReservationBlockHealthInfo
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