Class: Google::Apis::DocumentaiV1beta3::DocumentService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/documentai_v1beta3/service.rb

Overview

Cloud Document AI API

Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML.

Examples:

require 'google/apis/documentai_v1beta3'

Documentai = Google::Apis::DocumentaiV1beta3 # Alias the module
service = Documentai::DocumentService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://documentai.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDocumentService

Returns a new instance of DocumentService.



49
50
51
52
53
54
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 49

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-documentai_v1beta3',
        client_version: Google::Apis::DocumentaiV1beta3::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



42
43
44
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 42

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



47
48
49
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 47

def quota_user
  @quota_user
end

Instance Method Details

#batch_project_location_processor_dataset_delete_documents(dataset, google_cloud_documentai_v1beta3_batch_delete_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Deletes a set of documents.

Parameters:

  • dataset (String)

    Required. The dataset resource name. Format: projects/project/locations/ location/processors/processor/dataset

  • google_cloud_documentai_v1beta3_batch_delete_documents_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



726
727
728
729
730
731
732
733
734
735
736
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 726

def batch_project_location_processor_dataset_delete_documents(dataset, google_cloud_documentai_v1beta3_batch_delete_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+dataset}:batchDeleteDocuments', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_batch_delete_documents_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['dataset'] = dataset unless dataset.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_project_location_processor_process(name, google_cloud_documentai_v1beta3_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.

Parameters:

  • name (String)

    Required. The resource name of Processor or ProcessorVersion. Format: projects/project/locations/location/processors/processor, or `projects/` project`/locations/`location`/processors/`processor`/processorVersions/` processorVersion

  • google_cloud_documentai_v1beta3_batch_process_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BatchProcessRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



376
377
378
379
380
381
382
383
384
385
386
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 376

def batch_project_location_processor_process(name, google_cloud_documentai_v1beta3_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:batchProcess', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BatchProcessRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_batch_process_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_project_location_processor_processor_version_process(name, google_cloud_documentai_v1beta3_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.

Parameters:

  • name (String)

    Required. The resource name of Processor or ProcessorVersion. Format: projects/project/locations/location/processors/processor, or `projects/` project`/locations/`location`/processors/`processor`/processorVersions/` processorVersion

  • google_cloud_documentai_v1beta3_batch_process_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BatchProcessRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 998

def batch_project_location_processor_processor_version_process(name, google_cloud_documentai_v1beta3_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:batchProcess', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3BatchProcessRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_batch_process_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleProtobufEmpty

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1 , corresponding to Code.CANCELLED.

Parameters:

  • name (String)

    The name of the operation resource to be cancelled.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



192
193
194
195
196
197
198
199
200
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 192

def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:cancel', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_location_processor(parent, google_cloud_documentai_v1beta3_processor_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor

Creates a processor from the ProcessorType provided. The processor will be at ENABLED state by default after its creation. Note that this method requires the documentai.processors.create permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

Parameters:

  • parent (String)

    Required. The parent (project and location) under which to create the processor. Format: projects/project/locations/location``

  • google_cloud_documentai_v1beta3_processor_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



414
415
416
417
418
419
420
421
422
423
424
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 414

def create_project_location_processor(parent, google_cloud_documentai_v1beta3_processor_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+parent}/processors', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor::Representation
  command.request_object = google_cloud_documentai_v1beta3_processor_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_location_schema(parent, google_cloud_documentai_v1beta3_next_schema_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema

Creates a schema.

Parameters:

  • parent (String)

    Required. The parent (project and location) under which to create the Schema. Format: projects/project/locations/location``

  • google_cloud_documentai_v1beta3_next_schema_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1414

def create_project_location_schema(parent, google_cloud_documentai_v1beta3_next_schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+parent}/schemas', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema::Representation
  command.request_object = google_cloud_documentai_v1beta3_next_schema_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_location_schema_schema_version(parent, google_cloud_documentai_v1beta3_schema_version_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion

Creates a schema version.

Parameters:

  • parent (String)

    Required. The parent (project and location) under which to create the SchemaVersion. Format: projects/project/locations/location/schemas/ schema``

  • google_cloud_documentai_v1beta3_schema_version_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1593

def create_project_location_schema_schema_version(parent, google_cloud_documentai_v1beta3_schema_version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+parent}/schemaVersions', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion::Representation
  command.request_object = google_cloud_documentai_v1beta3_schema_version_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_processor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.

Parameters:

  • name (String)

    Required. The processor resource name to be deleted.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



447
448
449
450
451
452
453
454
455
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 447

def delete_project_location_processor(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Deletes the processor version, all artifacts under the processor version will be deleted.

Parameters:

  • name (String)

    Required. The processor version resource name to be deleted.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1031
1032
1033
1034
1035
1036
1037
1038
1039
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1031

def delete_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_schema(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Deletes a schema.

Parameters:

  • name (String)

    Required. The name of the Schema to be deleted. Format: projects/project/ locations/location/schemas/schema``

  • force (Boolean) (defaults to: nil)

    Optional. If set to true, any child resources of this Schema will also be deleted. (Otherwise, the request will only work if the Schema has no child resources.)

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1451

def delete_project_location_schema(name, force: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['force'] = force unless force.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_location_schema_schema_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Deletes a schema version.

Parameters:

  • name (String)

    Required. The name of the SchemaVersion to delete. Format: projects/project/ locations/location/schemas/schema/schemaVersions/schema_version``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1626
1627
1628
1629
1630
1631
1632
1633
1634
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1626

def delete_project_location_schema_schema_version(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#deploy_project_location_processor_processor_version(name, google_cloud_documentai_v1beta3_deploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Deploys the processor version.

Parameters:

  • name (String)

    Required. The processor version resource name to be deployed.

  • google_cloud_documentai_v1beta3_deploy_processor_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DeployProcessorVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1062

def deploy_project_location_processor_processor_version(name, google_cloud_documentai_v1beta3_deploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:deploy', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DeployProcessorVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_deploy_processor_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#disable_project_location_processor(name, google_cloud_documentai_v1beta3_disable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Disables a processor

Parameters:

  • name (String)

    Required. The processor resource name to be disabled.

  • google_cloud_documentai_v1beta3_disable_processor_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DisableProcessorRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



478
479
480
481
482
483
484
485
486
487
488
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 478

def disable_project_location_processor(name, google_cloud_documentai_v1beta3_disable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:disable', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DisableProcessorRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_disable_processor_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#enable_project_location_processor(name, google_cloud_documentai_v1beta3_enable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Enables a processor

Parameters:

  • name (String)

    Required. The processor resource name to be enabled.

  • google_cloud_documentai_v1beta3_enable_processor_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3EnableProcessorRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



511
512
513
514
515
516
517
518
519
520
521
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 511

def enable_project_location_processor(name, google_cloud_documentai_v1beta3_enable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:enable', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3EnableProcessorRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_enable_processor_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#evaluate_project_location_processor_processor_version_processor_version(processor_version, google_cloud_documentai_v1beta3_evaluate_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

Parameters:

  • processor_version (String)

    Required. The resource name of the ProcessorVersion to evaluate. projects/ project/locations/location/processors/processor/processorVersions/ processorVersion``

  • google_cloud_documentai_v1beta3_evaluate_processor_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1098

def evaluate_project_location_processor_processor_version_processor_version(processor_version, google_cloud_documentai_v1beta3_evaluate_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+processorVersion}:evaluateProcessorVersion', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_evaluate_processor_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['processorVersion'] = processor_version unless processor_version.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#fetch_project_location_processor_types(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse

Fetches processor types. Note that we don't use ListProcessorTypes here, because it isn't paginated.

Parameters:

  • parent (String)

    Required. The location of processor types to list. Format: projects/project/ locations/location``.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



78
79
80
81
82
83
84
85
86
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 78

def fetch_project_location_processor_types(parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}:fetchProcessorTypes', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#generate_project_location_schema_schema_version(parent, google_cloud_documentai_v1beta3_generate_schema_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GenerateSchemaVersionResponse

Generates a schema version.

Parameters:

  • parent (String)

    Required. The parent (project, location and schema) under which to generate the SchemaVersion. Format: projects/project/locations/location/schemas/ schema``

  • google_cloud_documentai_v1beta3_generate_schema_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GenerateSchemaVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1659

def generate_project_location_schema_schema_version(parent, google_cloud_documentai_v1beta3_generate_schema_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+parent}/schemaVersions:generate', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GenerateSchemaVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_generate_schema_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GenerateSchemaVersionResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GenerateSchemaVersionResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudLocationLocation

Gets information about a location.

Parameters:

  • name (String)

    Resource name for the location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



108
109
110
111
112
113
114
115
116
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 108

def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudLocationLocation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudLocationLocation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



223
224
225
226
227
228
229
230
231
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 223

def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_processor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor

Gets a processor detail.

Parameters:

  • name (String)

    Required. The processor resource name.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



543
544
545
546
547
548
549
550
551
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 543

def get_project_location_processor(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Processor
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_processor_dataset_dataset_schema(name, visible_fields_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema

Gets the DatasetSchema of a Dataset.

Parameters:

  • name (String)

    Required. The dataset schema resource name. Format: projects/project/ locations/location/processors/processor/dataset/datasetSchema

  • visible_fields_only (Boolean) (defaults to: nil)

    If set, only returns the visible fields of the schema.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



761
762
763
764
765
766
767
768
769
770
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 761

def get_project_location_processor_dataset_dataset_schema(name, visible_fields_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema
  command.params['name'] = name unless name.nil?
  command.query['visibleFieldsOnly'] = visible_fields_only unless visible_fields_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_processor_dataset_document(dataset, document_id_gcs_managed_doc_id_cw_doc_id: nil, document_id_gcs_managed_doc_id_gcs_uri: nil, document_id_revision_ref_latest_processor_version: nil, document_id_revision_ref_revision_case: nil, document_id_revision_ref_revision_id: nil, document_id_unmanaged_doc_id_doc_id: nil, page_range_end: nil, page_range_start: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GetDocumentResponse

Returns relevant fields present in the requested document.

Parameters:

  • dataset (String)

    Required. The resource name of the dataset that the document belongs to . Format: projects/project/locations/location/processors/processor/dataset

  • document_id_gcs_managed_doc_id_cw_doc_id (String) (defaults to: nil)

    Id of the document (indexed) managed by Content Warehouse.

  • document_id_gcs_managed_doc_id_gcs_uri (String) (defaults to: nil)

    Required. The Cloud Storage URI where the actual document is stored.

  • document_id_revision_ref_latest_processor_version (String) (defaults to: nil)

    Reads the revision generated by the processor version. The format takes the full resource name of processor version. projects/project/locations/ location/processors/processor/processorVersions/processorVersion``

  • document_id_revision_ref_revision_case (String) (defaults to: nil)

    Reads the revision by the predefined case.

  • document_id_revision_ref_revision_id (String) (defaults to: nil)

    Reads the revision given by the id.

  • document_id_unmanaged_doc_id_doc_id (String) (defaults to: nil)

    Required. The id of the document.

  • page_range_end (Fixnum) (defaults to: nil)

    Last page number (one-based index) to be returned.

  • page_range_start (Fixnum) (defaults to: nil)

    First page number (one-based index) to be returned.

  • read_mask (String) (defaults to: nil)

    If set, only fields listed here will be returned. Otherwise, all fields will be returned by default.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 814

def get_project_location_processor_dataset_document(dataset, document_id_gcs_managed_doc_id_cw_doc_id: nil, document_id_gcs_managed_doc_id_gcs_uri: nil, document_id_revision_ref_latest_processor_version: nil, document_id_revision_ref_revision_case: nil, document_id_revision_ref_revision_id: nil, document_id_unmanaged_doc_id_doc_id: nil, page_range_end: nil, page_range_start: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+dataset}:getDocument', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GetDocumentResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3GetDocumentResponse
  command.params['dataset'] = dataset unless dataset.nil?
  command.query['documentId.gcsManagedDocId.cwDocId'] = document_id_gcs_managed_doc_id_cw_doc_id unless document_id_gcs_managed_doc_id_cw_doc_id.nil?
  command.query['documentId.gcsManagedDocId.gcsUri'] = document_id_gcs_managed_doc_id_gcs_uri unless document_id_gcs_managed_doc_id_gcs_uri.nil?
  command.query['documentId.revisionRef.latestProcessorVersion'] = document_id_revision_ref_latest_processor_version unless document_id_revision_ref_latest_processor_version.nil?
  command.query['documentId.revisionRef.revisionCase'] = document_id_revision_ref_revision_case unless document_id_revision_ref_revision_case.nil?
  command.query['documentId.revisionRef.revisionId'] = document_id_revision_ref_revision_id unless document_id_revision_ref_revision_id.nil?
  command.query['documentId.unmanagedDocId.docId'] = document_id_unmanaged_doc_id_doc_id unless document_id_unmanaged_doc_id_doc_id.nil?
  command.query['pageRange.end'] = page_range_end unless page_range_end.nil?
  command.query['pageRange.start'] = page_range_start unless page_range_start.nil?
  command.query['readMask'] = read_mask unless read_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorVersion

Gets a processor version detail.

Parameters:

  • name (String)

    Required. The processor resource name.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1130
1131
1132
1133
1134
1135
1136
1137
1138
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1130

def get_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorVersion::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorVersion
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_processor_processor_version_evaluation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Evaluation

Retrieves a specific evaluation.

Parameters:

  • name (String)

    Required. The resource name of the Evaluation to get. projects/project/ locations/location/processors/processor/processorVersions/ processorVersion/evaluations/evaluation``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1342
1343
1344
1345
1346
1347
1348
1349
1350
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1342

def get_project_location_processor_processor_version_evaluation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Evaluation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Evaluation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_processor_type(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorType

Gets a processor type detail.

Parameters:

  • name (String)

    Required. The processor type resource name.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



302
303
304
305
306
307
308
309
310
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 302

def get_project_location_processor_type(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorType::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorType
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_schema(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema

Gets a schema.

Parameters:

  • name (String)

    Required. The name of the Schema to get. Format: projects/project/locations/ location/schemas/schema``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1483
1484
1485
1486
1487
1488
1489
1490
1491
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1483

def get_project_location_schema(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_schema_schema_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion

Gets a schema version.

Parameters:

  • name (String)

    Required. The name of the SchemaVersion to get. Format: projects/project/ locations/location/schemas/schema/schemaVersions/schema_version``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1692
1693
1694
1695
1696
1697
1698
1699
1700
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1692

def get_project_location_schema_schema_version(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_project_location_processor_dataset_documents(dataset, google_cloud_documentai_v1beta3_import_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Import documents into a dataset.

Parameters:

  • dataset (String)

    Required. The dataset resource name. Format: projects/project/locations/ location/processors/processor/dataset

  • google_cloud_documentai_v1beta3_import_documents_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ImportDocumentsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



855
856
857
858
859
860
861
862
863
864
865
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 855

def import_project_location_processor_dataset_documents(dataset, google_cloud_documentai_v1beta3_import_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+dataset}:importDocuments', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ImportDocumentsRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_import_documents_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['dataset'] = dataset unless dataset.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_project_location_processor_processor_version_processor_version(parent, google_cloud_documentai_v1beta3_import_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Imports a processor version from source processor version.

Parameters:

  • parent (String)

    Required. The destination processor name to create the processor version in. Format: projects/project/locations/location/processors/processor``

  • google_cloud_documentai_v1beta3_import_processor_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1162

def import_project_location_processor_processor_version_processor_version(parent, google_cloud_documentai_v1beta3_import_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+parent}/processorVersions:importProcessorVersion', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_import_processor_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • return_partial_success (Boolean) (defaults to: nil)

    When set to true, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse. unreachable field. This can only be true when reading across collections. For example, when parent is set to "projects/example/locations/-". This field is not supported by default and will result in an UNIMPLEMENTED error if set unless explicitly documented otherwise in service or product specific documentation.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 268

def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_processor_dataset_documents(dataset, google_cloud_documentai_v1beta3_list_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListDocumentsResponse

Returns a list of documents present in the dataset.

Parameters:

  • dataset (String)

    Required. The resource name of the dataset to be listed. Format: projects/ project/locations/location/processors/processor/dataset

  • google_cloud_documentai_v1beta3_list_documents_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListDocumentsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



889
890
891
892
893
894
895
896
897
898
899
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 889

def list_project_location_processor_dataset_documents(dataset, google_cloud_documentai_v1beta3_list_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+dataset}:listDocuments', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListDocumentsRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_list_documents_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListDocumentsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListDocumentsResponse
  command.params['dataset'] = dataset unless dataset.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_processor_processor_version_evaluations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListEvaluationsResponse

Retrieves a set of evaluations for a given processor version.

Parameters:

  • parent (String)

    Required. The resource name of the ProcessorVersion to list evaluations for. projects/project/locations/location/processors/processor/ processorVersions/processorVersion``

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size. If unspecified, at most 5 evaluations are returned. The maximum value is 100. Values above 100 are coerced to 100.

  • page_token (String) (defaults to: nil)

    A page token, received from a previous ListEvaluations call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1380

def list_project_location_processor_processor_version_evaluations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}/evaluations', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListEvaluationsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListEvaluationsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_processor_processor_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse

Lists all versions of a processor.

Parameters:

  • parent (String)

    Required. The parent (project, location and processor) to list all versions. Format: projects/project/locations/location/processors/processor``

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of processor versions to return. If unspecified, at most 10 processor versions will be returned. The maximum value is 20. Values above 20 will be coerced to 20.

  • page_token (String) (defaults to: nil)

    We will return the processor versions sorted by creation time. The page token will point to the next processor version.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1202

def list_project_location_processor_processor_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}/processorVersions', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_processor_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse

Lists the processor types that exist.

Parameters:

  • parent (String)

    Required. The location of processor types to list. Format: projects/project/ locations/location``.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of processor types to return. If unspecified, at most 100 processor types will be returned. The maximum value is 500. Values above 500 will be coerced to 500.

  • page_token (String) (defaults to: nil)

    Used to retrieve the next page of results, empty if at the end of the list.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



339
340
341
342
343
344
345
346
347
348
349
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 339

def list_project_location_processor_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}/processorTypes', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_processors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorsResponse

Lists all processors which belong to this project.

Parameters:

  • parent (String)

    Required. The parent (project and location) which owns this collection of Processors. Format: projects/project/locations/location``

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of processors to return. If unspecified, at most 50 processors will be returned. The maximum value is 100. Values above 100 will be coerced to 100.

  • page_token (String) (defaults to: nil)

    We will return the processors sorted by creation time. The page token will point to the next processor.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



581
582
583
584
585
586
587
588
589
590
591
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 581

def list_project_location_processors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}/processors', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListProcessorsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_schema_schema_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListSchemaVersionsResponse

Lists SchemaVersions.

Parameters:

  • parent (String)

    Required. Format: projects/project/locations/location/schemas/schema``

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of SchemaVersion to return. If unspecified, at most 10 SchemaVersion will be returned. The maximum value is 20. Values above 20 will be coerced to 20.

  • page_token (String) (defaults to: nil)

    Optional. We will return the SchemaVersion sorted by creation time. The page token will point to the next SchemaVersion.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1729

def list_project_location_schema_schema_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}/schemaVersions', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListSchemaVersionsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListSchemaVersionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_schemas(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListSchemasResponse

Lists Schemas.

Parameters:

  • parent (String)

    Required. Format: projects/project/locations/location``

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of schema groups to return. If unspecified, at most 10 Schema will be returned. The maximum value is 20. Values above 20 will be coerced to 20.

  • page_token (String) (defaults to: nil)

    Optional. We will return the schema groups sorted by creation time. The page token will point to the next Schema.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1520

def list_project_location_schemas(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+parent}/schemas', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListSchemasResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ListSchemasResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudLocationListLocationsResponse

Lists information about the supported locations for this service.

Parameters:

  • name (String)

    The resource that owns the locations collection, if applicable.

  • extra_location_types (Array<String>, String) (defaults to: nil)

    Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.

  • filter (String) (defaults to: nil)

    A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return. If not set, the service selects a default.

  • page_token (String) (defaults to: nil)

    A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 151

def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta3/{+name}/locations', options)
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudLocationListLocationsResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudLocationListLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_project_location_schema(name, google_cloud_documentai_v1beta3_next_schema_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema

Updates a schema. Editable fields are: - display_name - labels

Parameters:

  • name (String)

    Identifier. The resource name of the Schema. Format: projects/project/ locations/location/schemas/schema``

  • google_cloud_documentai_v1beta3_next_schema_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. The update mask to apply to the resource. Note: Only the following fields can be updated: - display_name. - labels.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1557

def patch_project_location_schema(name, google_cloud_documentai_v1beta3_next_schema_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta3/{+name}', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema::Representation
  command.request_object = google_cloud_documentai_v1beta3_next_schema_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3NextSchema
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_project_location_schema_schema_version(name, google_cloud_documentai_v1beta3_schema_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion

Updates a schema version. Editable fields are: - display_name - labels

Parameters:

  • name (String)

    Identifier. The resource name of the SchemaVersion. Format: projects/project /locations/location/schemas/schema/schemaVersions/schema_version``

  • google_cloud_documentai_v1beta3_schema_version_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. The update mask to apply to the resource. Note: Only the following fields can be updated: - display_name. - labels.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1766

def patch_project_location_schema_schema_version(name, google_cloud_documentai_v1beta3_schema_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta3/{+name}', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion::Representation
  command.request_object = google_cloud_documentai_v1beta3_schema_version_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SchemaVersion
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#process_project_location_processor(name, google_cloud_documentai_v1beta3_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessResponse

Processes a single document.

Parameters:

  • name (String)

    Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/project/locations/location/processors/ processor, or `projects/`project`/locations/`location`/processors/`processor` /processorVersions/`processorVersion

  • google_cloud_documentai_v1beta3_process_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



618
619
620
621
622
623
624
625
626
627
628
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 618

def process_project_location_processor(name, google_cloud_documentai_v1beta3_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:process', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_process_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessResponse
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#process_project_location_processor_processor_version(name, google_cloud_documentai_v1beta3_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessResponse

Processes a single document.

Parameters:

  • name (String)

    Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/project/locations/location/processors/ processor, or `projects/`project`/locations/`location`/processors/`processor` /processorVersions/`processorVersion

  • google_cloud_documentai_v1beta3_process_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1239

def process_project_location_processor_processor_version(name, google_cloud_documentai_v1beta3_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:process', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_process_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessResponse::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessResponse
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#review_project_location_processor_human_review_config_document(human_review_config, google_cloud_documentai_v1beta3_review_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Send a document for Human Review. The input document should be processed by the specified processor.

Parameters:

  • human_review_config (String)

    Required. The resource name of the HumanReviewConfig that the document will be reviewed with.

  • google_cloud_documentai_v1beta3_review_document_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ReviewDocumentRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



961
962
963
964
965
966
967
968
969
970
971
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 961

def review_project_location_processor_human_review_config_document(human_review_config, google_cloud_documentai_v1beta3_review_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+humanReviewConfig}:reviewDocument', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ReviewDocumentRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_review_document_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['humanReviewConfig'] = human_review_config unless human_review_config.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#set_project_location_processor_default_processor_version(processor, google_cloud_documentai_v1beta3_set_default_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

Parameters:

  • processor (String)

    Required. The resource name of the Processor to change default version.

  • google_cloud_documentai_v1beta3_set_default_processor_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



652
653
654
655
656
657
658
659
660
661
662
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 652

def set_project_location_processor_default_processor_version(processor, google_cloud_documentai_v1beta3_set_default_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+processor}:setDefaultProcessorVersion', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_set_default_processor_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['processor'] = processor unless processor.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#train_project_location_processor_processor_version(parent, google_cloud_documentai_v1beta3_train_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Trains a new processor version. Operation metadata is returned as TrainProcessorVersionMetadata.

Parameters:

  • parent (String)

    Required. The parent (project, location and processor) to create the new version for. Format: projects/project/locations/location/processors/ processor``.

  • google_cloud_documentai_v1beta3_train_processor_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1275

def train_project_location_processor_processor_version(parent, google_cloud_documentai_v1beta3_train_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+parent}/processorVersions:train', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_train_processor_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#undeploy_project_location_processor_processor_version(name, google_cloud_documentai_v1beta3_undeploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Undeploys the processor version.

Parameters:

  • name (String)

    Required. The processor version resource name to be undeployed.

  • google_cloud_documentai_v1beta3_undeploy_processor_version_request_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3UndeployProcessorVersionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1308

def undeploy_project_location_processor_processor_version(name, google_cloud_documentai_v1beta3_undeploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta3/{+name}:undeploy', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3UndeployProcessorVersionRequest::Representation
  command.request_object = google_cloud_documentai_v1beta3_undeploy_processor_version_request_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_project_location_processor_dataset(name, google_cloud_documentai_v1beta3_dataset_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation

Updates metadata associated with a dataset. Note that this method requires the documentai.googleapis.com/datasets.update permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

Parameters:

  • name (String)

    Dataset resource name. Format: projects/project/locations/location/ processors/processor/dataset

  • google_cloud_documentai_v1beta3_dataset_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Dataset) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The update mask applies to the resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



691
692
693
694
695
696
697
698
699
700
701
702
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 691

def update_project_location_processor_dataset(name, google_cloud_documentai_v1beta3_dataset_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta3/{+name}', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3Dataset::Representation
  command.request_object = google_cloud_documentai_v1beta3_dataset_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_project_location_processor_dataset_dataset_schema(name, google_cloud_documentai_v1beta3_dataset_schema_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema

Updates a DatasetSchema.

Parameters:

  • name (String)

    Dataset schema resource name. Format: projects/project/locations/location/ processors/processor/dataset/datasetSchema

  • google_cloud_documentai_v1beta3_dataset_schema_object (Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The update mask applies to the resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



925
926
927
928
929
930
931
932
933
934
935
936
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 925

def update_project_location_processor_dataset_dataset_schema(name, google_cloud_documentai_v1beta3_dataset_schema_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta3/{+name}', options)
  command.request_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema::Representation
  command.request_object = google_cloud_documentai_v1beta3_dataset_schema_object
  command.response_representation = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema::Representation
  command.response_class = Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSchema
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end