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.



359
360
361
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 359

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)


327
328
329
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 327

def base_type
  @base_type
end

#descriptionString

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

Returns:

  • (String)


332
333
334
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 332

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)


338
339
340
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 338

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



347
348
349
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 347

def properties
  @properties
end

#sourceString

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

Returns:

  • (String)


352
353
354
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 352

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)


357
358
359
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 357

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



364
365
366
367
368
369
370
371
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 364

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