Enum google_api_proto::google::cloud::compute::v1::scheduling::OnHostMaintenance
source · #[repr(i32)]pub enum OnHostMaintenance {
UndefinedOnHostMaintenance = 0,
Migrate = 165_699_979,
Terminate = 527_617_601,
}
Expand description
Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Set VM host maintenance policy.
Variants§
UndefinedOnHostMaintenance = 0
A value indicating that the enum field is not set.
Migrate = 165_699_979
[Default] Allows Compute Engine to automatically migrate instances out of the way of maintenance events.
Terminate = 527_617_601
Tells Compute Engine to terminate and (optionally) restart the instance away from the maintenance activity. If you would like your instance to be restarted, set the automaticRestart flag to true. Your instance may be restarted more than once, and it may be restarted outside the window of maintenance events.
Implementations§
source§impl OnHostMaintenance
impl OnHostMaintenance
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for OnHostMaintenance
impl Clone for OnHostMaintenance
source§fn clone(&self) -> OnHostMaintenance
fn clone(&self) -> OnHostMaintenance
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OnHostMaintenance
impl Debug for OnHostMaintenance
source§impl Default for OnHostMaintenance
impl Default for OnHostMaintenance
source§fn default() -> OnHostMaintenance
fn default() -> OnHostMaintenance
source§impl From<OnHostMaintenance> for i32
impl From<OnHostMaintenance> for i32
source§fn from(value: OnHostMaintenance) -> i32
fn from(value: OnHostMaintenance) -> i32
source§impl Hash for OnHostMaintenance
impl Hash for OnHostMaintenance
source§impl Ord for OnHostMaintenance
impl Ord for OnHostMaintenance
source§fn cmp(&self, other: &OnHostMaintenance) -> Ordering
fn cmp(&self, other: &OnHostMaintenance) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for OnHostMaintenance
impl PartialEq for OnHostMaintenance
source§fn eq(&self, other: &OnHostMaintenance) -> bool
fn eq(&self, other: &OnHostMaintenance) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for OnHostMaintenance
impl PartialOrd for OnHostMaintenance
source§fn partial_cmp(&self, other: &OnHostMaintenance) -> Option<Ordering>
fn partial_cmp(&self, other: &OnHostMaintenance) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for OnHostMaintenance
impl TryFrom<i32> for OnHostMaintenance
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<OnHostMaintenance, UnknownEnumValue>
fn try_from(value: i32) -> Result<OnHostMaintenance, UnknownEnumValue>
impl Copy for OnHostMaintenance
impl Eq for OnHostMaintenance
impl StructuralPartialEq for OnHostMaintenance
Auto Trait Implementations§
impl Freeze for OnHostMaintenance
impl RefUnwindSafe for OnHostMaintenance
impl Send for OnHostMaintenance
impl Sync for OnHostMaintenance
impl Unpin for OnHostMaintenance
impl UnwindSafe for OnHostMaintenance
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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