Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType

Returns a new instance of GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType.



6768
6769
6770
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6768

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

Instance Attribute Details

#base_typesArray<String>

The entity type that this type is derived from. For now, one and only one should be set. Corresponds to the JSON property baseTypes

Returns:

  • (Array<String>)


6739
6740
6741
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6739

def base_types
  @base_types
end

#display_nameString

User defined name for the type. Corresponds to the JSON property displayName

Returns:

  • (String)


6744
6745
6746
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6744

def display_name
  @display_name
end

#enum_valuesGoogle::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues

Defines the a list of enum values. Corresponds to the JSON property enumValues



6749
6750
6751
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6749

def enum_values
  @enum_values
end

#nameString

Name of the type. It must be unique within the schema file and cannot be a ' Common Type'. Besides that we use the following naming conventions: - use snake_casing - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters [a-z0-9_-]. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The '/' is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility. Corresponds to the JSON property name

Returns:

  • (String)


6761
6762
6763
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6761

def name
  @name
end

#propertiesArray<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty>

Describing the nested structure, or composition of an entity. Corresponds to the JSON property properties



6766
6767
6768
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6766

def properties
  @properties
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6773
6774
6775
6776
6777
6778
6779
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 6773

def update!(**args)
  @base_types = args[:base_types] if args.key?(:base_types)
  @display_name = args[:display_name] if args.key?(:display_name)
  @enum_values = args[:enum_values] if args.key?(:enum_values)
  @name = args[:name] if args.key?(:name)
  @properties = args[:properties] if args.key?(:properties)
end