Class: Google::Apis::DocumentaiV1beta2::DocumentService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DocumentaiV1beta2::DocumentService
- Defined in:
- generated/google/apis/documentai_v1beta2/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_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation
LRO endpoint to batch process many documents.
-
#batch_project_location_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation
LRO endpoint to batch process many documents.
-
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#get_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#initialize ⇒ DocumentService
constructor
A new instance of DocumentService.
-
#process_project_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document
Processes a single document.
-
#process_project_location_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document
Processes a single document.
Constructor Details
#initialize ⇒ DocumentService
Returns a new instance of DocumentService.
47 48 49 50 |
# File 'generated/google/apis/documentai_v1beta2/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_v1beta2/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_v1beta2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#batch_project_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'generated/google/apis/documentai_v1beta2/service.rb', line 76 def batch_project_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta2/{+parent}/documents:batchProcess', ) command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest::Representation command.request_object = google_cloud_documentai_v1beta2_batch_process_documents_request_object command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_project_location_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
148 149 150 151 152 153 154 155 156 157 158 |
# File 'generated/google/apis/documentai_v1beta2/service.rb', line 148 def batch_project_location_document_process(parent, google_cloud_documentai_v1beta2_batch_process_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta2/{+parent}/documents:batchProcess', ) command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest::Representation command.request_object = google_cloud_documentai_v1beta2_batch_process_documents_request_object command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::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.
217 218 219 220 221 222 223 224 225 |
# File 'generated/google/apis/documentai_v1beta2/service.rb', line 217 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta2/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1beta2::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_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::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.
248 249 250 251 252 253 254 255 256 |
# File 'generated/google/apis/documentai_v1beta2/service.rb', line 248 def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta2/{+name}', ) command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::DocumentaiV1beta2::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 |
#process_project_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document
Processes a single document.
112 113 114 115 116 117 118 119 120 121 122 |
# File 'generated/google/apis/documentai_v1beta2/service.rb', line 112 def process_project_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta2/{+parent}/documents:process', ) command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest::Representation command.request_object = google_cloud_documentai_v1beta2_process_document_request_object command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document::Representation command.response_class = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document 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 |
#process_project_location_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document
Processes a single document.
184 185 186 187 188 189 190 191 192 193 194 |
# File 'generated/google/apis/documentai_v1beta2/service.rb', line 184 def process_project_location_document(parent, google_cloud_documentai_v1beta2_process_document_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta2/{+parent}/documents:process', ) command.request_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2ProcessDocumentRequest::Representation command.request_object = google_cloud_documentai_v1beta2_process_document_request_object command.response_representation = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document::Representation command.response_class = Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2Document 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 |