Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SchemaEntityType

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

Returns a new instance of GoogleCloudDocumentaiV1SchemaEntityType.



3252
3253
3254
# File 'lib/google/apis/documentai_v1/classes.rb', line 3252

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

Instance Attribute Details

#base_typeString

Type of the entity. It must be one of the following: document - the entity represents a classification of a logical document. object - if the entity has properties it is likely an object (or or a document.) datetime - the entity is a date or time value. money - the entity represents a money value amount. number - the entity is a number - integer or floating point. string

  • the entity is a string value. boolean - the entity is a boolean value. address - the entity is a location address. Corresponds to the JSON property baseType

Returns:

  • (String)


3215
3216
3217
# File 'lib/google/apis/documentai_v1/classes.rb', line 3215

def base_type
  @base_type
end

#descriptionString

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

Returns:

  • (String)


3220
3221
3222
# File 'lib/google/apis/documentai_v1/classes.rb', line 3220

def description
  @description
end

#enum_valuesArray<String>

If specified, lists all the possible values for this entity. Corresponds to the JSON property enumValues

Returns:

  • (Array<String>)


3225
3226
3227
# File 'lib/google/apis/documentai_v1/classes.rb', line 3225

def enum_values
  @enum_values
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)


3231
3232
3233
# File 'lib/google/apis/documentai_v1/classes.rb', line 3231

def occurrence_type
  @occurrence_type
end

#propertiesArray<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SchemaEntityType>

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



3240
3241
3242
# File 'lib/google/apis/documentai_v1/classes.rb', line 3240

def properties
  @properties
end

#sourceString

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

Returns:

  • (String)


3245
3246
3247
# File 'lib/google/apis/documentai_v1/classes.rb', line 3245

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)


3250
3251
3252
# File 'lib/google/apis/documentai_v1/classes.rb', line 3250

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3257
3258
3259
3260
3261
3262
3263
3264
3265
# File 'lib/google/apis/documentai_v1/classes.rb', line 3257

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)
  @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