Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchema

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

The schema defines the output of the processed document by a processor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1DocumentSchema

Returns a new instance of GoogleCloudDocumentaiV1DocumentSchema.



5479
5480
5481
# File 'lib/google/apis/documentai_v1/classes.rb', line 5479

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

Instance Attribute Details

#descriptionString

Description of the schema. Corresponds to the JSON property description

Returns:

  • (String)


5455
5456
5457
# File 'lib/google/apis/documentai_v1/classes.rb', line 5455

def description
  @description
end

#display_nameString

Display name to show users. Corresponds to the JSON property displayName

Returns:

  • (String)


5460
5461
5462
# File 'lib/google/apis/documentai_v1/classes.rb', line 5460

def display_name
  @display_name
end

#document_promptString

Optional. Document level prompt provided by the user. This custom text is injected into the AI model's prompt to provide extra, document-wide guidance for processing. Corresponds to the JSON property documentPrompt

Returns:

  • (String)


5467
5468
5469
# File 'lib/google/apis/documentai_v1/classes.rb', line 5467

def document_prompt
  @document_prompt
end

#entity_typesArray<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchemaEntityType>

Entity types of the schema. Corresponds to the JSON property entityTypes



5472
5473
5474
# File 'lib/google/apis/documentai_v1/classes.rb', line 5472

def entity_types
  @entity_types
end

#metadataGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchemaMetadata

Metadata for global schema behavior. Corresponds to the JSON property metadata



5477
5478
5479
# File 'lib/google/apis/documentai_v1/classes.rb', line 5477

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5484
5485
5486
5487
5488
5489
5490
# File 'lib/google/apis/documentai_v1/classes.rb', line 5484

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @document_prompt = args[:document_prompt] if args.key?(:document_prompt)
  @entity_types = args[:entity_types] if args.key?(:entity_types)
  @metadata = args[:metadata] if args.key?(:metadata)
end