Enum google_api_proto::google::apps::drive::labels::v2::precondition_failure::violation::Reason
source · #[repr(i32)]pub enum Reason {
Unspecified = 0,
CannotDisable = 1,
CannotEnable = 2,
CannotPublish = 3,
CannotUnpublish = 4,
CannotDelete = 5,
CannotRestrictRange = 6,
CannotChangePublishedField = 7,
CannotCreateMoreLabels = 8,
CannotChangePublishedFieldType = 9,
CannotModifyLockedComponent = 10,
UnsupportEnabledAppSettings = 11,
}
Expand description
The possible reasons a the violation occurred.
Variants§
Unspecified = 0
Unknown violation type.
CannotDisable = 1
This Resource cannot be Disabled. Only Published resources can be Disabled.
CannotEnable = 2
This Resource cannot be Enabled. Only Disabled resources can be Enabled.
CannotPublish = 3
This Resource cannot be Published. Only Draft or Disabled resources can be Published.
CannotUnpublish = 4
This Resource cannot be Unpublished. Once published, resources may not be set in “Draft” state.
CannotDelete = 5
This Resource cannot be Deleted. Only Disabled resources can be Deleted.
CannotRestrictRange = 6
The request modified a range in a Field, but the new range does
not include the previous range. When this error happens, field
points
at the Field where the violation occurred.
CannotChangePublishedField = 7
The specified change cannot be made to published Resources.
CannotCreateMoreLabels = 8
The customer cannot create new labels because the maximum number of labels for the customer has been reached.
CannotChangePublishedFieldType = 9
The Field type cannot be changed because the Field has been published.
CannotModifyLockedComponent = 10
The Label component is locked and cannot be deleted
UnsupportEnabledAppSettings = 11
The Label cannot be enabled in the target application or applications.
Implementations§
source§impl Reason
impl Reason
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 Ord for Reason
impl Ord for Reason
source§impl PartialEq for Reason
impl PartialEq for Reason
source§impl PartialOrd for Reason
impl PartialOrd for Reason
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 Reason
impl TryFrom<i32> for Reason
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
impl Copy for Reason
impl Eq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
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