Class: Google::Apis::DocumentaiV1beta3::DocumentService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DocumentaiV1beta3::DocumentService
- Defined in:
- generated/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.
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_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.
-
#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.
-
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudLocationLocation
Gets information about a location.
-
#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.
-
#initialize ⇒ DocumentService
constructor
A new instance of DocumentService.
-
#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.
-
#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.
-
#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.
-
#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.
Constructor Details
#initialize ⇒ DocumentService
Returns a new instance of DocumentService.
47 48 49 50 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 47 def initialize super('https://documentai.googleapis.com/', '') @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 'generated/google/apis/documentai_v1beta3/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 'generated/google/apis/documentai_v1beta3/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#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.
176 177 178 179 180 181 182 183 184 185 186 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 176 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', ) 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.
284 285 286 287 288 289 290 291 292 293 294 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 284 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', ) 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 |
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudLocationLocation
Gets information about a location.
72 73 74 75 76 77 78 79 80 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 72 def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta3/{+name}', ) 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.
142 143 144 145 146 147 148 149 150 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 142 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta3/{+name}', ) 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 |
#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.
108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 108 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', ) 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.
213 214 215 216 217 218 219 220 221 222 223 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 213 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', ) 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.
321 322 323 324 325 326 327 328 329 330 331 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 321 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', ) 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.
248 249 250 251 252 253 254 255 256 257 258 |
# File 'generated/google/apis/documentai_v1beta3/service.rb', line 248 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', ) 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 |