google-apis-documentai_v1 0.14.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,38 @@ module Google
84
84
  execute_or_queue_command(command, &block)
85
85
  end
86
86
 
87
+ # Fetches processor types.
88
+ # @param [String] parent
89
+ # Required. The project of processor type to list. The available processor types
90
+ # may depend on the whitelisting on projects. Format: projects/`project`/
91
+ # locations/`location`
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def fetch_project_location_processor_types(parent, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1/{+parent}:fetchProcessorTypes', options)
111
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse::Representation
112
+ command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1FetchProcessorTypesResponse
113
+ command.params['parent'] = parent unless parent.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
87
119
  # Gets information about a location.
88
120
  # @param [String] name
89
121
  # Resource name for the location.
@@ -308,6 +340,208 @@ module Google
308
340
  execute_or_queue_command(command, &block)
309
341
  end
310
342
 
343
+ # Creates a processor from the type processor that the user chose. The processor
344
+ # will be at "ENABLED" state by default after its creation.
345
+ # @param [String] parent
346
+ # Required. The parent (project and location) under which to create the
347
+ # processor. Format: projects/`project`/locations/`location`
348
+ # @param [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor] google_cloud_documentai_v1_processor_object
349
+ # @param [String] fields
350
+ # Selector specifying which fields to include in a partial response.
351
+ # @param [String] quota_user
352
+ # Available to use for quota purposes for server-side applications. Can be any
353
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
354
+ # @param [Google::Apis::RequestOptions] options
355
+ # Request-specific options
356
+ #
357
+ # @yield [result, err] Result & error if block supplied
358
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor] parsed result object
359
+ # @yieldparam err [StandardError] error object if request failed
360
+ #
361
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor]
362
+ #
363
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
364
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
365
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
366
+ def create_project_location_processor(parent, google_cloud_documentai_v1_processor_object = nil, fields: nil, quota_user: nil, options: nil, &block)
367
+ command = make_simple_command(:post, 'v1/{+parent}/processors', options)
368
+ command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor::Representation
369
+ command.request_object = google_cloud_documentai_v1_processor_object
370
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor::Representation
371
+ command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor
372
+ command.params['parent'] = parent unless parent.nil?
373
+ command.query['fields'] = fields unless fields.nil?
374
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
375
+ execute_or_queue_command(command, &block)
376
+ end
377
+
378
+ # Deletes the processor, unloads all deployed model artifacts if it was enabled
379
+ # and then deletes all artifacts associated with this processor.
380
+ # @param [String] name
381
+ # Required. The processor resource name to be deleted.
382
+ # @param [String] fields
383
+ # Selector specifying which fields to include in a partial response.
384
+ # @param [String] quota_user
385
+ # Available to use for quota purposes for server-side applications. Can be any
386
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
387
+ # @param [Google::Apis::RequestOptions] options
388
+ # Request-specific options
389
+ #
390
+ # @yield [result, err] Result & error if block supplied
391
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
392
+ # @yieldparam err [StandardError] error object if request failed
393
+ #
394
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
395
+ #
396
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
397
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
398
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
399
+ def delete_project_location_processor(name, fields: nil, quota_user: nil, options: nil, &block)
400
+ command = make_simple_command(:delete, 'v1/{+name}', options)
401
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
402
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
403
+ command.params['name'] = name unless name.nil?
404
+ command.query['fields'] = fields unless fields.nil?
405
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
406
+ execute_or_queue_command(command, &block)
407
+ end
408
+
409
+ # Disables a processor
410
+ # @param [String] name
411
+ # Required. The processor resource name to be disabled.
412
+ # @param [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DisableProcessorRequest] google_cloud_documentai_v1_disable_processor_request_object
413
+ # @param [String] fields
414
+ # Selector specifying which fields to include in a partial response.
415
+ # @param [String] quota_user
416
+ # Available to use for quota purposes for server-side applications. Can be any
417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
418
+ # @param [Google::Apis::RequestOptions] options
419
+ # Request-specific options
420
+ #
421
+ # @yield [result, err] Result & error if block supplied
422
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
423
+ # @yieldparam err [StandardError] error object if request failed
424
+ #
425
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
426
+ #
427
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
428
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
429
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
430
+ def disable_project_location_processor(name, google_cloud_documentai_v1_disable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
431
+ command = make_simple_command(:post, 'v1/{+name}:disable', options)
432
+ command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DisableProcessorRequest::Representation
433
+ command.request_object = google_cloud_documentai_v1_disable_processor_request_object
434
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
435
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
436
+ command.params['name'] = name unless name.nil?
437
+ command.query['fields'] = fields unless fields.nil?
438
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
439
+ execute_or_queue_command(command, &block)
440
+ end
441
+
442
+ # Enables a processor
443
+ # @param [String] name
444
+ # Required. The processor resource name to be enabled.
445
+ # @param [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1EnableProcessorRequest] google_cloud_documentai_v1_enable_processor_request_object
446
+ # @param [String] fields
447
+ # Selector specifying which fields to include in a partial response.
448
+ # @param [String] quota_user
449
+ # Available to use for quota purposes for server-side applications. Can be any
450
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
451
+ # @param [Google::Apis::RequestOptions] options
452
+ # Request-specific options
453
+ #
454
+ # @yield [result, err] Result & error if block supplied
455
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
456
+ # @yieldparam err [StandardError] error object if request failed
457
+ #
458
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
459
+ #
460
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
461
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
462
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
463
+ def enable_project_location_processor(name, google_cloud_documentai_v1_enable_processor_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
464
+ command = make_simple_command(:post, 'v1/{+name}:enable', options)
465
+ command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1EnableProcessorRequest::Representation
466
+ command.request_object = google_cloud_documentai_v1_enable_processor_request_object
467
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
468
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
469
+ command.params['name'] = name unless name.nil?
470
+ command.query['fields'] = fields unless fields.nil?
471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
472
+ execute_or_queue_command(command, &block)
473
+ end
474
+
475
+ # Gets a processor detail.
476
+ # @param [String] name
477
+ # Required. The processor resource name.
478
+ # @param [String] fields
479
+ # Selector specifying which fields to include in a partial response.
480
+ # @param [String] quota_user
481
+ # Available to use for quota purposes for server-side applications. Can be any
482
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
483
+ # @param [Google::Apis::RequestOptions] options
484
+ # Request-specific options
485
+ #
486
+ # @yield [result, err] Result & error if block supplied
487
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor] parsed result object
488
+ # @yieldparam err [StandardError] error object if request failed
489
+ #
490
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor]
491
+ #
492
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
493
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
494
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
495
+ def get_project_location_processor(name, fields: nil, quota_user: nil, options: nil, &block)
496
+ command = make_simple_command(:get, 'v1/{+name}', options)
497
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor::Representation
498
+ command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor
499
+ command.params['name'] = name unless name.nil?
500
+ command.query['fields'] = fields unless fields.nil?
501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
502
+ execute_or_queue_command(command, &block)
503
+ end
504
+
505
+ # Lists all processors which belong to this project.
506
+ # @param [String] parent
507
+ # Required. The parent (project and location) which owns this collection of
508
+ # Processors. Format: projects/`project`/locations/`location`
509
+ # @param [Fixnum] page_size
510
+ # The maximum number of processors to return. If unspecified, at most 50
511
+ # processors will be returned. The maximum value is 100; values above 100 will
512
+ # be coerced to 100.
513
+ # @param [String] page_token
514
+ # We will return the processors sorted by creation time. The page token will
515
+ # point to the next processor.
516
+ # @param [String] fields
517
+ # Selector specifying which fields to include in a partial response.
518
+ # @param [String] quota_user
519
+ # Available to use for quota purposes for server-side applications. Can be any
520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
521
+ # @param [Google::Apis::RequestOptions] options
522
+ # Request-specific options
523
+ #
524
+ # @yield [result, err] Result & error if block supplied
525
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse] parsed result object
526
+ # @yieldparam err [StandardError] error object if request failed
527
+ #
528
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse]
529
+ #
530
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
531
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
532
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
533
+ def list_project_location_processors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
534
+ command = make_simple_command(:get, 'v1/{+parent}/processors', options)
535
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse::Representation
536
+ command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorsResponse
537
+ command.params['parent'] = parent unless parent.nil?
538
+ command.query['pageSize'] = page_size unless page_size.nil?
539
+ command.query['pageToken'] = page_token unless page_token.nil?
540
+ command.query['fields'] = fields unless fields.nil?
541
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
542
+ execute_or_queue_command(command, &block)
543
+ end
544
+
311
545
  # Processes a single document.
312
546
  # @param [String] name
313
547
  # Required. The resource name of the Processor or ProcessorVersion to use for
@@ -345,6 +579,40 @@ module Google
345
579
  execute_or_queue_command(command, &block)
346
580
  end
347
581
 
582
+ # Set the default (active) version of a Processor that will be used in
583
+ # ProcessDocument and BatchProcessDocuments.
584
+ # @param [String] processor
585
+ # Required. The resource name of the Processor to change default version.
586
+ # @param [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest] google_cloud_documentai_v1_set_default_processor_version_request_object
587
+ # @param [String] fields
588
+ # Selector specifying which fields to include in a partial response.
589
+ # @param [String] quota_user
590
+ # Available to use for quota purposes for server-side applications. Can be any
591
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
592
+ # @param [Google::Apis::RequestOptions] options
593
+ # Request-specific options
594
+ #
595
+ # @yield [result, err] Result & error if block supplied
596
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
597
+ # @yieldparam err [StandardError] error object if request failed
598
+ #
599
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
600
+ #
601
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
602
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
603
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
604
+ def set_project_location_processor_default_processor_version(processor, google_cloud_documentai_v1_set_default_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
605
+ command = make_simple_command(:post, 'v1/{+processor}:setDefaultProcessorVersion', options)
606
+ command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest::Representation
607
+ command.request_object = google_cloud_documentai_v1_set_default_processor_version_request_object
608
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
609
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
610
+ command.params['processor'] = processor unless processor.nil?
611
+ command.query['fields'] = fields unless fields.nil?
612
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
613
+ execute_or_queue_command(command, &block)
614
+ end
615
+
348
616
  # Send a document for Human Review. The input document should be processed by
349
617
  # the specified processor.
350
618
  # @param [String] human_review_config
@@ -417,6 +685,140 @@ module Google
417
685
  execute_or_queue_command(command, &block)
418
686
  end
419
687
 
688
+ # Deletes the processor version, all artifacts under the processor version will
689
+ # be deleted.
690
+ # @param [String] name
691
+ # Required. The processor version resource name to be deleted.
692
+ # @param [String] fields
693
+ # Selector specifying which fields to include in a partial response.
694
+ # @param [String] quota_user
695
+ # Available to use for quota purposes for server-side applications. Can be any
696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
697
+ # @param [Google::Apis::RequestOptions] options
698
+ # Request-specific options
699
+ #
700
+ # @yield [result, err] Result & error if block supplied
701
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
702
+ # @yieldparam err [StandardError] error object if request failed
703
+ #
704
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
705
+ #
706
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
707
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
708
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
709
+ def delete_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil, &block)
710
+ command = make_simple_command(:delete, 'v1/{+name}', options)
711
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
712
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
713
+ command.params['name'] = name unless name.nil?
714
+ command.query['fields'] = fields unless fields.nil?
715
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
716
+ execute_or_queue_command(command, &block)
717
+ end
718
+
719
+ # Deploys the processor version.
720
+ # @param [String] name
721
+ # Required. The processor version resource name to be deployed.
722
+ # @param [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DeployProcessorVersionRequest] google_cloud_documentai_v1_deploy_processor_version_request_object
723
+ # @param [String] fields
724
+ # Selector specifying which fields to include in a partial response.
725
+ # @param [String] quota_user
726
+ # Available to use for quota purposes for server-side applications. Can be any
727
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
728
+ # @param [Google::Apis::RequestOptions] options
729
+ # Request-specific options
730
+ #
731
+ # @yield [result, err] Result & error if block supplied
732
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
733
+ # @yieldparam err [StandardError] error object if request failed
734
+ #
735
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
736
+ #
737
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
738
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
739
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
740
+ def deploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_deploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
741
+ command = make_simple_command(:post, 'v1/{+name}:deploy', options)
742
+ command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DeployProcessorVersionRequest::Representation
743
+ command.request_object = google_cloud_documentai_v1_deploy_processor_version_request_object
744
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
745
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
746
+ command.params['name'] = name unless name.nil?
747
+ command.query['fields'] = fields unless fields.nil?
748
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
749
+ execute_or_queue_command(command, &block)
750
+ end
751
+
752
+ # Gets a processor version detail.
753
+ # @param [String] name
754
+ # Required. The processor resource name.
755
+ # @param [String] fields
756
+ # Selector specifying which fields to include in a partial response.
757
+ # @param [String] quota_user
758
+ # Available to use for quota purposes for server-side applications. Can be any
759
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
760
+ # @param [Google::Apis::RequestOptions] options
761
+ # Request-specific options
762
+ #
763
+ # @yield [result, err] Result & error if block supplied
764
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion] parsed result object
765
+ # @yieldparam err [StandardError] error object if request failed
766
+ #
767
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion]
768
+ #
769
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
770
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
771
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
772
+ def get_project_location_processor_processor_version(name, fields: nil, quota_user: nil, options: nil, &block)
773
+ command = make_simple_command(:get, 'v1/{+name}', options)
774
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion::Representation
775
+ command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion
776
+ command.params['name'] = name unless name.nil?
777
+ command.query['fields'] = fields unless fields.nil?
778
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
779
+ execute_or_queue_command(command, &block)
780
+ end
781
+
782
+ # Lists all versions of a processor.
783
+ # @param [String] parent
784
+ # Required. The parent (project, location and processor) to list all versions.
785
+ # Format: projects/`project`/locations/`location`/processors/`processor`
786
+ # @param [Fixnum] page_size
787
+ # The maximum number of processor versions to return. If unspecified, at most 10
788
+ # processor versions will be returned. The maximum value is 20; values above 20
789
+ # will be coerced to 20.
790
+ # @param [String] page_token
791
+ # We will return the processor versions sorted by creation time. The page token
792
+ # will point to the next processor version.
793
+ # @param [String] fields
794
+ # Selector specifying which fields to include in a partial response.
795
+ # @param [String] quota_user
796
+ # Available to use for quota purposes for server-side applications. Can be any
797
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
798
+ # @param [Google::Apis::RequestOptions] options
799
+ # Request-specific options
800
+ #
801
+ # @yield [result, err] Result & error if block supplied
802
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse] parsed result object
803
+ # @yieldparam err [StandardError] error object if request failed
804
+ #
805
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse]
806
+ #
807
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
808
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
809
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
810
+ def list_project_location_processor_processor_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
811
+ command = make_simple_command(:get, 'v1/{+parent}/processorVersions', options)
812
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse::Representation
813
+ command.response_class = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ListProcessorVersionsResponse
814
+ command.params['parent'] = parent unless parent.nil?
815
+ command.query['pageSize'] = page_size unless page_size.nil?
816
+ command.query['pageToken'] = page_token unless page_token.nil?
817
+ command.query['fields'] = fields unless fields.nil?
818
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
819
+ execute_or_queue_command(command, &block)
820
+ end
821
+
420
822
  # Processes a single document.
421
823
  # @param [String] name
422
824
  # Required. The resource name of the Processor or ProcessorVersion to use for
@@ -454,6 +856,39 @@ module Google
454
856
  execute_or_queue_command(command, &block)
455
857
  end
456
858
 
859
+ # Undeploys the processor version.
860
+ # @param [String] name
861
+ # Required. The processor version resource name to be undeployed.
862
+ # @param [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1UndeployProcessorVersionRequest] google_cloud_documentai_v1_undeploy_processor_version_request_object
863
+ # @param [String] fields
864
+ # Selector specifying which fields to include in a partial response.
865
+ # @param [String] quota_user
866
+ # Available to use for quota purposes for server-side applications. Can be any
867
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
868
+ # @param [Google::Apis::RequestOptions] options
869
+ # Request-specific options
870
+ #
871
+ # @yield [result, err] Result & error if block supplied
872
+ # @yieldparam result [Google::Apis::DocumentaiV1::GoogleLongrunningOperation] parsed result object
873
+ # @yieldparam err [StandardError] error object if request failed
874
+ #
875
+ # @return [Google::Apis::DocumentaiV1::GoogleLongrunningOperation]
876
+ #
877
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
878
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
879
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
880
+ def undeploy_project_location_processor_processor_version(name, google_cloud_documentai_v1_undeploy_processor_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
881
+ command = make_simple_command(:post, 'v1/{+name}:undeploy', options)
882
+ command.request_representation = Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1UndeployProcessorVersionRequest::Representation
883
+ command.request_object = google_cloud_documentai_v1_undeploy_processor_version_request_object
884
+ command.response_representation = Google::Apis::DocumentaiV1::GoogleLongrunningOperation::Representation
885
+ command.response_class = Google::Apis::DocumentaiV1::GoogleLongrunningOperation
886
+ command.params['name'] = name unless name.nil?
887
+ command.query['fields'] = fields unless fields.nil?
888
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
889
+ execute_or_queue_command(command, &block)
890
+ end
891
+
457
892
  # Gets the latest state of a long-running operation. Clients can use this method
458
893
  # to poll the operation result at intervals as recommended by the API service.
459
894
  # @param [String] name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-documentai_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-06 00:00:00.000000000 Z
11
+ date: 2021-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-documentai_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-documentai_v1/v0.14.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-documentai_v1/v0.18.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-documentai_v1
63
63
  post_install_message:
64
64
  rdoc_options: []