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



713
714
715
716
717
718
719
720
721
722
723
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 713

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



363
364
365
366
367
368
369
370
371
372
373
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 363

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



985
986
987
988
989
990
991
992
993
994
995
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 985

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



188
189
190
191
192
193
194
195
196
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 188

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



401
402
403
404
405
406
407
408
409
410
411
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 401

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

#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



434
435
436
437
438
439
440
441
442
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 434

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



1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1018

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

#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



1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1049

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



465
466
467
468
469
470
471
472
473
474
475
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 465

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



498
499
500
501
502
503
504
505
506
507
508
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 498

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



1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1085

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

#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



219
220
221
222
223
224
225
226
227
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 219

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



530
531
532
533
534
535
536
537
538
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 530

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



748
749
750
751
752
753
754
755
756
757
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 748

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



801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 801

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



1117
1118
1119
1120
1121
1122
1123
1124
1125
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1117

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



1329
1330
1331
1332
1333
1334
1335
1336
1337
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1329

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



289
290
291
292
293
294
295
296
297
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 289

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

#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



842
843
844
845
846
847
848
849
850
851
852
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 842

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



1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1149

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, 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.

  • 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



256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 256

def list_project_location_operations(name, filter: nil, page_size: nil, page_token: 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['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



876
877
878
879
880
881
882
883
884
885
886
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 876

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



1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1367

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



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1189

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



326
327
328
329
330
331
332
333
334
335
336
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 326

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



568
569
570
571
572
573
574
575
576
577
578
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 568

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_locations(name, 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.

  • 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



148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 148

def list_project_locations(name, 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['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

#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



605
606
607
608
609
610
611
612
613
614
615
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 605

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



1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1226

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



948
949
950
951
952
953
954
955
956
957
958
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 948

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



639
640
641
642
643
644
645
646
647
648
649
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 639

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



1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1262

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



1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 1295

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



678
679
680
681
682
683
684
685
686
687
688
689
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 678

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



912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/google/apis/documentai_v1beta3/service.rb', line 912

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