google-cloud-document_ai-v1beta3 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +957 -123
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +21 -0
  4. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  5. data/lib/google/cloud/documentai/v1beta3/barcode_pb.rb +24 -0
  6. data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +0 -2
  7. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +12 -1
  8. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +83 -0
  9. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +21 -1
  10. data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +60 -0
  11. data/lib/google/cloud/documentai/v1beta3/geometry_pb.rb +0 -2
  12. data/lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb +1 -1
  13. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +27 -2
  14. data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +2 -1
  15. data/proto_docs/google/api/launch_stage.rb +71 -0
  16. data/proto_docs/google/cloud/documentai/v1beta3/barcode.rb +71 -0
  17. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +111 -138
  18. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +223 -10
  19. data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +154 -0
  20. data/proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb +3 -0
  21. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +92 -7
  22. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +9 -6
  23. data/proto_docs/google/protobuf/empty.rb +0 -2
  24. metadata +27 -2
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/documentai/v1beta3/document_processor_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -157,6 +158,12 @@ module Google
157
158
  config.endpoint = @config.endpoint
158
159
  end
159
160
 
161
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
162
+ config.credentials = credentials
163
+ config.quota_project = @quota_project_id
164
+ config.endpoint = @config.endpoint
165
+ end
166
+
160
167
  @document_processor_service_stub = ::Gapic::ServiceStub.new(
161
168
  ::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Stub,
162
169
  credentials: credentials,
@@ -173,6 +180,13 @@ module Google
173
180
  #
174
181
  attr_reader :operations_client
175
182
 
183
+ ##
184
+ # Get the associated client for mix-in of the Locations.
185
+ #
186
+ # @return [Google::Cloud::Location::Locations::Client]
187
+ #
188
+ attr_reader :location_client
189
+
176
190
  # Service calls
177
191
 
178
192
  ##
@@ -182,34 +196,701 @@ module Google
182
196
  # Pass arguments to `process_document` via a request object, either of type
183
197
  # {::Google::Cloud::DocumentAI::V1beta3::ProcessRequest} or an equivalent Hash.
184
198
  #
185
- # @param request [::Google::Cloud::DocumentAI::V1beta3::ProcessRequest, ::Hash]
199
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::ProcessRequest, ::Hash]
200
+ # A request object representing the call parameters. Required. To specify no
201
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
202
+ # @param options [::Gapic::CallOptions, ::Hash]
203
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
204
+ #
205
+ # @overload process_document(inline_document: nil, raw_document: nil, name: nil, document: nil, skip_human_review: nil, field_mask: nil)
206
+ # Pass arguments to `process_document` via keyword arguments. Note that at
207
+ # least one keyword argument is required. To specify no parameters, or to keep all
208
+ # the default parameter values, pass an empty Hash as a request object (see above).
209
+ #
210
+ # @param inline_document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
211
+ # An inline document proto.
212
+ # @param raw_document [::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash]
213
+ # A raw document content (bytes).
214
+ # @param name [::String]
215
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
216
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}
217
+ # to use for processing. If a {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} is specified, the server will use
218
+ # its {::Google::Cloud::DocumentAI::V1beta3::Processor#default_processor_version default version}. Format:
219
+ # `projects/{project}/locations/{location}/processors/{processor}`, or
220
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
221
+ # @param document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
222
+ # The document payload, the [content] and [mime_type] fields must be set.
223
+ # @param skip_human_review [::Boolean]
224
+ # Whether Human Review feature should be skipped for this request. Default to
225
+ # false.
226
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
227
+ # Specifies which fields to include in ProcessResponse's document.
228
+ #
229
+ # @yield [response, operation] Access the result along with the RPC operation
230
+ # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
231
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
232
+ #
233
+ # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
234
+ #
235
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
236
+ #
237
+ # @example Basic example
238
+ # require "google/cloud/document_ai/v1beta3"
239
+ #
240
+ # # Create a client object. The client can be reused for multiple calls.
241
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
242
+ #
243
+ # # Create a request. To set request fields, pass in keyword arguments.
244
+ # request = Google::Cloud::DocumentAI::V1beta3::ProcessRequest.new
245
+ #
246
+ # # Call the process_document method.
247
+ # result = client.process_document request
248
+ #
249
+ # # The returned object is of type Google::Cloud::DocumentAI::V1beta3::ProcessResponse.
250
+ # p result
251
+ #
252
+ def process_document request, options = nil
253
+ raise ::ArgumentError, "request must be provided" if request.nil?
254
+
255
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ProcessRequest
256
+
257
+ # Converts hash and nil to an options object
258
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
259
+
260
+ # Customize the options with defaults
261
+ metadata = @config.rpcs.process_document.metadata.to_h
262
+
263
+ # Set x-goog-api-client and x-goog-user-project headers
264
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
265
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
266
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
267
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
268
+
269
+ header_params = {}
270
+ if request.name
271
+ header_params["name"] = request.name
272
+ end
273
+
274
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
275
+ metadata[:"x-goog-request-params"] ||= request_params_header
276
+
277
+ options.apply_defaults timeout: @config.rpcs.process_document.timeout,
278
+ metadata: metadata,
279
+ retry_policy: @config.rpcs.process_document.retry_policy
280
+
281
+ options.apply_defaults timeout: @config.timeout,
282
+ metadata: @config.metadata,
283
+ retry_policy: @config.retry_policy
284
+
285
+ @document_processor_service_stub.call_rpc :process_document, request, options: options do |response, operation|
286
+ yield response, operation if block_given?
287
+ return response
288
+ end
289
+ rescue ::GRPC::BadStatus => e
290
+ raise ::Google::Cloud::Error.from_error(e)
291
+ end
292
+
293
+ ##
294
+ # LRO endpoint to batch process many documents. The output is written
295
+ # to Cloud Storage as JSON in the [Document] format.
296
+ #
297
+ # @overload batch_process_documents(request, options = nil)
298
+ # Pass arguments to `batch_process_documents` via a request object, either of type
299
+ # {::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest} or an equivalent Hash.
300
+ #
301
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest, ::Hash]
302
+ # A request object representing the call parameters. Required. To specify no
303
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
304
+ # @param options [::Gapic::CallOptions, ::Hash]
305
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
306
+ #
307
+ # @overload batch_process_documents(name: nil, input_configs: nil, output_config: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil)
308
+ # Pass arguments to `batch_process_documents` via keyword arguments. Note that at
309
+ # least one keyword argument is required. To specify no parameters, or to keep all
310
+ # the default parameter values, pass an empty Hash as a request object (see above).
311
+ #
312
+ # @param name [::String]
313
+ # Required. The resource name of {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
314
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
315
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`,
316
+ # or
317
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
318
+ # @param input_configs [::Array<::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchInputConfig, ::Hash>]
319
+ # The input config for each single document in the batch process.
320
+ # @param output_config [::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchOutputConfig, ::Hash]
321
+ # The overall output config for batch process.
322
+ # @param input_documents [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig, ::Hash]
323
+ # The input documents for batch process.
324
+ # @param document_output_config [::Google::Cloud::DocumentAI::V1beta3::DocumentOutputConfig, ::Hash]
325
+ # The overall output config for batch process.
326
+ # @param skip_human_review [::Boolean]
327
+ # Whether Human Review feature should be skipped for this request. Default to
328
+ # false.
329
+ #
330
+ # @yield [response, operation] Access the result along with the RPC operation
331
+ # @yieldparam response [::Gapic::Operation]
332
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
333
+ #
334
+ # @return [::Gapic::Operation]
335
+ #
336
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
337
+ #
338
+ # @example Basic example
339
+ # require "google/cloud/document_ai/v1beta3"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest.new
346
+ #
347
+ # # Call the batch_process_documents method.
348
+ # result = client.batch_process_documents request
349
+ #
350
+ # # The returned object is of type Gapic::Operation. You can use this
351
+ # # object to check the status of an operation, cancel it, or wait
352
+ # # for results. Here is how to block until completion:
353
+ # result.wait_until_done! timeout: 60
354
+ # if result.response?
355
+ # p result.response
356
+ # else
357
+ # puts "Error!"
358
+ # end
359
+ #
360
+ def batch_process_documents request, options = nil
361
+ raise ::ArgumentError, "request must be provided" if request.nil?
362
+
363
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest
364
+
365
+ # Converts hash and nil to an options object
366
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
367
+
368
+ # Customize the options with defaults
369
+ metadata = @config.rpcs.batch_process_documents.metadata.to_h
370
+
371
+ # Set x-goog-api-client and x-goog-user-project headers
372
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
374
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
375
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
+
377
+ header_params = {}
378
+ if request.name
379
+ header_params["name"] = request.name
380
+ end
381
+
382
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
383
+ metadata[:"x-goog-request-params"] ||= request_params_header
384
+
385
+ options.apply_defaults timeout: @config.rpcs.batch_process_documents.timeout,
386
+ metadata: metadata,
387
+ retry_policy: @config.rpcs.batch_process_documents.retry_policy
388
+
389
+ options.apply_defaults timeout: @config.timeout,
390
+ metadata: @config.metadata,
391
+ retry_policy: @config.retry_policy
392
+
393
+ @document_processor_service_stub.call_rpc :batch_process_documents, request, options: options do |response, operation|
394
+ response = ::Gapic::Operation.new response, @operations_client, options: options
395
+ yield response, operation if block_given?
396
+ return response
397
+ end
398
+ rescue ::GRPC::BadStatus => e
399
+ raise ::Google::Cloud::Error.from_error(e)
400
+ end
401
+
402
+ ##
403
+ # Fetches processor types. Note that we do not use ListProcessorTypes here
404
+ # because it is not paginated.
405
+ #
406
+ # @overload fetch_processor_types(request, options = nil)
407
+ # Pass arguments to `fetch_processor_types` via a request object, either of type
408
+ # {::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest} or an equivalent Hash.
409
+ #
410
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest, ::Hash]
411
+ # A request object representing the call parameters. Required. To specify no
412
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
413
+ # @param options [::Gapic::CallOptions, ::Hash]
414
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
415
+ #
416
+ # @overload fetch_processor_types(parent: nil)
417
+ # Pass arguments to `fetch_processor_types` via keyword arguments. Note that at
418
+ # least one keyword argument is required. To specify no parameters, or to keep all
419
+ # the default parameter values, pass an empty Hash as a request object (see above).
420
+ #
421
+ # @param parent [::String]
422
+ # Required. The project of processor type to list.
423
+ # The available processor types may depend on the allow-listing on projects.
424
+ # Format: `projects/{project}/locations/{location}`
425
+ #
426
+ # @yield [response, operation] Access the result along with the RPC operation
427
+ # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse]
428
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
429
+ #
430
+ # @return [::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse]
431
+ #
432
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
433
+ #
434
+ # @example Basic example
435
+ # require "google/cloud/document_ai/v1beta3"
436
+ #
437
+ # # Create a client object. The client can be reused for multiple calls.
438
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
439
+ #
440
+ # # Create a request. To set request fields, pass in keyword arguments.
441
+ # request = Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest.new
442
+ #
443
+ # # Call the fetch_processor_types method.
444
+ # result = client.fetch_processor_types request
445
+ #
446
+ # # The returned object is of type Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse.
447
+ # p result
448
+ #
449
+ def fetch_processor_types request, options = nil
450
+ raise ::ArgumentError, "request must be provided" if request.nil?
451
+
452
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest
453
+
454
+ # Converts hash and nil to an options object
455
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
456
+
457
+ # Customize the options with defaults
458
+ metadata = @config.rpcs.fetch_processor_types.metadata.to_h
459
+
460
+ # Set x-goog-api-client and x-goog-user-project headers
461
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
462
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
463
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
464
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
465
+
466
+ header_params = {}
467
+ if request.parent
468
+ header_params["parent"] = request.parent
469
+ end
470
+
471
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
472
+ metadata[:"x-goog-request-params"] ||= request_params_header
473
+
474
+ options.apply_defaults timeout: @config.rpcs.fetch_processor_types.timeout,
475
+ metadata: metadata,
476
+ retry_policy: @config.rpcs.fetch_processor_types.retry_policy
477
+
478
+ options.apply_defaults timeout: @config.timeout,
479
+ metadata: @config.metadata,
480
+ retry_policy: @config.retry_policy
481
+
482
+ @document_processor_service_stub.call_rpc :fetch_processor_types, request, options: options do |response, operation|
483
+ yield response, operation if block_given?
484
+ return response
485
+ end
486
+ rescue ::GRPC::BadStatus => e
487
+ raise ::Google::Cloud::Error.from_error(e)
488
+ end
489
+
490
+ ##
491
+ # Lists the processor types that exist.
492
+ #
493
+ # @overload list_processor_types(request, options = nil)
494
+ # Pass arguments to `list_processor_types` via a request object, either of type
495
+ # {::Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesRequest} or an equivalent Hash.
496
+ #
497
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesRequest, ::Hash]
498
+ # A request object representing the call parameters. Required. To specify no
499
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
500
+ # @param options [::Gapic::CallOptions, ::Hash]
501
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
502
+ #
503
+ # @overload list_processor_types(parent: nil, page_size: nil, page_token: nil)
504
+ # Pass arguments to `list_processor_types` via keyword arguments. Note that at
505
+ # least one keyword argument is required. To specify no parameters, or to keep all
506
+ # the default parameter values, pass an empty Hash as a request object (see above).
507
+ #
508
+ # @param parent [::String]
509
+ # Required. The location of processor type to list.
510
+ # The available processor types may depend on the allow-listing on projects.
511
+ # Format: `projects/{project}/locations/{location}`
512
+ # @param page_size [::Integer]
513
+ # The maximum number of processor types to return.
514
+ # If unspecified, at most 100 processor types will be returned.
515
+ # The maximum value is 500; values above 500 will be coerced to 500.
516
+ # @param page_token [::String]
517
+ # Used to retrieve the next page of results, empty if at the end of the list.
518
+ #
519
+ # @yield [response, operation] Access the result along with the RPC operation
520
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
521
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
522
+ #
523
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
524
+ #
525
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
526
+ #
527
+ # @example Basic example
528
+ # require "google/cloud/document_ai/v1beta3"
529
+ #
530
+ # # Create a client object. The client can be reused for multiple calls.
531
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
532
+ #
533
+ # # Create a request. To set request fields, pass in keyword arguments.
534
+ # request = Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesRequest.new
535
+ #
536
+ # # Call the list_processor_types method.
537
+ # result = client.list_processor_types request
538
+ #
539
+ # # The returned object is of type Gapic::PagedEnumerable. You can
540
+ # # iterate over all elements by calling #each, and the enumerable
541
+ # # will lazily make API calls to fetch subsequent pages. Other
542
+ # # methods are also available for managing paging directly.
543
+ # result.each do |response|
544
+ # # Each element is of type ::Google::Cloud::DocumentAI::V1beta3::ProcessorType.
545
+ # p response
546
+ # end
547
+ #
548
+ def list_processor_types request, options = nil
549
+ raise ::ArgumentError, "request must be provided" if request.nil?
550
+
551
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ListProcessorTypesRequest
552
+
553
+ # Converts hash and nil to an options object
554
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
555
+
556
+ # Customize the options with defaults
557
+ metadata = @config.rpcs.list_processor_types.metadata.to_h
558
+
559
+ # Set x-goog-api-client and x-goog-user-project headers
560
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
561
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
562
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
563
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
564
+
565
+ header_params = {}
566
+ if request.parent
567
+ header_params["parent"] = request.parent
568
+ end
569
+
570
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
571
+ metadata[:"x-goog-request-params"] ||= request_params_header
572
+
573
+ options.apply_defaults timeout: @config.rpcs.list_processor_types.timeout,
574
+ metadata: metadata,
575
+ retry_policy: @config.rpcs.list_processor_types.retry_policy
576
+
577
+ options.apply_defaults timeout: @config.timeout,
578
+ metadata: @config.metadata,
579
+ retry_policy: @config.retry_policy
580
+
581
+ @document_processor_service_stub.call_rpc :list_processor_types, request, options: options do |response, operation|
582
+ response = ::Gapic::PagedEnumerable.new @document_processor_service_stub, :list_processor_types, request, response, operation, options
583
+ yield response, operation if block_given?
584
+ return response
585
+ end
586
+ rescue ::GRPC::BadStatus => e
587
+ raise ::Google::Cloud::Error.from_error(e)
588
+ end
589
+
590
+ ##
591
+ # Lists all processors which belong to this project.
592
+ #
593
+ # @overload list_processors(request, options = nil)
594
+ # Pass arguments to `list_processors` via a request object, either of type
595
+ # {::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest} or an equivalent Hash.
596
+ #
597
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest, ::Hash]
598
+ # A request object representing the call parameters. Required. To specify no
599
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
600
+ # @param options [::Gapic::CallOptions, ::Hash]
601
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
602
+ #
603
+ # @overload list_processors(parent: nil, page_size: nil, page_token: nil)
604
+ # Pass arguments to `list_processors` via keyword arguments. Note that at
605
+ # least one keyword argument is required. To specify no parameters, or to keep all
606
+ # the default parameter values, pass an empty Hash as a request object (see above).
607
+ #
608
+ # @param parent [::String]
609
+ # Required. The parent (project and location) which owns this collection of Processors.
610
+ # Format: `projects/{project}/locations/{location}`
611
+ # @param page_size [::Integer]
612
+ # The maximum number of processors to return.
613
+ # If unspecified, at most 50 processors will be returned.
614
+ # The maximum value is 100; values above 100 will be coerced to 100.
615
+ # @param page_token [::String]
616
+ # We will return the processors sorted by creation time. The page token
617
+ # will point to the next processor.
618
+ #
619
+ # @yield [response, operation] Access the result along with the RPC operation
620
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>]
621
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
622
+ #
623
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>]
624
+ #
625
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
626
+ #
627
+ # @example Basic example
628
+ # require "google/cloud/document_ai/v1beta3"
629
+ #
630
+ # # Create a client object. The client can be reused for multiple calls.
631
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
632
+ #
633
+ # # Create a request. To set request fields, pass in keyword arguments.
634
+ # request = Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest.new
635
+ #
636
+ # # Call the list_processors method.
637
+ # result = client.list_processors request
638
+ #
639
+ # # The returned object is of type Gapic::PagedEnumerable. You can
640
+ # # iterate over all elements by calling #each, and the enumerable
641
+ # # will lazily make API calls to fetch subsequent pages. Other
642
+ # # methods are also available for managing paging directly.
643
+ # result.each do |response|
644
+ # # Each element is of type ::Google::Cloud::DocumentAI::V1beta3::Processor.
645
+ # p response
646
+ # end
647
+ #
648
+ def list_processors request, options = nil
649
+ raise ::ArgumentError, "request must be provided" if request.nil?
650
+
651
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest
652
+
653
+ # Converts hash and nil to an options object
654
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
655
+
656
+ # Customize the options with defaults
657
+ metadata = @config.rpcs.list_processors.metadata.to_h
658
+
659
+ # Set x-goog-api-client and x-goog-user-project headers
660
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
661
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
662
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
663
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
664
+
665
+ header_params = {}
666
+ if request.parent
667
+ header_params["parent"] = request.parent
668
+ end
669
+
670
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
671
+ metadata[:"x-goog-request-params"] ||= request_params_header
672
+
673
+ options.apply_defaults timeout: @config.rpcs.list_processors.timeout,
674
+ metadata: metadata,
675
+ retry_policy: @config.rpcs.list_processors.retry_policy
676
+
677
+ options.apply_defaults timeout: @config.timeout,
678
+ metadata: @config.metadata,
679
+ retry_policy: @config.retry_policy
680
+
681
+ @document_processor_service_stub.call_rpc :list_processors, request, options: options do |response, operation|
682
+ response = ::Gapic::PagedEnumerable.new @document_processor_service_stub, :list_processors, request, response, operation, options
683
+ yield response, operation if block_given?
684
+ return response
685
+ end
686
+ rescue ::GRPC::BadStatus => e
687
+ raise ::Google::Cloud::Error.from_error(e)
688
+ end
689
+
690
+ ##
691
+ # Gets a processor detail.
692
+ #
693
+ # @overload get_processor(request, options = nil)
694
+ # Pass arguments to `get_processor` via a request object, either of type
695
+ # {::Google::Cloud::DocumentAI::V1beta3::GetProcessorRequest} or an equivalent Hash.
696
+ #
697
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::GetProcessorRequest, ::Hash]
698
+ # A request object representing the call parameters. Required. To specify no
699
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
700
+ # @param options [::Gapic::CallOptions, ::Hash]
701
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
702
+ #
703
+ # @overload get_processor(name: nil)
704
+ # Pass arguments to `get_processor` via keyword arguments. Note that at
705
+ # least one keyword argument is required. To specify no parameters, or to keep all
706
+ # the default parameter values, pass an empty Hash as a request object (see above).
707
+ #
708
+ # @param name [::String]
709
+ # Required. The processor resource name.
710
+ #
711
+ # @yield [response, operation] Access the result along with the RPC operation
712
+ # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::Processor]
713
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
714
+ #
715
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Processor]
716
+ #
717
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
718
+ #
719
+ # @example Basic example
720
+ # require "google/cloud/document_ai/v1beta3"
721
+ #
722
+ # # Create a client object. The client can be reused for multiple calls.
723
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
724
+ #
725
+ # # Create a request. To set request fields, pass in keyword arguments.
726
+ # request = Google::Cloud::DocumentAI::V1beta3::GetProcessorRequest.new
727
+ #
728
+ # # Call the get_processor method.
729
+ # result = client.get_processor request
730
+ #
731
+ # # The returned object is of type Google::Cloud::DocumentAI::V1beta3::Processor.
732
+ # p result
733
+ #
734
+ def get_processor request, options = nil
735
+ raise ::ArgumentError, "request must be provided" if request.nil?
736
+
737
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::GetProcessorRequest
738
+
739
+ # Converts hash and nil to an options object
740
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
741
+
742
+ # Customize the options with defaults
743
+ metadata = @config.rpcs.get_processor.metadata.to_h
744
+
745
+ # Set x-goog-api-client and x-goog-user-project headers
746
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
747
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
748
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
749
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
750
+
751
+ header_params = {}
752
+ if request.name
753
+ header_params["name"] = request.name
754
+ end
755
+
756
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
757
+ metadata[:"x-goog-request-params"] ||= request_params_header
758
+
759
+ options.apply_defaults timeout: @config.rpcs.get_processor.timeout,
760
+ metadata: metadata,
761
+ retry_policy: @config.rpcs.get_processor.retry_policy
762
+
763
+ options.apply_defaults timeout: @config.timeout,
764
+ metadata: @config.metadata,
765
+ retry_policy: @config.retry_policy
766
+
767
+ @document_processor_service_stub.call_rpc :get_processor, request, options: options do |response, operation|
768
+ yield response, operation if block_given?
769
+ return response
770
+ end
771
+ rescue ::GRPC::BadStatus => e
772
+ raise ::Google::Cloud::Error.from_error(e)
773
+ end
774
+
775
+ ##
776
+ # Gets a processor version detail.
777
+ #
778
+ # @overload get_processor_version(request, options = nil)
779
+ # Pass arguments to `get_processor_version` via a request object, either of type
780
+ # {::Google::Cloud::DocumentAI::V1beta3::GetProcessorVersionRequest} or an equivalent Hash.
781
+ #
782
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::GetProcessorVersionRequest, ::Hash]
783
+ # A request object representing the call parameters. Required. To specify no
784
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
785
+ # @param options [::Gapic::CallOptions, ::Hash]
786
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
787
+ #
788
+ # @overload get_processor_version(name: nil)
789
+ # Pass arguments to `get_processor_version` via keyword arguments. Note that at
790
+ # least one keyword argument is required. To specify no parameters, or to keep all
791
+ # the default parameter values, pass an empty Hash as a request object (see above).
792
+ #
793
+ # @param name [::String]
794
+ # Required. The processor resource name.
795
+ #
796
+ # @yield [response, operation] Access the result along with the RPC operation
797
+ # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion]
798
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
799
+ #
800
+ # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion]
801
+ #
802
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
803
+ #
804
+ # @example Basic example
805
+ # require "google/cloud/document_ai/v1beta3"
806
+ #
807
+ # # Create a client object. The client can be reused for multiple calls.
808
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
809
+ #
810
+ # # Create a request. To set request fields, pass in keyword arguments.
811
+ # request = Google::Cloud::DocumentAI::V1beta3::GetProcessorVersionRequest.new
812
+ #
813
+ # # Call the get_processor_version method.
814
+ # result = client.get_processor_version request
815
+ #
816
+ # # The returned object is of type Google::Cloud::DocumentAI::V1beta3::ProcessorVersion.
817
+ # p result
818
+ #
819
+ def get_processor_version request, options = nil
820
+ raise ::ArgumentError, "request must be provided" if request.nil?
821
+
822
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::GetProcessorVersionRequest
823
+
824
+ # Converts hash and nil to an options object
825
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
826
+
827
+ # Customize the options with defaults
828
+ metadata = @config.rpcs.get_processor_version.metadata.to_h
829
+
830
+ # Set x-goog-api-client and x-goog-user-project headers
831
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
832
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
833
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
834
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
835
+
836
+ header_params = {}
837
+ if request.name
838
+ header_params["name"] = request.name
839
+ end
840
+
841
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
842
+ metadata[:"x-goog-request-params"] ||= request_params_header
843
+
844
+ options.apply_defaults timeout: @config.rpcs.get_processor_version.timeout,
845
+ metadata: metadata,
846
+ retry_policy: @config.rpcs.get_processor_version.retry_policy
847
+
848
+ options.apply_defaults timeout: @config.timeout,
849
+ metadata: @config.metadata,
850
+ retry_policy: @config.retry_policy
851
+
852
+ @document_processor_service_stub.call_rpc :get_processor_version, request, options: options do |response, operation|
853
+ yield response, operation if block_given?
854
+ return response
855
+ end
856
+ rescue ::GRPC::BadStatus => e
857
+ raise ::Google::Cloud::Error.from_error(e)
858
+ end
859
+
860
+ ##
861
+ # Lists all versions of a processor.
862
+ #
863
+ # @overload list_processor_versions(request, options = nil)
864
+ # Pass arguments to `list_processor_versions` via a request object, either of type
865
+ # {::Google::Cloud::DocumentAI::V1beta3::ListProcessorVersionsRequest} or an equivalent Hash.
866
+ #
867
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::ListProcessorVersionsRequest, ::Hash]
186
868
  # A request object representing the call parameters. Required. To specify no
187
869
  # parameters, or to keep all the default parameter values, pass an empty Hash.
188
870
  # @param options [::Gapic::CallOptions, ::Hash]
189
871
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
190
872
  #
191
- # @overload process_document(inline_document: nil, raw_document: nil, name: nil, document: nil, skip_human_review: nil)
192
- # Pass arguments to `process_document` via keyword arguments. Note that at
873
+ # @overload list_processor_versions(parent: nil, page_size: nil, page_token: nil)
874
+ # Pass arguments to `list_processor_versions` via keyword arguments. Note that at
193
875
  # least one keyword argument is required. To specify no parameters, or to keep all
194
876
  # the default parameter values, pass an empty Hash as a request object (see above).
195
877
  #
196
- # @param inline_document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
197
- # An inline document proto.
198
- # @param raw_document [::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash]
199
- # A raw document content (bytes).
200
- # @param name [::String]
201
- # Required. The processor resource name.
202
- # @param document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
203
- # The document payload, the [content] and [mime_type] fields must be set.
204
- # @param skip_human_review [::Boolean]
205
- # Whether Human Review feature should be skipped for this request. Default to
206
- # false.
878
+ # @param parent [::String]
879
+ # Required. The parent (project, location and processor) to list all versions.
880
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`
881
+ # @param page_size [::Integer]
882
+ # The maximum number of processor versions to return.
883
+ # If unspecified, at most 10 processor versions will be returned.
884
+ # The maximum value is 20; values above 20 will be coerced to 20.
885
+ # @param page_token [::String]
886
+ # We will return the processor versions sorted by creation time. The page
887
+ # token will point to the next processor version.
207
888
  #
208
889
  # @yield [response, operation] Access the result along with the RPC operation
209
- # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
890
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>]
210
891
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
211
892
  #
212
- # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessResponse]
893
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>]
213
894
  #
214
895
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
215
896
  #
@@ -220,24 +901,30 @@ module Google
220
901
  # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
221
902
  #
222
903
  # # Create a request. To set request fields, pass in keyword arguments.
223
- # request = Google::Cloud::DocumentAI::V1beta3::ProcessRequest.new
904
+ # request = Google::Cloud::DocumentAI::V1beta3::ListProcessorVersionsRequest.new
224
905
  #
225
- # # Call the process_document method.
226
- # result = client.process_document request
906
+ # # Call the list_processor_versions method.
907
+ # result = client.list_processor_versions request
227
908
  #
228
- # # The returned object is of type Google::Cloud::DocumentAI::V1beta3::ProcessResponse.
229
- # p result
909
+ # # The returned object is of type Gapic::PagedEnumerable. You can
910
+ # # iterate over all elements by calling #each, and the enumerable
911
+ # # will lazily make API calls to fetch subsequent pages. Other
912
+ # # methods are also available for managing paging directly.
913
+ # result.each do |response|
914
+ # # Each element is of type ::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion.
915
+ # p response
916
+ # end
230
917
  #
231
- def process_document request, options = nil
918
+ def list_processor_versions request, options = nil
232
919
  raise ::ArgumentError, "request must be provided" if request.nil?
233
920
 
234
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ProcessRequest
921
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ListProcessorVersionsRequest
235
922
 
236
923
  # Converts hash and nil to an options object
237
924
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
238
925
 
239
926
  # Customize the options with defaults
240
- metadata = @config.rpcs.process_document.metadata.to_h
927
+ metadata = @config.rpcs.list_processor_versions.metadata.to_h
241
928
 
242
929
  # Set x-goog-api-client and x-goog-user-project headers
243
930
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -246,22 +933,23 @@ module Google
246
933
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
247
934
 
248
935
  header_params = {}
249
- if request.name
250
- header_params["name"] = request.name
936
+ if request.parent
937
+ header_params["parent"] = request.parent
251
938
  end
252
939
 
253
940
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
254
941
  metadata[:"x-goog-request-params"] ||= request_params_header
255
942
 
256
- options.apply_defaults timeout: @config.rpcs.process_document.timeout,
943
+ options.apply_defaults timeout: @config.rpcs.list_processor_versions.timeout,
257
944
  metadata: metadata,
258
- retry_policy: @config.rpcs.process_document.retry_policy
945
+ retry_policy: @config.rpcs.list_processor_versions.retry_policy
259
946
 
260
947
  options.apply_defaults timeout: @config.timeout,
261
948
  metadata: @config.metadata,
262
949
  retry_policy: @config.retry_policy
263
950
 
264
- @document_processor_service_stub.call_rpc :process_document, request, options: options do |response, operation|
951
+ @document_processor_service_stub.call_rpc :list_processor_versions, request, options: options do |response, operation|
952
+ response = ::Gapic::PagedEnumerable.new @document_processor_service_stub, :list_processor_versions, request, response, operation, options
265
953
  yield response, operation if block_given?
266
954
  return response
267
955
  end
@@ -270,37 +958,26 @@ module Google
270
958
  end
271
959
 
272
960
  ##
273
- # LRO endpoint to batch process many documents. The output is written
274
- # to Cloud Storage as JSON in the [Document] format.
961
+ # Deletes the processor version, all artifacts under the processor version
962
+ # will be deleted.
275
963
  #
276
- # @overload batch_process_documents(request, options = nil)
277
- # Pass arguments to `batch_process_documents` via a request object, either of type
278
- # {::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest} or an equivalent Hash.
964
+ # @overload delete_processor_version(request, options = nil)
965
+ # Pass arguments to `delete_processor_version` via a request object, either of type
966
+ # {::Google::Cloud::DocumentAI::V1beta3::DeleteProcessorVersionRequest} or an equivalent Hash.
279
967
  #
280
- # @param request [::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest, ::Hash]
968
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::DeleteProcessorVersionRequest, ::Hash]
281
969
  # A request object representing the call parameters. Required. To specify no
282
970
  # parameters, or to keep all the default parameter values, pass an empty Hash.
283
971
  # @param options [::Gapic::CallOptions, ::Hash]
284
972
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
285
973
  #
286
- # @overload batch_process_documents(name: nil, input_configs: nil, output_config: nil, input_documents: nil, document_output_config: nil, skip_human_review: nil)
287
- # Pass arguments to `batch_process_documents` via keyword arguments. Note that at
974
+ # @overload delete_processor_version(name: nil)
975
+ # Pass arguments to `delete_processor_version` via keyword arguments. Note that at
288
976
  # least one keyword argument is required. To specify no parameters, or to keep all
289
977
  # the default parameter values, pass an empty Hash as a request object (see above).
290
978
  #
291
979
  # @param name [::String]
292
- # Required. The processor resource name.
293
- # @param input_configs [::Array<::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchInputConfig, ::Hash>]
294
- # The input config for each single document in the batch process.
295
- # @param output_config [::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchOutputConfig, ::Hash]
296
- # The overall output config for batch process.
297
- # @param input_documents [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig, ::Hash]
298
- # The input documents for batch process.
299
- # @param document_output_config [::Google::Cloud::DocumentAI::V1beta3::DocumentOutputConfig, ::Hash]
300
- # The overall output config for batch process.
301
- # @param skip_human_review [::Boolean]
302
- # Whether Human Review feature should be skipped for this request. Default to
303
- # false.
980
+ # Required. The processor version resource name to be deleted.
304
981
  #
305
982
  # @yield [response, operation] Access the result along with the RPC operation
306
983
  # @yieldparam response [::Gapic::Operation]
@@ -317,10 +994,10 @@ module Google
317
994
  # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
318
995
  #
319
996
  # # Create a request. To set request fields, pass in keyword arguments.
320
- # request = Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest.new
997
+ # request = Google::Cloud::DocumentAI::V1beta3::DeleteProcessorVersionRequest.new
321
998
  #
322
- # # Call the batch_process_documents method.
323
- # result = client.batch_process_documents request
999
+ # # Call the delete_processor_version method.
1000
+ # result = client.delete_processor_version request
324
1001
  #
325
1002
  # # The returned object is of type Gapic::Operation. You can use this
326
1003
  # # object to check the status of an operation, cancel it, or wait
@@ -332,16 +1009,16 @@ module Google
332
1009
  # puts "Error!"
333
1010
  # end
334
1011
  #
335
- def batch_process_documents request, options = nil
1012
+ def delete_processor_version request, options = nil
336
1013
  raise ::ArgumentError, "request must be provided" if request.nil?
337
1014
 
338
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest
1015
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::DeleteProcessorVersionRequest
339
1016
 
340
1017
  # Converts hash and nil to an options object
341
1018
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
342
1019
 
343
1020
  # Customize the options with defaults
344
- metadata = @config.rpcs.batch_process_documents.metadata.to_h
1021
+ metadata = @config.rpcs.delete_processor_version.metadata.to_h
345
1022
 
346
1023
  # Set x-goog-api-client and x-goog-user-project headers
347
1024
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -357,15 +1034,15 @@ module Google
357
1034
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
358
1035
  metadata[:"x-goog-request-params"] ||= request_params_header
359
1036
 
360
- options.apply_defaults timeout: @config.rpcs.batch_process_documents.timeout,
1037
+ options.apply_defaults timeout: @config.rpcs.delete_processor_version.timeout,
361
1038
  metadata: metadata,
362
- retry_policy: @config.rpcs.batch_process_documents.retry_policy
1039
+ retry_policy: @config.rpcs.delete_processor_version.retry_policy
363
1040
 
364
1041
  options.apply_defaults timeout: @config.timeout,
365
1042
  metadata: @config.metadata,
366
1043
  retry_policy: @config.retry_policy
367
1044
 
368
- @document_processor_service_stub.call_rpc :batch_process_documents, request, options: options do |response, operation|
1045
+ @document_processor_service_stub.call_rpc :delete_processor_version, request, options: options do |response, operation|
369
1046
  response = ::Gapic::Operation.new response, @operations_client, options: options
370
1047
  yield response, operation if block_given?
371
1048
  return response
@@ -375,32 +1052,31 @@ module Google
375
1052
  end
376
1053
 
377
1054
  ##
378
- # Fetches processor types.
1055
+ # Deploys the processor version.
379
1056
  #
380
- # @overload fetch_processor_types(request, options = nil)
381
- # Pass arguments to `fetch_processor_types` via a request object, either of type
382
- # {::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest} or an equivalent Hash.
1057
+ # @overload deploy_processor_version(request, options = nil)
1058
+ # Pass arguments to `deploy_processor_version` via a request object, either of type
1059
+ # {::Google::Cloud::DocumentAI::V1beta3::DeployProcessorVersionRequest} or an equivalent Hash.
383
1060
  #
384
- # @param request [::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest, ::Hash]
1061
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::DeployProcessorVersionRequest, ::Hash]
385
1062
  # A request object representing the call parameters. Required. To specify no
386
1063
  # parameters, or to keep all the default parameter values, pass an empty Hash.
387
1064
  # @param options [::Gapic::CallOptions, ::Hash]
388
1065
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
389
1066
  #
390
- # @overload fetch_processor_types(parent: nil)
391
- # Pass arguments to `fetch_processor_types` via keyword arguments. Note that at
1067
+ # @overload deploy_processor_version(name: nil)
1068
+ # Pass arguments to `deploy_processor_version` via keyword arguments. Note that at
392
1069
  # least one keyword argument is required. To specify no parameters, or to keep all
393
1070
  # the default parameter values, pass an empty Hash as a request object (see above).
394
1071
  #
395
- # @param parent [::String]
396
- # Required. The project of processor type to list.
397
- # Format: projects/\\{project}/locations/\\{location}
1072
+ # @param name [::String]
1073
+ # Required. The processor version resource name to be deployed.
398
1074
  #
399
1075
  # @yield [response, operation] Access the result along with the RPC operation
400
- # @yieldparam response [::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse]
1076
+ # @yieldparam response [::Gapic::Operation]
401
1077
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
402
1078
  #
403
- # @return [::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse]
1079
+ # @return [::Gapic::Operation]
404
1080
  #
405
1081
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
406
1082
  #
@@ -411,24 +1087,31 @@ module Google
411
1087
  # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
412
1088
  #
413
1089
  # # Create a request. To set request fields, pass in keyword arguments.
414
- # request = Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest.new
1090
+ # request = Google::Cloud::DocumentAI::V1beta3::DeployProcessorVersionRequest.new
415
1091
  #
416
- # # Call the fetch_processor_types method.
417
- # result = client.fetch_processor_types request
1092
+ # # Call the deploy_processor_version method.
1093
+ # result = client.deploy_processor_version request
418
1094
  #
419
- # # The returned object is of type Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesResponse.
420
- # p result
1095
+ # # The returned object is of type Gapic::Operation. You can use this
1096
+ # # object to check the status of an operation, cancel it, or wait
1097
+ # # for results. Here is how to block until completion:
1098
+ # result.wait_until_done! timeout: 60
1099
+ # if result.response?
1100
+ # p result.response
1101
+ # else
1102
+ # puts "Error!"
1103
+ # end
421
1104
  #
422
- def fetch_processor_types request, options = nil
1105
+ def deploy_processor_version request, options = nil
423
1106
  raise ::ArgumentError, "request must be provided" if request.nil?
424
1107
 
425
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::FetchProcessorTypesRequest
1108
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::DeployProcessorVersionRequest
426
1109
 
427
1110
  # Converts hash and nil to an options object
428
1111
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
429
1112
 
430
1113
  # Customize the options with defaults
431
- metadata = @config.rpcs.fetch_processor_types.metadata.to_h
1114
+ metadata = @config.rpcs.deploy_processor_version.metadata.to_h
432
1115
 
433
1116
  # Set x-goog-api-client and x-goog-user-project headers
434
1117
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -437,22 +1120,23 @@ module Google
437
1120
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
438
1121
 
439
1122
  header_params = {}
440
- if request.parent
441
- header_params["parent"] = request.parent
1123
+ if request.name
1124
+ header_params["name"] = request.name
442
1125
  end
443
1126
 
444
1127
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
445
1128
  metadata[:"x-goog-request-params"] ||= request_params_header
446
1129
 
447
- options.apply_defaults timeout: @config.rpcs.fetch_processor_types.timeout,
1130
+ options.apply_defaults timeout: @config.rpcs.deploy_processor_version.timeout,
448
1131
  metadata: metadata,
449
- retry_policy: @config.rpcs.fetch_processor_types.retry_policy
1132
+ retry_policy: @config.rpcs.deploy_processor_version.retry_policy
450
1133
 
451
1134
  options.apply_defaults timeout: @config.timeout,
452
1135
  metadata: @config.metadata,
453
1136
  retry_policy: @config.retry_policy
454
1137
 
455
- @document_processor_service_stub.call_rpc :fetch_processor_types, request, options: options do |response, operation|
1138
+ @document_processor_service_stub.call_rpc :deploy_processor_version, request, options: options do |response, operation|
1139
+ response = ::Gapic::Operation.new response, @operations_client, options: options
456
1140
  yield response, operation if block_given?
457
1141
  return response
458
1142
  end
@@ -461,39 +1145,31 @@ module Google
461
1145
  end
462
1146
 
463
1147
  ##
464
- # Lists all processors which belong to this project.
1148
+ # Undeploys the processor version.
465
1149
  #
466
- # @overload list_processors(request, options = nil)
467
- # Pass arguments to `list_processors` via a request object, either of type
468
- # {::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest} or an equivalent Hash.
1150
+ # @overload undeploy_processor_version(request, options = nil)
1151
+ # Pass arguments to `undeploy_processor_version` via a request object, either of type
1152
+ # {::Google::Cloud::DocumentAI::V1beta3::UndeployProcessorVersionRequest} or an equivalent Hash.
469
1153
  #
470
- # @param request [::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest, ::Hash]
1154
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::UndeployProcessorVersionRequest, ::Hash]
471
1155
  # A request object representing the call parameters. Required. To specify no
472
1156
  # parameters, or to keep all the default parameter values, pass an empty Hash.
473
1157
  # @param options [::Gapic::CallOptions, ::Hash]
474
1158
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
475
1159
  #
476
- # @overload list_processors(parent: nil, page_size: nil, page_token: nil)
477
- # Pass arguments to `list_processors` via keyword arguments. Note that at
1160
+ # @overload undeploy_processor_version(name: nil)
1161
+ # Pass arguments to `undeploy_processor_version` via keyword arguments. Note that at
478
1162
  # least one keyword argument is required. To specify no parameters, or to keep all
479
1163
  # the default parameter values, pass an empty Hash as a request object (see above).
480
1164
  #
481
- # @param parent [::String]
482
- # Required. The parent (project and location) which owns this collection of Processors.
483
- # Format: projects/\\{project}/locations/\\{location}
484
- # @param page_size [::Integer]
485
- # The maximum number of processors to return.
486
- # If unspecified, at most 50 processors will be returned.
487
- # The maximum value is 100; values above 100 will be coerced to 100.
488
- # @param page_token [::String]
489
- # We will return the processors sorted by creation time. The page token
490
- # will point to the next processor.
1165
+ # @param name [::String]
1166
+ # Required. The processor version resource name to be undeployed.
491
1167
  #
492
1168
  # @yield [response, operation] Access the result along with the RPC operation
493
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>]
1169
+ # @yieldparam response [::Gapic::Operation]
494
1170
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
495
1171
  #
496
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::DocumentAI::V1beta3::Processor>]
1172
+ # @return [::Gapic::Operation]
497
1173
  #
498
1174
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
499
1175
  #
@@ -504,30 +1180,31 @@ module Google
504
1180
  # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
505
1181
  #
506
1182
  # # Create a request. To set request fields, pass in keyword arguments.
507
- # request = Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest.new
1183
+ # request = Google::Cloud::DocumentAI::V1beta3::UndeployProcessorVersionRequest.new
508
1184
  #
509
- # # Call the list_processors method.
510
- # result = client.list_processors request
1185
+ # # Call the undeploy_processor_version method.
1186
+ # result = client.undeploy_processor_version request
511
1187
  #
512
- # # The returned object is of type Gapic::PagedEnumerable. You can
513
- # # iterate over all elements by calling #each, and the enumerable
514
- # # will lazily make API calls to fetch subsequent pages. Other
515
- # # methods are also available for managing paging directly.
516
- # result.each do |response|
517
- # # Each element is of type ::Google::Cloud::DocumentAI::V1beta3::Processor.
518
- # p response
1188
+ # # The returned object is of type Gapic::Operation. You can use this
1189
+ # # object to check the status of an operation, cancel it, or wait
1190
+ # # for results. Here is how to block until completion:
1191
+ # result.wait_until_done! timeout: 60
1192
+ # if result.response?
1193
+ # p result.response
1194
+ # else
1195
+ # puts "Error!"
519
1196
  # end
520
1197
  #
521
- def list_processors request, options = nil
1198
+ def undeploy_processor_version request, options = nil
522
1199
  raise ::ArgumentError, "request must be provided" if request.nil?
523
1200
 
524
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::ListProcessorsRequest
1201
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::UndeployProcessorVersionRequest
525
1202
 
526
1203
  # Converts hash and nil to an options object
527
1204
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
528
1205
 
529
1206
  # Customize the options with defaults
530
- metadata = @config.rpcs.list_processors.metadata.to_h
1207
+ metadata = @config.rpcs.undeploy_processor_version.metadata.to_h
531
1208
 
532
1209
  # Set x-goog-api-client and x-goog-user-project headers
533
1210
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -536,23 +1213,23 @@ module Google
536
1213
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
537
1214
 
538
1215
  header_params = {}
539
- if request.parent
540
- header_params["parent"] = request.parent
1216
+ if request.name
1217
+ header_params["name"] = request.name
541
1218
  end
542
1219
 
543
1220
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
544
1221
  metadata[:"x-goog-request-params"] ||= request_params_header
545
1222
 
546
- options.apply_defaults timeout: @config.rpcs.list_processors.timeout,
1223
+ options.apply_defaults timeout: @config.rpcs.undeploy_processor_version.timeout,
547
1224
  metadata: metadata,
548
- retry_policy: @config.rpcs.list_processors.retry_policy
1225
+ retry_policy: @config.rpcs.undeploy_processor_version.retry_policy
549
1226
 
550
1227
  options.apply_defaults timeout: @config.timeout,
551
1228
  metadata: @config.metadata,
552
1229
  retry_policy: @config.retry_policy
553
1230
 
554
- @document_processor_service_stub.call_rpc :list_processors, request, options: options do |response, operation|
555
- response = ::Gapic::PagedEnumerable.new @document_processor_service_stub, :list_processors, request, response, operation, options
1231
+ @document_processor_service_stub.call_rpc :undeploy_processor_version, request, options: options do |response, operation|
1232
+ response = ::Gapic::Operation.new response, @operations_client, options: options
556
1233
  yield response, operation if block_given?
557
1234
  return response
558
1235
  end
@@ -581,7 +1258,7 @@ module Google
581
1258
  #
582
1259
  # @param parent [::String]
583
1260
  # Required. The parent (project and location) under which to create the processor.
584
- # Format: projects/\\{project}/locations/\\{location}
1261
+ # Format: `projects/{project}/locations/{location}`
585
1262
  # @param processor [::Google::Cloud::DocumentAI::V1beta3::Processor, ::Hash]
586
1263
  # Required. The processor to be created, requires [processor_type] and [display_name]
587
1264
  # to be set. Also, the processor is under CMEK if CMEK fields are set.
@@ -930,6 +1607,105 @@ module Google
930
1607
  raise ::Google::Cloud::Error.from_error(e)
931
1608
  end
932
1609
 
1610
+ ##
1611
+ # Set the default (active) version of a {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} that will be used in
1612
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#process_document ProcessDocument} and
1613
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
1614
+ #
1615
+ # @overload set_default_processor_version(request, options = nil)
1616
+ # Pass arguments to `set_default_processor_version` via a request object, either of type
1617
+ # {::Google::Cloud::DocumentAI::V1beta3::SetDefaultProcessorVersionRequest} or an equivalent Hash.
1618
+ #
1619
+ # @param request [::Google::Cloud::DocumentAI::V1beta3::SetDefaultProcessorVersionRequest, ::Hash]
1620
+ # A request object representing the call parameters. Required. To specify no
1621
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1622
+ # @param options [::Gapic::CallOptions, ::Hash]
1623
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1624
+ #
1625
+ # @overload set_default_processor_version(processor: nil, default_processor_version: nil)
1626
+ # Pass arguments to `set_default_processor_version` via keyword arguments. Note that at
1627
+ # least one keyword argument is required. To specify no parameters, or to keep all
1628
+ # the default parameter values, pass an empty Hash as a request object (see above).
1629
+ #
1630
+ # @param processor [::String]
1631
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} to change default version.
1632
+ # @param default_processor_version [::String]
1633
+ # Required. The resource name of child {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to use as default.
1634
+ # Format:
1635
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
1636
+ #
1637
+ # @yield [response, operation] Access the result along with the RPC operation
1638
+ # @yieldparam response [::Gapic::Operation]
1639
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1640
+ #
1641
+ # @return [::Gapic::Operation]
1642
+ #
1643
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1644
+ #
1645
+ # @example Basic example
1646
+ # require "google/cloud/document_ai/v1beta3"
1647
+ #
1648
+ # # Create a client object. The client can be reused for multiple calls.
1649
+ # client = Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client.new
1650
+ #
1651
+ # # Create a request. To set request fields, pass in keyword arguments.
1652
+ # request = Google::Cloud::DocumentAI::V1beta3::SetDefaultProcessorVersionRequest.new
1653
+ #
1654
+ # # Call the set_default_processor_version method.
1655
+ # result = client.set_default_processor_version request
1656
+ #
1657
+ # # The returned object is of type Gapic::Operation. You can use this
1658
+ # # object to check the status of an operation, cancel it, or wait
1659
+ # # for results. Here is how to block until completion:
1660
+ # result.wait_until_done! timeout: 60
1661
+ # if result.response?
1662
+ # p result.response
1663
+ # else
1664
+ # puts "Error!"
1665
+ # end
1666
+ #
1667
+ def set_default_processor_version request, options = nil
1668
+ raise ::ArgumentError, "request must be provided" if request.nil?
1669
+
1670
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DocumentAI::V1beta3::SetDefaultProcessorVersionRequest
1671
+
1672
+ # Converts hash and nil to an options object
1673
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1674
+
1675
+ # Customize the options with defaults
1676
+ metadata = @config.rpcs.set_default_processor_version.metadata.to_h
1677
+
1678
+ # Set x-goog-api-client and x-goog-user-project headers
1679
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1680
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1681
+ gapic_version: ::Google::Cloud::DocumentAI::V1beta3::VERSION
1682
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1683
+
1684
+ header_params = {}
1685
+ if request.processor
1686
+ header_params["processor"] = request.processor
1687
+ end
1688
+
1689
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1690
+ metadata[:"x-goog-request-params"] ||= request_params_header
1691
+
1692
+ options.apply_defaults timeout: @config.rpcs.set_default_processor_version.timeout,
1693
+ metadata: metadata,
1694
+ retry_policy: @config.rpcs.set_default_processor_version.retry_policy
1695
+
1696
+ options.apply_defaults timeout: @config.timeout,
1697
+ metadata: @config.metadata,
1698
+ retry_policy: @config.retry_policy
1699
+
1700
+ @document_processor_service_stub.call_rpc :set_default_processor_version, request, options: options do |response, operation|
1701
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1702
+ yield response, operation if block_given?
1703
+ return response
1704
+ end
1705
+ rescue ::GRPC::BadStatus => e
1706
+ raise ::Google::Cloud::Error.from_error(e)
1707
+ end
1708
+
933
1709
  ##
934
1710
  # Send a document for Human Review. The input document should be processed by
935
1711
  # the specified processor.
@@ -944,7 +1720,7 @@ module Google
944
1720
  # @param options [::Gapic::CallOptions, ::Hash]
945
1721
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
946
1722
  #
947
- # @overload review_document(inline_document: nil, human_review_config: nil, document: nil, enable_schema_validation: nil, priority: nil)
1723
+ # @overload review_document(inline_document: nil, human_review_config: nil, document: nil, enable_schema_validation: nil, priority: nil, document_schema: nil)
948
1724
  # Pass arguments to `review_document` via keyword arguments. Note that at
949
1725
  # least one keyword argument is required. To specify no parameters, or to keep all
950
1726
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -960,6 +1736,8 @@ module Google
960
1736
  # Whether the validation should be performed on the ad-hoc review request.
961
1737
  # @param priority [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest::Priority]
962
1738
  # The priority of the human review task.
1739
+ # @param document_schema [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema, ::Hash]
1740
+ # The document schema of the human review task.
963
1741
  #
964
1742
  # @yield [response, operation] Access the result along with the RPC operation
965
1743
  # @yieldparam response [::Gapic::Operation]
@@ -1184,11 +1962,46 @@ module Google
1184
1962
  #
1185
1963
  attr_reader :fetch_processor_types
1186
1964
  ##
1965
+ # RPC-specific configuration for `list_processor_types`
1966
+ # @return [::Gapic::Config::Method]
1967
+ #
1968
+ attr_reader :list_processor_types
1969
+ ##
1187
1970
  # RPC-specific configuration for `list_processors`
1188
1971
  # @return [::Gapic::Config::Method]
1189
1972
  #
1190
1973
  attr_reader :list_processors
1191
1974
  ##
1975
+ # RPC-specific configuration for `get_processor`
1976
+ # @return [::Gapic::Config::Method]
1977
+ #
1978
+ attr_reader :get_processor
1979
+ ##
1980
+ # RPC-specific configuration for `get_processor_version`
1981
+ # @return [::Gapic::Config::Method]
1982
+ #
1983
+ attr_reader :get_processor_version
1984
+ ##
1985
+ # RPC-specific configuration for `list_processor_versions`
1986
+ # @return [::Gapic::Config::Method]
1987
+ #
1988
+ attr_reader :list_processor_versions
1989
+ ##
1990
+ # RPC-specific configuration for `delete_processor_version`
1991
+ # @return [::Gapic::Config::Method]
1992
+ #
1993
+ attr_reader :delete_processor_version
1994
+ ##
1995
+ # RPC-specific configuration for `deploy_processor_version`
1996
+ # @return [::Gapic::Config::Method]
1997
+ #
1998
+ attr_reader :deploy_processor_version
1999
+ ##
2000
+ # RPC-specific configuration for `undeploy_processor_version`
2001
+ # @return [::Gapic::Config::Method]
2002
+ #
2003
+ attr_reader :undeploy_processor_version
2004
+ ##
1192
2005
  # RPC-specific configuration for `create_processor`
1193
2006
  # @return [::Gapic::Config::Method]
1194
2007
  #
@@ -1209,6 +2022,11 @@ module Google
1209
2022
  #
1210
2023
  attr_reader :disable_processor
1211
2024
  ##
2025
+ # RPC-specific configuration for `set_default_processor_version`
2026
+ # @return [::Gapic::Config::Method]
2027
+ #
2028
+ attr_reader :set_default_processor_version
2029
+ ##
1212
2030
  # RPC-specific configuration for `review_document`
1213
2031
  # @return [::Gapic::Config::Method]
1214
2032
  #
@@ -1222,8 +2040,22 @@ module Google
1222
2040
  @batch_process_documents = ::Gapic::Config::Method.new batch_process_documents_config
1223
2041
  fetch_processor_types_config = parent_rpcs.fetch_processor_types if parent_rpcs.respond_to? :fetch_processor_types
1224
2042
  @fetch_processor_types = ::Gapic::Config::Method.new fetch_processor_types_config
2043
+ list_processor_types_config = parent_rpcs.list_processor_types if parent_rpcs.respond_to? :list_processor_types
2044
+ @list_processor_types = ::Gapic::Config::Method.new list_processor_types_config
1225
2045
  list_processors_config = parent_rpcs.list_processors if parent_rpcs.respond_to? :list_processors
1226
2046
  @list_processors = ::Gapic::Config::Method.new list_processors_config
2047
+ get_processor_config = parent_rpcs.get_processor if parent_rpcs.respond_to? :get_processor
2048
+ @get_processor = ::Gapic::Config::Method.new get_processor_config
2049
+ get_processor_version_config = parent_rpcs.get_processor_version if parent_rpcs.respond_to? :get_processor_version
2050
+ @get_processor_version = ::Gapic::Config::Method.new get_processor_version_config
2051
+ list_processor_versions_config = parent_rpcs.list_processor_versions if parent_rpcs.respond_to? :list_processor_versions
2052
+ @list_processor_versions = ::Gapic::Config::Method.new list_processor_versions_config
2053
+ delete_processor_version_config = parent_rpcs.delete_processor_version if parent_rpcs.respond_to? :delete_processor_version
2054
+ @delete_processor_version = ::Gapic::Config::Method.new delete_processor_version_config
2055
+ deploy_processor_version_config = parent_rpcs.deploy_processor_version if parent_rpcs.respond_to? :deploy_processor_version
2056
+ @deploy_processor_version = ::Gapic::Config::Method.new deploy_processor_version_config
2057
+ undeploy_processor_version_config = parent_rpcs.undeploy_processor_version if parent_rpcs.respond_to? :undeploy_processor_version
2058
+ @undeploy_processor_version = ::Gapic::Config::Method.new undeploy_processor_version_config
1227
2059
  create_processor_config = parent_rpcs.create_processor if parent_rpcs.respond_to? :create_processor
1228
2060
  @create_processor = ::Gapic::Config::Method.new create_processor_config
1229
2061
  delete_processor_config = parent_rpcs.delete_processor if parent_rpcs.respond_to? :delete_processor
@@ -1232,6 +2064,8 @@ module Google
1232
2064
  @enable_processor = ::Gapic::Config::Method.new enable_processor_config
1233
2065
  disable_processor_config = parent_rpcs.disable_processor if parent_rpcs.respond_to? :disable_processor
1234
2066
  @disable_processor = ::Gapic::Config::Method.new disable_processor_config
2067
+ set_default_processor_version_config = parent_rpcs.set_default_processor_version if parent_rpcs.respond_to? :set_default_processor_version
2068
+ @set_default_processor_version = ::Gapic::Config::Method.new set_default_processor_version_config
1235
2069
  review_document_config = parent_rpcs.review_document if parent_rpcs.respond_to? :review_document
1236
2070
  @review_document = ::Gapic::Config::Method.new review_document_config
1237
2071