Class: Google::Apis::DocumentaiV1::DocumentService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DocumentaiV1::DocumentService
- Defined in:
- lib/google/apis/documentai_v1/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.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_project_location_processor_process(name, google_cloud_documentai_v1_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
LRO endpoint to batch process many documents.
-
#batch_project_location_processor_processor_version_process(name, google_cloud_documentai_v1_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
LRO endpoint to batch process many documents.
-
#cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleProtobufEmpty
Starts asynchronous cancellation on a long-running operation.
-
#cancel_uiv1beta3_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleProtobufEmpty
Starts asynchronous cancellation on a long-running operation.
-
#create_project_location_processor(parent, google_cloud_documentai_v1_processor_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor
Creates a processor from the type processor that the user chose.
-
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleProtobufEmpty
Deletes a long-running operation.
-
#delete_project_location_processor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.
-
#delete_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Deletes the processor version, all artifacts under the processor version will be deleted.
-
#deploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_deploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Deploys the processor version.
-
#disable_project_location_processor(name, google_cloud_documentai_v1_disable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Disables a processor.
-
#enable_project_location_processor(name, google_cloud_documentai_v1_enable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Enables a processor.
-
#fetch_project_location_processor_types(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse
Fetches processor types.
-
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudLocationLocation
Gets information about a location.
-
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#get_project_location_processor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor
Gets a processor detail.
-
#get_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion
Gets a processor version detail.
-
#get_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#get_uiv1beta3_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudLocationLocation
Gets information about a location.
-
#get_uiv1beta3_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#initialize ⇒ DocumentService
constructor
A new instance of DocumentService.
-
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_location_processor_processor_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse
Lists all versions of a processor.
-
#list_project_location_processor_types(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorTypesResponse
Lists the processor types that exist.
-
#list_project_location_processors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse
Lists all processors which belong to this project.
-
#list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudLocationListLocationsResponse
Lists information about the supported locations for this service.
-
#list_uiv1beta3_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_uiv1beta3_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudLocationListLocationsResponse
Lists information about the supported locations for this service.
-
#process_project_location_processor(name, google_cloud_documentai_v1_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse
Processes a single document.
-
#process_project_location_processor_processor_version(name, google_cloud_documentai_v1_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse
Processes a single document.
-
#review_project_location_processor_human_review_config_document(human_review_config, google_cloud_documentai_v1_review_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Send a document for Human Review.
-
#set_project_location_processor_default_processor_version(processor, google_cloud_documentai_v1_set_default_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.
-
#undeploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_undeploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Undeploys the processor version.
Constructor Details
#initialize ⇒ DocumentService
Returns a new instance of DocumentService.
47 48 49 50 51 52 |
# File 'lib/google/apis/documentai_v1/service.rb', line 47 def initialize super('https://documentai.googleapis.com/', '', client_name: 'google-apis-documentai_v1', client_version: Google::Apis::DocumentaiV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
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.
40 41 42 |
# File 'lib/google/apis/documentai_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
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.
45 46 47 |
# File 'lib/google/apis/documentai_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#batch_project_location_processor_process(name, google_cloud_documentai_v1_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/google/apis/documentai_v1/service.rb', line 372 def batch_project_location_processor_process(name, google_cloud_documentai_v1_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:batchProcess', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1BatchProcessRequest::Representation command.request_object = google_cloud_documentai_v1_batch_process_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
717 718 719 720 721 722 723 724 725 726 727 |
# File 'lib/google/apis/documentai_v1/service.rb', line 717 def batch_project_location_processor_processor_version_process(name, google_cloud_documentai_v1_batch_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:batchProcess', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1BatchProcessRequest::Representation command.request_object = google_cloud_documentai_v1_batch_process_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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::DocumentaiV1::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
.
220 221 222 223 224 225 226 227 228 |
# File 'lib/google/apis/documentai_v1/service.rb', line 220 def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DocumentaiV1::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 |
#cancel_uiv1beta3_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::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
.
1064 1065 1066 1067 1068 1069 1070 1071 1072 |
# File 'lib/google/apis/documentai_v1/service.rb', line 1064 def cancel_uiv1beta3_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'uiv1beta3/{+name}:cancel', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_processor_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor
Creates a processor from the type processor that the user chose. The processor will be at "ENABLED" state by default after its creation.
407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/google/apis/documentai_v1/service.rb', line 407 def create_project_location_processor(parent, google_cloud_documentai_v1_processor_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/processors', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor::Representation command.request_object = google_cloud_documentai_v1_processor_object command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor 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_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleProtobufEmpty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED
.
77 78 79 80 81 82 83 84 85 |
# File 'lib/google/apis/documentai_v1/service.rb', line 77 def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::DocumentaiV1::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 |
#delete_project_location_processor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.
440 441 442 443 444 445 446 447 448 |
# File 'lib/google/apis/documentai_v1/service.rb', line 440 def delete_project_location_processor(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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::DocumentaiV1::GoogleLongrunningOperation
Deletes the processor version, all artifacts under the processor version will be deleted.
750 751 752 753 754 755 756 757 758 |
# File 'lib/google/apis/documentai_v1/service.rb', line 750 def delete_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_deploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Deploys the processor version.
781 782 783 784 785 786 787 788 789 790 791 |
# File 'lib/google/apis/documentai_v1/service.rb', line 781 def deploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_deploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:deploy', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DeployProcessorVersionRequest::Representation command.request_object = google_cloud_documentai_v1_deploy_processor_version_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_disable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Disables a processor
471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/google/apis/documentai_v1/service.rb', line 471 def disable_project_location_processor(name, google_cloud_documentai_v1_disable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:disable', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DisableProcessorRequest::Representation command.request_object = google_cloud_documentai_v1_disable_processor_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_enable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Enables a processor
504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/google/apis/documentai_v1/service.rb', line 504 def enable_project_location_processor(name, google_cloud_documentai_v1_enable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:enable', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1EnableProcessorRequest::Representation command.request_object = google_cloud_documentai_v1_enable_processor_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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 |
#fetch_project_location_processor_types(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse
Fetches processor types. Note that we do not use ListProcessorTypes here because it is not paginated.
110 111 112 113 114 115 116 117 118 |
# File 'lib/google/apis/documentai_v1/service.rb', line 110 def fetch_project_location_processor_types(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}:fetchProcessorTypes', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse 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::DocumentaiV1::GoogleCloudLocationLocation
Gets information about a location.
140 141 142 143 144 145 146 147 148 |
# File 'lib/google/apis/documentai_v1/service.rb', line 140 def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudLocationLocation::Representation command.response_class = Google::Apis::DocumentaiV1::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::DocumentaiV1::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.
251 252 253 254 255 256 257 258 259 |
# File 'lib/google/apis/documentai_v1/service.rb', line 251 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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::DocumentaiV1::GoogleCloudDocumentaiV1Processor
Gets a processor detail.
536 537 538 539 540 541 542 543 544 |
# File 'lib/google/apis/documentai_v1/service.rb', line 536 def get_project_location_processor(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor 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(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion
Gets a processor version detail.
813 814 815 816 817 818 819 820 821 |
# File 'lib/google/apis/documentai_v1/service.rb', line 813 def get_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion 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_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::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.
954 955 956 957 958 959 960 961 962 |
# File 'lib/google/apis/documentai_v1/service.rb', line 954 def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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_uiv1beta3_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudLocationLocation
Gets information about a location.
984 985 986 987 988 989 990 991 992 |
# File 'lib/google/apis/documentai_v1/service.rb', line 984 def get_uiv1beta3_project_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'uiv1beta3/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudLocationLocation::Representation command.response_class = Google::Apis::DocumentaiV1::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_uiv1beta3_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::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.
1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/google/apis/documentai_v1/service.rb', line 1095 def get_uiv1beta3_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'uiv1beta3/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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 |
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED
. NOTE: the name
binding allows API services to override the binding to use different resource
name schemes, such as users/*/operations
. To override the binding, API
services can add a binding such as "/v1/
name=users/*/operations"
to their
service configuration. For backwards compatibility, the default name includes
the operations collection id, however overriding users must ensure the name
binding is the parent resource, without the operations collection id.
294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/google/apis/documentai_v1/service.rb', line 294 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, 'v1/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::DocumentaiV1::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_processor_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse
Lists all versions of a processor.
851 852 853 854 855 856 857 858 859 860 861 |
# File 'lib/google/apis/documentai_v1/service.rb', line 851 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, 'v1/{+parent}/processorVersions', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse 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::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorTypesResponse
Lists the processor types that exist.
335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/google/apis/documentai_v1/service.rb', line 335 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, 'v1/{+parent}/processorTypes', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorTypesResponse::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorTypesResponse 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::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse
Lists all processors which belong to this project.
574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/google/apis/documentai_v1/service.rb', line 574 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, 'v1/{+parent}/processors', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse 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::DocumentaiV1::GoogleCloudLocationListLocationsResponse
Lists information about the supported locations for this service.
180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/google/apis/documentai_v1/service.rb', line 180 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, 'v1/{+name}/locations', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudLocationListLocationsResponse::Representation command.response_class = Google::Apis::DocumentaiV1::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 |
#list_uiv1beta3_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED
. NOTE: the name
binding allows API services to override the binding to use different resource
name schemes, such as users/*/operations
. To override the binding, API
services can add a binding such as "/v1/
name=users/*/operations"
to their
service configuration. For backwards compatibility, the default name includes
the operations collection id, however overriding users must ensure the name
binding is the parent resource, without the operations collection id.
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 |
# File 'lib/google/apis/documentai_v1/service.rb', line 1138 def list_uiv1beta3_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, 'uiv1beta3/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::DocumentaiV1::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_uiv1beta3_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudLocationListLocationsResponse
Lists information about the supported locations for this service.
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 |
# File 'lib/google/apis/documentai_v1/service.rb', line 1024 def list_uiv1beta3_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'uiv1beta3/{+name}/locations', ) command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudLocationListLocationsResponse::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse
Processes a single document.
611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/google/apis/documentai_v1/service.rb', line 611 def process_project_location_processor(name, google_cloud_documentai_v1_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:process', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessRequest::Representation command.request_object = google_cloud_documentai_v1_process_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse 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_v1_process_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse
Processes a single document.
888 889 890 891 892 893 894 895 896 897 898 |
# File 'lib/google/apis/documentai_v1/service.rb', line 888 def process_project_location_processor_processor_version(name, google_cloud_documentai_v1_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:process', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessRequest::Representation command.request_object = google_cloud_documentai_v1_process_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse::Representation command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessResponse 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_v1_review_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Send a document for Human Review. The input document should be processed by the specified processor.
680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/google/apis/documentai_v1/service.rb', line 680 def review_project_location_processor_human_review_config_document(human_review_config, google_cloud_documentai_v1_review_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+humanReviewConfig}:reviewDocument', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ReviewDocumentRequest::Representation command.request_object = google_cloud_documentai_v1_review_document_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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_v1_set_default_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.
645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/google/apis/documentai_v1/service.rb', line 645 def set_project_location_processor_default_processor_version(processor, google_cloud_documentai_v1_set_default_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+processor}:setDefaultProcessorVersion', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest::Representation command.request_object = google_cloud_documentai_v1_set_default_processor_version_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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 |
#undeploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_undeploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1::GoogleLongrunningOperation
Undeploys the processor version.
921 922 923 924 925 926 927 928 929 930 931 |
# File 'lib/google/apis/documentai_v1/service.rb', line 921 def undeploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_undeploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:undeploy', ) command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1UndeployProcessorVersionRequest::Representation command.request_object = google_cloud_documentai_v1_undeploy_processor_version_request_object command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1::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 |