Enum google_api_proto::google::cloud::documentai::v1beta3::document_schema::entity_type::property::OccurrenceType
source · #[repr(i32)]pub enum OccurrenceType {
Unspecified = 0,
OptionalOnce = 1,
OptionalMultiple = 2,
RequiredOnce = 3,
RequiredMultiple = 4,
}
Expand description
Types of occurrences of the entity type in the document. This
represents the number of instances, not mentions, of an entity.
For example, a bank statement might only have one
account_number
, but this account number can be mentioned in several
places on the document. In this case, the account_number
is
considered a REQUIRED_ONCE
entity type. If, on the other hand, we
expect a bank statement to contain the status of multiple different
accounts for the customers, the occurrence type is set to
REQUIRED_MULTIPLE
.
Variants§
Unspecified = 0
Unspecified occurrence type.
OptionalOnce = 1
There will be zero or one instance of this entity type. The same entity instance may be mentioned multiple times.
OptionalMultiple = 2
The entity type will appear zero or multiple times.
RequiredOnce = 3
The entity type will only appear exactly once. The same entity instance may be mentioned multiple times.
RequiredMultiple = 4
The entity type will appear once or more times.
Implementations§
source§impl OccurrenceType
impl OccurrenceType
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 OccurrenceType
impl Clone for OccurrenceType
source§fn clone(&self) -> OccurrenceType
fn clone(&self) -> OccurrenceType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OccurrenceType
impl Debug for OccurrenceType
source§impl Default for OccurrenceType
impl Default for OccurrenceType
source§fn default() -> OccurrenceType
fn default() -> OccurrenceType
source§impl From<OccurrenceType> for i32
impl From<OccurrenceType> for i32
source§fn from(value: OccurrenceType) -> i32
fn from(value: OccurrenceType) -> i32
source§impl Hash for OccurrenceType
impl Hash for OccurrenceType
source§impl Ord for OccurrenceType
impl Ord for OccurrenceType
source§fn cmp(&self, other: &OccurrenceType) -> Ordering
fn cmp(&self, other: &OccurrenceType) -> 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 OccurrenceType
impl PartialEq for OccurrenceType
source§fn eq(&self, other: &OccurrenceType) -> bool
fn eq(&self, other: &OccurrenceType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for OccurrenceType
impl PartialOrd for OccurrenceType
source§fn partial_cmp(&self, other: &OccurrenceType) -> Option<Ordering>
fn partial_cmp(&self, other: &OccurrenceType) -> 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 OccurrenceType
impl TryFrom<i32> for OccurrenceType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<OccurrenceType, DecodeError>
fn try_from(value: i32) -> Result<OccurrenceType, DecodeError>
impl Copy for OccurrenceType
impl Eq for OccurrenceType
impl StructuralPartialEq for OccurrenceType
Auto Trait Implementations§
impl Freeze for OccurrenceType
impl RefUnwindSafe for OccurrenceType
impl Send for OccurrenceType
impl Sync for OccurrenceType
impl Unpin for OccurrenceType
impl UnwindSafe for OccurrenceType
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