Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiUiv1beta3SchemaEntityType

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1beta2/classes.rb,
lib/google/apis/documentai_v1beta2/representations.rb,
lib/google/apis/documentai_v1beta2/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiUiv1beta3SchemaEntityType

Returns a new instance of GoogleCloudDocumentaiUiv1beta3SchemaEntityType.



548
549
550
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 548

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#base_typeString

Type of the entity. It can be either a value type (such as "text", "numeric", " date" and "address"), or an object type which may contain nested entities ( such as "document" and "table"). Corresponds to the JSON property baseType

Returns:

  • (String)


516
517
518
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 516

def base_type
  @base_type
end

#descriptionString

Description of the entity type. Corresponds to the JSON property description

Returns:

  • (String)


521
522
523
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 521

def description
  @description
end

#occurrence_typeString

Occurrence type limits the number of times an entity type appears in the document. Corresponds to the JSON property occurrenceType

Returns:

  • (String)


527
528
529
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 527

def occurrence_type
  @occurrence_type
end

#propertiesArray<Google::Apis::DocumentaiV1beta2::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



536
537
538
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 536

def properties
  @properties
end

#sourceString

Source of this entity type. Corresponds to the JSON property source

Returns:

  • (String)


541
542
543
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 541

def source
  @source
end

#typeString

Name of the type. It must be unique within the set of same level types. Corresponds to the JSON property type

Returns:

  • (String)


546
547
548
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 546

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



553
554
555
556
557
558
559
560
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 553

def update!(**args)
  @base_type = args[:base_type] if args.key?(:base_type)
  @description = args[:description] if args.key?(:description)
  @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