#[non_exhaustive]pub struct UpcomingMaintenance {
pub can_reschedule: Option<bool>,
pub latest_window_start_time: Option<String>,
pub maintenance_on_shutdown: Option<bool>,
pub maintenance_reasons: Vec<MaintenanceReasons>,
pub maintenance_status: Option<MaintenanceStatus>,
pub type: Option<Type>,
pub window_end_time: Option<String>,
pub window_start_time: Option<String>,
/* private fields */
}instances or node-groups or region-commitments or reservation-blocks or reservation-sub-blocks or reservations only.Expand description
Upcoming Maintenance notification information.
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.can_reschedule: Option<bool>Indicates if the maintenance can be customer triggered.
latest_window_start_time: Option<String>The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format.
maintenance_on_shutdown: Option<bool>Indicates whether the UpcomingMaintenance will be triggered on VM shutdown.
maintenance_reasons: Vec<MaintenanceReasons>The reasons for the maintenance. Only valid for vms.
maintenance_status: Option<MaintenanceStatus>§type: Option<Type>Defines the type of maintenance.
window_end_time: Option<String>The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format.
window_start_time: Option<String>The current start time of the maintenance window. This timestamp value is in RFC3339 text format.
Implementations§
Source§impl UpcomingMaintenance
impl UpcomingMaintenance
pub fn new() -> Self
Sourcepub fn set_can_reschedule<T>(self, v: T) -> Self
pub fn set_can_reschedule<T>(self, v: T) -> Self
Sets the value of can_reschedule.
§Example
let x = UpcomingMaintenance::new().set_can_reschedule(true);Sourcepub fn set_or_clear_can_reschedule<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_can_reschedule<T>(self, v: Option<T>) -> Self
Sets or clears the value of can_reschedule.
§Example
let x = UpcomingMaintenance::new().set_or_clear_can_reschedule(Some(false));
let x = UpcomingMaintenance::new().set_or_clear_can_reschedule(None::<bool>);Sourcepub fn set_latest_window_start_time<T>(self, v: T) -> Self
pub fn set_latest_window_start_time<T>(self, v: T) -> Self
Sets the value of latest_window_start_time.
§Example
let x = UpcomingMaintenance::new().set_latest_window_start_time("example");Sourcepub fn set_or_clear_latest_window_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_latest_window_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of latest_window_start_time.
§Example
let x = UpcomingMaintenance::new().set_or_clear_latest_window_start_time(Some("example"));
let x = UpcomingMaintenance::new().set_or_clear_latest_window_start_time(None::<String>);Sourcepub fn set_maintenance_on_shutdown<T>(self, v: T) -> Self
pub fn set_maintenance_on_shutdown<T>(self, v: T) -> Self
Sets the value of maintenance_on_shutdown.
§Example
let x = UpcomingMaintenance::new().set_maintenance_on_shutdown(true);Sourcepub fn set_or_clear_maintenance_on_shutdown<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_maintenance_on_shutdown<T>(self, v: Option<T>) -> Self
Sets or clears the value of maintenance_on_shutdown.
§Example
let x = UpcomingMaintenance::new().set_or_clear_maintenance_on_shutdown(Some(false));
let x = UpcomingMaintenance::new().set_or_clear_maintenance_on_shutdown(None::<bool>);Sourcepub fn set_maintenance_reasons<T, V>(self, v: T) -> Self
pub fn set_maintenance_reasons<T, V>(self, v: T) -> Self
Sets the value of maintenance_reasons.
§Example
use google_cloud_compute_v1::model::upcoming_maintenance::MaintenanceReasons;
let x = UpcomingMaintenance::new().set_maintenance_reasons([
MaintenanceReasons::FailureGpu,
MaintenanceReasons::FailureGpuMultipleFaultyHostsCustomerReported,
MaintenanceReasons::FailureGpuNvlinkSwitchCustomerReported,
]);Sourcepub fn set_maintenance_status<T>(self, v: T) -> Selfwhere
T: Into<MaintenanceStatus>,
pub fn set_maintenance_status<T>(self, v: T) -> Selfwhere
T: Into<MaintenanceStatus>,
Sets the value of maintenance_status.
§Example
use google_cloud_compute_v1::model::upcoming_maintenance::MaintenanceStatus;
let x0 = UpcomingMaintenance::new().set_maintenance_status(MaintenanceStatus::Pending);
let x1 = UpcomingMaintenance::new().set_maintenance_status(MaintenanceStatus::Unknown);Sourcepub fn set_or_clear_maintenance_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<MaintenanceStatus>,
pub fn set_or_clear_maintenance_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<MaintenanceStatus>,
Sets or clears the value of maintenance_status.
§Example
use google_cloud_compute_v1::model::upcoming_maintenance::MaintenanceStatus;
let x0 = UpcomingMaintenance::new().set_or_clear_maintenance_status(Some(MaintenanceStatus::Pending));
let x1 = UpcomingMaintenance::new().set_or_clear_maintenance_status(Some(MaintenanceStatus::Unknown));
let x_none = UpcomingMaintenance::new().set_or_clear_maintenance_status(None::<MaintenanceStatus>);Sourcepub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of r#type.
§Example
use google_cloud_compute_v1::model::upcoming_maintenance::Type;
let x0 = UpcomingMaintenance::new().set_or_clear_type(Some(Type::Scheduled));
let x1 = UpcomingMaintenance::new().set_or_clear_type(Some(Type::UnknownType));
let x2 = UpcomingMaintenance::new().set_or_clear_type(Some(Type::Unscheduled));
let x_none = UpcomingMaintenance::new().set_or_clear_type(None::<Type>);Sourcepub fn set_window_end_time<T>(self, v: T) -> Self
pub fn set_window_end_time<T>(self, v: T) -> Self
Sets the value of window_end_time.
§Example
let x = UpcomingMaintenance::new().set_window_end_time("example");Sourcepub fn set_or_clear_window_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_window_end_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of window_end_time.
§Example
let x = UpcomingMaintenance::new().set_or_clear_window_end_time(Some("example"));
let x = UpcomingMaintenance::new().set_or_clear_window_end_time(None::<String>);Sourcepub fn set_window_start_time<T>(self, v: T) -> Self
pub fn set_window_start_time<T>(self, v: T) -> Self
Sets the value of window_start_time.
§Example
let x = UpcomingMaintenance::new().set_window_start_time("example");Sourcepub fn set_or_clear_window_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_window_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of window_start_time.
§Example
let x = UpcomingMaintenance::new().set_or_clear_window_start_time(Some("example"));
let x = UpcomingMaintenance::new().set_or_clear_window_start_time(None::<String>);Trait Implementations§
Source§impl Clone for UpcomingMaintenance
impl Clone for UpcomingMaintenance
Source§fn clone(&self) -> UpcomingMaintenance
fn clone(&self) -> UpcomingMaintenance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more