Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3SchemaEntityType
- Inherits:
-
Object
- Object
- Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3SchemaEntityType
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/documentai_v1beta3/classes.rb,
lib/google/apis/documentai_v1beta3/representations.rb,
lib/google/apis/documentai_v1beta3/representations.rb
Overview
EntityType is the wrapper of a label of the corresponding model with detailed attributes and limitations for entity-based processors. Multiple types can also compose a dependency tree to represent nested types.
Instance Attribute Summary collapse
-
#base_type ⇒ String
Corresponds to the JSON property
baseType. -
#description ⇒ String
Description of the entity type.
-
#enum_values ⇒ Array<String>
If specified, lists all the possible values for this entity.
-
#hide ⇒ Boolean
(also: #hide?)
If the entity type is hidden in the schema.
-
#method_prop ⇒ String
Specifies how the entity's value is obtained.
-
#occurrence_type ⇒ String
Occurrence type limits the number of times an entity type appears in the document.
-
#properties ⇒ Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3SchemaEntityType>
Describing the nested structure of an entity.
-
#source ⇒ String
Source of this entity type.
-
#type ⇒ String
Name of the type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDocumentaiUiv1beta3SchemaEntityType
constructor
A new instance of GoogleCloudDocumentaiUiv1beta3SchemaEntityType.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDocumentaiUiv1beta3SchemaEntityType
Returns a new instance of GoogleCloudDocumentaiUiv1beta3SchemaEntityType.
2579 2580 2581 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2579 def initialize(**args) update!(**args) end |
Instance Attribute Details
#base_type ⇒ String
Corresponds to the JSON property baseType
2518 2519 2520 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2518 def base_type @base_type end |
#description ⇒ String
Description of the entity type.
Corresponds to the JSON property description
2523 2524 2525 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2523 def description @description end |
#enum_values ⇒ Array<String>
If specified, lists all the possible values for this entity.
Corresponds to the JSON property enumValues
2528 2529 2530 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2528 def enum_values @enum_values end |
#hide ⇒ Boolean Also known as: hide?
If the entity type is hidden in the schema. This provides the functionality to
temporally "disable" an entity without deleting it.
Corresponds to the JSON property hide
2534 2535 2536 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2534 def hide @hide end |
#method_prop ⇒ String
Specifies how the entity's value is obtained.
Corresponds to the JSON property method
2540 2541 2542 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2540 def method_prop @method_prop end |
#occurrence_type ⇒ String
Occurrence type limits the number of times an entity type appears in the
document.
Corresponds to the JSON property occurrenceType
2546 2547 2548 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2546 def occurrence_type @occurrence_type end |
#properties ⇒ Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiUiv1beta3SchemaEntityType>
Describing the nested structure of an entity. An EntityType may consist of
several other EntityTypes. For example, in a document there can be an
EntityType ID, which consists of EntityType name and address, with
corresponding attributes, such as TEXT for both types and ONCE for occurrence
types.
Corresponds to the JSON property properties
2555 2556 2557 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2555 def properties @properties end |
#source ⇒ String
Source of this entity type.
Corresponds to the JSON property source
2560 2561 2562 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2560 def source @source end |
#type ⇒ String
Name of the type. It must satisfy the following constraints: 1. Must be unique
within the set of same level types (with case-insensitive match). 2. Maximum
64 characters. 3. Must start with a letter. 4. Allowed characters: ASCII
letters [a-zA-Z], ASCII digits [0-9], or one of the following punctuation
characters: * underscore '_' (recommended) * hyphen '-' (allowed, not
recommended) * colon ':' (allowed, not recommended) NOTE: Whitespace
characters are not allowed. 5. Cannot end with a punctuation character. 6.
Cannot contain the following restricted strings: "google", "DocumentAI" (case-
insensitive match). 7. A slash character '/' is reserved as a separator in
flattened representations of nested entity types (e.g., "line_item/amount") in
which case each part (e.g., "line_item", "amount") must comply with the rules
defined above. We recommend using the snake case ("snake_case") in entity type
names.
Corresponds to the JSON property type
2577 2578 2579 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2577 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 2584 def update!(**args) @base_type = args[:base_type] if args.key?(:base_type) @description = args[:description] if args.key?(:description) @enum_values = args[:enum_values] if args.key?(:enum_values) @hide = args[:hide] if args.key?(:hide) @method_prop = args[:method_prop] if args.key?(:method_prop) @occurrence_type = args[:occurrence_type] if args.key?(:occurrence_type) @properties = args[:properties] if args.key?(:properties) @source = args[:source] if args.key?(:source) @type = args[:type] if args.key?(:type) end |