Enum google_api_proto::google::cloud::gkebackup::logging::v1::restore_config::NamespacedResourceRestoreMode
source · #[repr(i32)]pub enum NamespacedResourceRestoreMode {
Unspecified = 0,
DeleteAndRestore = 1,
FailOnConflict = 2,
}
Expand description
Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster.
Variants§
Unspecified = 0
Unspecified. Only allowed if no namespaced resources will be restored.
DeleteAndRestore = 1
When conflicting top-level resources (either Namespaces or ProtectedApplications, depending upon the scope) are encountered, this will first trigger a delete of the conflicting resource AND ALL OF ITS REFERENCED RESOURCES (e.g., all resources in the Namespace or all resources referenced by the ProtectedApplication) before restoring the resources from the Backup. This mode should only be used when you are intending to revert some portion of a cluster to an earlier state.
FailOnConflict = 2
If conflicting top-level resources (either Namespaces or ProtectedApplications, depending upon the scope) are encountered at the beginning of a restore process, the Restore will fail. If a conflict occurs during the restore process itself (e.g., because an out of band process creates conflicting resources), a conflict will be reported.
Implementations§
source§impl NamespacedResourceRestoreMode
impl NamespacedResourceRestoreMode
sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of NamespacedResourceRestoreMode
.
sourcepub fn from_i32(value: i32) -> Option<NamespacedResourceRestoreMode>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<NamespacedResourceRestoreMode>
Converts an i32
to a NamespacedResourceRestoreMode
, or None
if value
is not a valid variant.
source§impl NamespacedResourceRestoreMode
impl NamespacedResourceRestoreMode
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 NamespacedResourceRestoreMode
impl Clone for NamespacedResourceRestoreMode
source§fn clone(&self) -> NamespacedResourceRestoreMode
fn clone(&self) -> NamespacedResourceRestoreMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for NamespacedResourceRestoreMode
impl Default for NamespacedResourceRestoreMode
source§fn default() -> NamespacedResourceRestoreMode
fn default() -> NamespacedResourceRestoreMode
source§impl From<NamespacedResourceRestoreMode> for i32
impl From<NamespacedResourceRestoreMode> for i32
source§fn from(value: NamespacedResourceRestoreMode) -> i32
fn from(value: NamespacedResourceRestoreMode) -> i32
source§impl Hash for NamespacedResourceRestoreMode
impl Hash for NamespacedResourceRestoreMode
source§impl Ord for NamespacedResourceRestoreMode
impl Ord for NamespacedResourceRestoreMode
source§fn cmp(&self, other: &NamespacedResourceRestoreMode) -> Ordering
fn cmp(&self, other: &NamespacedResourceRestoreMode) -> 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 NamespacedResourceRestoreMode
impl PartialEq for NamespacedResourceRestoreMode
source§fn eq(&self, other: &NamespacedResourceRestoreMode) -> bool
fn eq(&self, other: &NamespacedResourceRestoreMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NamespacedResourceRestoreMode
impl PartialOrd for NamespacedResourceRestoreMode
source§fn partial_cmp(&self, other: &NamespacedResourceRestoreMode) -> Option<Ordering>
fn partial_cmp(&self, other: &NamespacedResourceRestoreMode) -> 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 NamespacedResourceRestoreMode
impl TryFrom<i32> for NamespacedResourceRestoreMode
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(
value: i32,
) -> Result<NamespacedResourceRestoreMode, UnknownEnumValue>
fn try_from( value: i32, ) -> Result<NamespacedResourceRestoreMode, UnknownEnumValue>
impl Copy for NamespacedResourceRestoreMode
impl Eq for NamespacedResourceRestoreMode
impl StructuralPartialEq for NamespacedResourceRestoreMode
Auto Trait Implementations§
impl Freeze for NamespacedResourceRestoreMode
impl RefUnwindSafe for NamespacedResourceRestoreMode
impl Send for NamespacedResourceRestoreMode
impl Sync for NamespacedResourceRestoreMode
impl Unpin for NamespacedResourceRestoreMode
impl UnwindSafe for NamespacedResourceRestoreMode
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