Reference documentation and code samples for the Document AI V1beta3 API class Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.
REST client for the DocumentProcessorService service.
Service to call Cloud DocumentAI to process documents according to the processor's definition. Processors are built using state-of-the-art Google AI such as natural language, computer vision, and translation to extract structured information from unstructured or semi-structured documents.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the DocumentProcessorService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DocumentProcessorService clients ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.configure do |config| config.timeout = 10.0 end
#batch_process_documents
def batch_process_documents(request, options = nil) -> ::Gapic::Operation
def batch_process_documents(name: nil, input_configs: nil, output_config: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil, process_options: nil) -> ::Gapic::Operation
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
def batch_process_documents(request, options = nil) -> ::Gapic::Operation
batch_process_documents
via a request object, either of type
BatchProcessRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def batch_process_documents(name: nil, input_configs: nil, output_config: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil, process_options: nil) -> ::Gapic::Operation
batch_process_documents
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of
Processor or
ProcessorVersion.
Format:
projects/{project}/locations/{location}/processors/{processor}
, orprojects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}
- input_configs (::Array<::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchInputConfig, ::Hash>) — The input config for each single document in the batch process.
- output_config (::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchOutputConfig, ::Hash) — The overall output config for batch process.
- input_documents (::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig, ::Hash) — The input documents for batch process.
- document_output_config (::Google::Cloud::DocumentAI::V1beta3::DocumentOutputConfig, ::Hash) — The overall output config for batch process.
- skip_human_review (::Boolean) — Whether Human Review feature should be skipped for this request. Default to false.
- process_options (::Google::Cloud::DocumentAI::V1beta3::ProcessOptions, ::Hash) — Inference-time options for the process API
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the DocumentProcessorService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_processor
def create_processor(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
def create_processor(parent: nil, processor: nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
Creates a processor from the type processor that the user chose. The processor will be at "ENABLED" state by default after its creation.
def create_processor(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
create_processor
via a request object, either of type
CreateProcessorRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::CreateProcessorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_processor(parent: nil, processor: nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
create_processor
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent (project and location) under which to create the
processor. Format:
projects/{project}/locations/{location}
- processor (::Google::Cloud::DocumentAI::V1beta3::Processor, ::Hash) — Required. The processor to be created, requires [processor_type] and [display_name] to be set. Also, the processor is under CMEK if CMEK fields are set.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::Processor)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_processor
def delete_processor(request, options = nil) -> ::Gapic::Operation
def delete_processor(name: nil) -> ::Gapic::Operation
Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.
def delete_processor(request, options = nil) -> ::Gapic::Operation
delete_processor
via a request object, either of type
Google::Cloud::DocumentAI::V1beta3::DeleteProcessorRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::DeleteProcessorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_processor(name: nil) -> ::Gapic::Operation
delete_processor
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor resource name to be deleted.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_processor_version
def delete_processor_version(request, options = nil) -> ::Gapic::Operation
def delete_processor_version(name: nil) -> ::Gapic::Operation
Deletes the processor version, all artifacts under the processor version will be deleted.
def delete_processor_version(request, options = nil) -> ::Gapic::Operation
delete_processor_version
via a request object, either of type
Google::Cloud::DocumentAI::V1beta3::DeleteProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::DeleteProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_processor_version(name: nil) -> ::Gapic::Operation
delete_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor version resource name to be deleted.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#deploy_processor_version
def deploy_processor_version(request, options = nil) -> ::Gapic::Operation
def deploy_processor_version(name: nil) -> ::Gapic::Operation
Deploys the processor version.
def deploy_processor_version(request, options = nil) -> ::Gapic::Operation
deploy_processor_version
via a request object, either of type
Google::Cloud::DocumentAI::V1beta3::DeployProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::DeployProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def deploy_processor_version(name: nil) -> ::Gapic::Operation
deploy_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor version resource name to be deployed.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#disable_processor
def disable_processor(request, options = nil) -> ::Gapic::Operation
def disable_processor(name: nil) -> ::Gapic::Operation
Disables a processor
def disable_processor(request, options = nil) -> ::Gapic::Operation
disable_processor
via a request object, either of type
Google::Cloud::DocumentAI::V1beta3::DisableProcessorRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::DisableProcessorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def disable_processor(name: nil) -> ::Gapic::Operation
disable_processor
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor resource name to be disabled.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#enable_processor
def enable_processor(request, options = nil) -> ::Gapic::Operation
def enable_processor(name: nil) -> ::Gapic::Operation
Enables a processor
def enable_processor(request, options = nil) -> ::Gapic::Operation
enable_processor
via a request object, either of type
EnableProcessorRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::EnableProcessorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def enable_processor(name: nil) -> ::Gapic::Operation
enable_processor
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor resource name to be enabled.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#evaluate_processor_version
def evaluate_processor_version(request, options = nil) -> ::Gapic::Operation
def evaluate_processor_version(processor_version: nil, evaluation_documents: nil) -> ::Gapic::Operation
Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.
def evaluate_processor_version(request, options = nil) -> ::Gapic::Operation
evaluate_processor_version
via a request object, either of type
EvaluateProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::EvaluateProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def evaluate_processor_version(processor_version: nil, evaluation_documents: nil) -> ::Gapic::Operation
evaluate_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
processor_version (::String) — Required. The resource name of the
ProcessorVersion to
evaluate.
projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}
- evaluation_documents (::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig, ::Hash) — Optional. The documents used in the evaluation. If unspecified, use the processor's dataset as evaluation input.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#fetch_processor_types
def fetch_processor_types(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse
def fetch_processor_types(parent: nil) -> ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse
Fetches processor types. Note that we do not use ListProcessorTypes here because it is not paginated.
def fetch_processor_types(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse
fetch_processor_types
via a request object, either of type
FetchProcessorTypesRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def fetch_processor_types(parent: nil) -> ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse
fetch_processor_types
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The project of processor type to list.
The available processor types may depend on the allow-listing on projects.
Format:
projects/{project}/locations/{location}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_evaluation
def get_evaluation(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::Evaluation
def get_evaluation(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::Evaluation
Retrieves a specific evaluation.
def get_evaluation(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::Evaluation
get_evaluation
via a request object, either of type
GetEvaluationRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::GetEvaluationRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_evaluation(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::Evaluation
get_evaluation
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the
Evaluation to get.
projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::Evaluation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_processor
def get_processor(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
def get_processor(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
Gets a processor detail.
def get_processor(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
get_processor
via a request object, either of type
GetProcessorRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::GetProcessorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_processor(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::Processor
get_processor
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor resource name.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::Processor)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_processor_type
def get_processor_type(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorType
def get_processor_type(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorType
Gets a processor type detail.
def get_processor_type(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorType
get_processor_type
via a request object, either of type
GetProcessorTypeRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::GetProcessorTypeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_processor_type(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorType
get_processor_type
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor type resource name.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::ProcessorType)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_processor_version
def get_processor_version(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion
def get_processor_version(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion
Gets a processor version detail.
def get_processor_version(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion
get_processor_version
via a request object, either of type
GetProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::GetProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_processor_version(name: nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion
get_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor resource name.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#import_processor_version
def import_processor_version(request, options = nil) -> ::Gapic::Operation
def import_processor_version(processor_version_source: nil, parent: nil) -> ::Gapic::Operation
Imports a processor version from source processor version.
def import_processor_version(request, options = nil) -> ::Gapic::Operation
import_processor_version
via a request object, either of type
ImportProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def import_processor_version(processor_version_source: nil, parent: nil) -> ::Gapic::Operation
import_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- processor_version_source (::String) — The source processor version to import from.
-
parent (::String) — Required. The destination processor name to create the processor version
in. Format:
projects/{project}/locations/{location}/processors/{processor}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#initialize
def initialize() { |config| ... } -> Client
Create a new DocumentProcessorService REST client object.
- (config) — Configure the DocumentProcessorService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_evaluations
def list_evaluations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Evaluation>
def list_evaluations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Evaluation>
Retrieves a set of evaluations for a given processor version.
def list_evaluations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Evaluation>
list_evaluations
via a request object, either of type
ListEvaluationsRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ListEvaluationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_evaluations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Evaluation>
list_evaluations
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The resource name of the
ProcessorVersion to
list evaluations for.
projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}
- page_size (::Integer) — The standard list page size. If unspecified, at most 5 evaluations will be returned. The maximum value is 100; values above 100 will be coerced to 100.
-
page_token (::String) — A page token, received from a previous
ListEvaluations
call. Provide this to retrieve the subsequent page.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Evaluation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Evaluation>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#list_processor_types
def list_processor_types(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>
def list_processor_types(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>
Lists the processor types that exist.
def list_processor_types(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>
list_processor_types
via a request object, either of type
ListProcessorTypesRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_processor_types(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>
list_processor_types
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The location of processor type to list.
The available processor types may depend on the allow-listing on projects.
Format:
projects/{project}/locations/{location}
- page_size (::Integer) — 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) — Used to retrieve the next page of results, empty if at the end of the list.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#list_processor_versions
def list_processor_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>
def list_processor_versions(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>
Lists all versions of a processor.
def list_processor_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>
list_processor_versions
via a request object, either of type
ListProcessorVersionsRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ListProcessorVersionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_processor_versions(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>
list_processor_versions
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent (project, location and processor) to list all
versions. Format:
projects/{project}/locations/{location}/processors/{processor}
- page_size (::Integer) — 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) — We will return the processor versions sorted by creation time. The page token will point to the next processor version.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#list_processors
def list_processors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>
def list_processors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>
Lists all processors which belong to this project.
def list_processors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>
list_processors
via a request object, either of type
ListProcessorsRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_processors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>
list_processors
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent (project and location) which owns this collection of
Processors. Format:
projects/{project}/locations/{location}
- page_size (::Integer) — 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) — We will return the processors sorted by creation time. The page token will point to the next processor.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Rest::Operations
Get the associated client for long-running operations.
#process_document
def process_document(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessResponse
def process_document(inline_document: nil, raw_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil, process_options: nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessResponse
Processes a single document.
def process_document(request, options = nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessResponse
process_document
via a request object, either of type
ProcessRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ProcessRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def process_document(inline_document: nil, raw_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil, process_options: nil) -> ::Google::Cloud::DocumentAI::V1beta3::ProcessResponse
process_document
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- inline_document (::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash) — An inline document proto.
- raw_document (::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash) — A raw document content (bytes).
-
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][google.cloud.documentai.v1beta3.Processor.default_processor_version].
Format:
projects/{project}/locations/{location}/processors/{processor}
, orprojects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}
- document (::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash) — The document payload, the [content] and [mime_type] fields must be set.
- skip_human_review (::Boolean) — Whether Human Review feature should be skipped for this request. Default to false.
-
field_mask (::Google::Protobuf::FieldMask, ::Hash) — Specifies which fields to include in ProcessResponse's document.
Only supports top level document and pages field so it must be in the form
of
{document_field_name}
orpages.{page_field_name}
. - process_options (::Google::Cloud::DocumentAI::V1beta3::ProcessOptions, ::Hash) — Inference-time options for the process API
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DocumentAI::V1beta3::ProcessResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#review_document
def review_document(request, options = nil) -> ::Gapic::Operation
def review_document(inline_document: nil, human_review_config: nil, document: nil, enable_schema_validation: nil, priority: nil, document_schema: nil) -> ::Gapic::Operation
Send a document for Human Review. The input document should be processed by the specified processor.
def review_document(request, options = nil) -> ::Gapic::Operation
review_document
via a request object, either of type
ReviewDocumentRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def review_document(inline_document: nil, human_review_config: nil, document: nil, enable_schema_validation: nil, priority: nil, document_schema: nil) -> ::Gapic::Operation
review_document
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- inline_document (::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash) — An inline document proto.
- human_review_config (::String) — Required. The resource name of the HumanReviewConfig that the document will be reviewed with.
- document (::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash) — The document that needs human review.
- enable_schema_validation (::Boolean) — Whether the validation should be performed on the ad-hoc review request.
- priority (::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest::Priority) — The priority of the human review task.
- document_schema (::Google::Cloud::DocumentAI::V1beta3::DocumentSchema, ::Hash) — The document schema of the human review task.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#set_default_processor_version
def set_default_processor_version(request, options = nil) -> ::Gapic::Operation
def set_default_processor_version(processor: nil, default_processor_version: nil) -> ::Gapic::Operation
Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.
def set_default_processor_version(request, options = nil) -> ::Gapic::Operation
set_default_processor_version
via a request object, either of type
SetDefaultProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::SetDefaultProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def set_default_processor_version(processor: nil, default_processor_version: nil) -> ::Gapic::Operation
set_default_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- processor (::String) — Required. The resource name of the Processor to change default version.
-
default_processor_version (::String) — Required. The resource name of child
ProcessorVersion to use
as default. Format:
projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#train_processor_version
def train_processor_version(request, options = nil) -> ::Gapic::Operation
def train_processor_version(parent: nil, processor_version: nil, document_schema: nil, input_data: nil, base_processor_version: nil) -> ::Gapic::Operation
Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata.
def train_processor_version(request, options = nil) -> ::Gapic::Operation
train_processor_version
via a request object, either of type
TrainProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def train_processor_version(parent: nil, processor_version: nil, document_schema: nil, input_data: nil, base_processor_version: nil) -> ::Gapic::Operation
train_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent (project, location and processor) to create the new
version for. Format:
projects/{project}/locations/{location}/processors/{processor}
. - processor_version (::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion, ::Hash) — Required. The processor version to be created.
- document_schema (::Google::Cloud::DocumentAI::V1beta3::DocumentSchema, ::Hash) — Optional. The schema the processor version will be trained with.
-
input_data (::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::InputData, ::Hash) — Optional. The input data used to train the
ProcessorVersion
. -
base_processor_version (::String) — Optional. The processor version to use as a base for training. This
processor version must be a child of
parent
. Format:projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#undeploy_processor_version
def undeploy_processor_version(request, options = nil) -> ::Gapic::Operation
def undeploy_processor_version(name: nil) -> ::Gapic::Operation
Undeploys the processor version.
def undeploy_processor_version(request, options = nil) -> ::Gapic::Operation
undeploy_processor_version
via a request object, either of type
UndeployProcessorVersionRequest or an equivalent Hash.
- request (::Google::Cloud::DocumentAI::V1beta3::UndeployProcessorVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def undeploy_processor_version(name: nil) -> ::Gapic::Operation
undeploy_processor_version
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The processor version resource name to be undeployed.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.