google-cloud-document_ai-v1 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +51 -40
  4. data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +5 -3
  5. data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +51 -40
  6. data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +9 -7
  7. data/lib/google/cloud/document_ai/v1/document_processor_service/rest/service_stub.rb +22 -22
  8. data/lib/google/cloud/document_ai/v1/document_processor_service/rest.rb +1 -1
  9. data/lib/google/cloud/document_ai/v1/document_processor_service.rb +1 -1
  10. data/lib/google/cloud/document_ai/v1/version.rb +1 -1
  11. data/lib/google/cloud/documentai/v1/barcode_pb.rb +24 -6
  12. data/lib/google/cloud/documentai/v1/document_io_pb.rb +25 -35
  13. data/lib/google/cloud/documentai/v1/document_pb.rb +34 -265
  14. data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +34 -229
  15. data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +8 -6
  16. data/lib/google/cloud/documentai/v1/document_schema_pb.rb +24 -37
  17. data/lib/google/cloud/documentai/v1/evaluation_pb.rb +25 -52
  18. data/lib/google/cloud/documentai/v1/geometry_pb.rb +24 -13
  19. data/lib/google/cloud/documentai/v1/operation_metadata_pb.rb +25 -16
  20. data/lib/google/cloud/documentai/v1/processor_pb.rb +27 -47
  21. data/lib/google/cloud/documentai/v1/processor_type_pb.rb +24 -13
  22. data/proto_docs/google/api/client.rb +67 -4
  23. data/proto_docs/google/cloud/documentai/v1/document.rb +88 -27
  24. data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +188 -98
  25. data/proto_docs/google/cloud/documentai/v1/document_schema.rb +6 -7
  26. data/proto_docs/google/cloud/documentai/v1/processor.rb +11 -9
  27. data/proto_docs/google/cloud/documentai/v1/processor_type.rb +3 -2
  28. data/proto_docs/google/protobuf/any.rb +7 -4
  29. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  30. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 251281326fb60fc4e0e5b2f5831ebb7af4234f98082f8a5efae4abb3da9fa6e5
4
- data.tar.gz: 2b3cff5ce885e12637553dcfec4f33299cb155d0703c9a5053c57b26ab30a33d
3
+ metadata.gz: 449e75a7a1b950ae4260619b686ba845cf7cf85787e39ccf958bf37ee0b924b6
4
+ data.tar.gz: f8401aa0633d45d197c9b1cb047f1137262bbd6be99995a3b475495cb57dd1af
5
5
  SHA512:
6
- metadata.gz: 22c5aa4127fc7169720f64e710b00b8692bcef130d6c5083b9e8e36b56aba8d3b6d58d1b3431974428c6e66e9b833b88f3b4ef8dc5f63ac049cbc9bed0661c0b
7
- data.tar.gz: 5da3e5606fac798b999a9d7a34ce0f864025b923a5f7a4876d86406c51f6f01e56bd155aa2ccb580b86bc64dfcbedfc8eea87c86ea794400819d1d705699d054
6
+ metadata.gz: 7515548ea2fee15be368e028f4ae0781b743409b2124df389428e12296f2d2dd7f854ee96392aed7f81531d435b2ef5865287b44c3b863e5f316c9806036cd5d
7
+ data.tar.gz: 7b0be4d480ded4b18eaafc6bc02ede7308c886416794df30a823acc1ce0584c89b24c1a526b3ac1b9e71ec72f120d159f92f98f6b5f4b27a85313c9bf53e69d4
data/README.md CHANGED
@@ -47,7 +47,7 @@ for general usage information.
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
49
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -28,7 +28,7 @@ module Google
28
28
  ##
29
29
  # Client for the DocumentProcessorService service.
30
30
  #
31
- # Service to call Cloud DocumentAI to process documents according to the
31
+ # Service to call Document AI to process documents according to the
32
32
  # processor's definition. Processors are built using state-of-the-art Google
33
33
  # AI such as natural language, computer vision, and translation to extract
34
34
  # structured information from unstructured or semi-structured documents.
@@ -68,7 +68,7 @@ module Google
68
68
  end
69
69
  default_config = Client::Configuration.new parent_config
70
70
 
71
- default_config.rpcs.process_document.timeout = 120.0
71
+ default_config.rpcs.process_document.timeout = 300.0
72
72
  default_config.rpcs.process_document.retry_policy = {
73
73
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
74
  }
@@ -142,7 +142,7 @@ module Google
142
142
  credentials = @config.credentials
143
143
  # Use self-signed JWT if the endpoint is unchanged from default,
144
144
  # but only if the default endpoint does not have a region prefix.
145
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
145
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
146
146
  !@config.endpoint.split(".").first.include?("-")
147
147
  credentials ||= Credentials.default scope: @config.scope,
148
148
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -223,12 +223,13 @@ module Google
223
223
  # or
224
224
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
225
225
  # @param skip_human_review [::Boolean]
226
- # Whether Human Review feature should be skipped for this request. Default to
227
- # false.
226
+ # Whether human review should be skipped for this request. Default to
227
+ # `false`.
228
228
  # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
229
- # Specifies which fields to include in ProcessResponse's document.
230
- # Only supports top level document and pages field so it must be in the form
231
- # of `{document_field_name}` or `pages.{page_field_name}`.
229
+ # Specifies which fields to include in the
230
+ # {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
231
+ # output. Only supports top-level document and pages field, so it must be in
232
+ # the form of `{document_field_name}` or `pages.{page_field_name}`.
232
233
  #
233
234
  # @yield [response, operation] Access the result along with the RPC operation
234
235
  # @yieldparam response [::Google::Cloud::DocumentAI::V1::ProcessResponse]
@@ -321,12 +322,16 @@ module Google
321
322
  # or
322
323
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
323
324
  # @param input_documents [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig, ::Hash]
324
- # The input documents for batch process.
325
+ # The input documents for the
326
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
327
+ # method.
325
328
  # @param document_output_config [::Google::Cloud::DocumentAI::V1::DocumentOutputConfig, ::Hash]
326
- # The overall output config for batch process.
329
+ # The output configuration for the
330
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
331
+ # method.
327
332
  # @param skip_human_review [::Boolean]
328
- # Whether Human Review feature should be skipped for this request. Default to
329
- # false.
333
+ # Whether human review should be skipped for this request. Default to
334
+ # `false`.
330
335
  #
331
336
  # @yield [response, operation] Access the result along with the RPC operation
332
337
  # @yieldparam response [::Gapic::Operation]
@@ -401,8 +406,9 @@ module Google
401
406
  end
402
407
 
403
408
  ##
404
- # Fetches processor types. Note that we do not use ListProcessorTypes here
405
- # because it is not paginated.
409
+ # Fetches processor types. Note that we don't use
410
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
411
+ # here, because it isn't paginated.
406
412
  #
407
413
  # @overload fetch_processor_types(request, options = nil)
408
414
  # Pass arguments to `fetch_processor_types` via a request object, either of type
@@ -420,9 +426,8 @@ module Google
420
426
  # the default parameter values, pass an empty Hash as a request object (see above).
421
427
  #
422
428
  # @param parent [::String]
423
- # Required. The project of processor type to list.
424
- # The available processor types may depend on the allow-listing on projects.
425
- # Format: `projects/{project}/locations/{location}`
429
+ # Required. The location of processor types to list.
430
+ # Format: `projects/{project}/locations/{location}`.
426
431
  #
427
432
  # @yield [response, operation] Access the result along with the RPC operation
428
433
  # @yieldparam response [::Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse]
@@ -507,13 +512,12 @@ module Google
507
512
  # the default parameter values, pass an empty Hash as a request object (see above).
508
513
  #
509
514
  # @param parent [::String]
510
- # Required. The location of processor type to list.
511
- # The available processor types may depend on the allow-listing on projects.
512
- # Format: `projects/{project}/locations/{location}`
515
+ # Required. The location of processor types to list.
516
+ # Format: `projects/{project}/locations/{location}`.
513
517
  # @param page_size [::Integer]
514
518
  # The maximum number of processor types to return.
515
- # If unspecified, at most 100 processor types will be returned.
516
- # The maximum value is 500; values above 500 will be coerced to 500.
519
+ # If unspecified, at most `100` processor types will be returned.
520
+ # The maximum value is `500`. Values above `500` will be coerced to `500`.
517
521
  # @param page_token [::String]
518
522
  # Used to retrieve the next page of results, empty if at the end of the list.
519
523
  #
@@ -694,8 +698,8 @@ module Google
694
698
  # Processors. Format: `projects/{project}/locations/{location}`
695
699
  # @param page_size [::Integer]
696
700
  # The maximum number of processors to return.
697
- # If unspecified, at most 50 processors will be returned.
698
- # The maximum value is 100; values above 100 will be coerced to 100.
701
+ # If unspecified, at most `50` processors will be returned.
702
+ # The maximum value is `100`. Values above `100` will be coerced to `100`.
699
703
  # @param page_token [::String]
700
704
  # We will return the processors sorted by creation time. The page token
701
705
  # will point to the next processor.
@@ -857,7 +861,7 @@ module Google
857
861
  ##
858
862
  # Trains a new processor version.
859
863
  # Operation metadata is returned as
860
- # cloud_documentai_core.TrainProcessorVersionMetadata.
864
+ # {::Google::Cloud::DocumentAI::V1::TrainProcessorVersionMetadata TrainProcessorVersionMetadata}.
861
865
  #
862
866
  # @overload train_processor_version(request, options = nil)
863
867
  # Pass arguments to `train_processor_version` via a request object, either of type
@@ -883,7 +887,8 @@ module Google
883
887
  # @param document_schema [::Google::Cloud::DocumentAI::V1::DocumentSchema, ::Hash]
884
888
  # Optional. The schema the processor version will be trained with.
885
889
  # @param input_data [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::InputData, ::Hash]
886
- # Optional. The input data used to train the `ProcessorVersion`.
890
+ # Optional. The input data used to train the
891
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
887
892
  # @param base_processor_version [::String]
888
893
  # Optional. The processor version to use as a base for training. This
889
894
  # processor version must be a child of `parent`. Format:
@@ -1070,8 +1075,8 @@ module Google
1070
1075
  # `projects/{project}/locations/{location}/processors/{processor}`
1071
1076
  # @param page_size [::Integer]
1072
1077
  # The maximum number of processor versions to return.
1073
- # If unspecified, at most 10 processor versions will be returned.
1074
- # The maximum value is 20; values above 20 will be coerced to 20.
1078
+ # If unspecified, at most `10` processor versions will be returned.
1079
+ # The maximum value is `20`. Values above `20` will be coerced to `20`.
1075
1080
  # @param page_token [::String]
1076
1081
  # We will return the processor versions sorted by creation time. The page
1077
1082
  # token will point to the next processor version.
@@ -1426,8 +1431,9 @@ module Google
1426
1431
  end
1427
1432
 
1428
1433
  ##
1429
- # Creates a processor from the type processor that the user chose.
1430
- # The processor will be at "ENABLED" state by default after its creation.
1434
+ # Creates a processor from the
1435
+ # {::Google::Cloud::DocumentAI::V1::ProcessorType ProcessorType} provided. The
1436
+ # processor will be at `ENABLED` state by default after its creation.
1431
1437
  #
1432
1438
  # @overload create_processor(request, options = nil)
1433
1439
  # Pass arguments to `create_processor` via a request object, either of type
@@ -1448,9 +1454,11 @@ module Google
1448
1454
  # Required. The parent (project and location) under which to create the
1449
1455
  # processor. Format: `projects/{project}/locations/{location}`
1450
1456
  # @param processor [::Google::Cloud::DocumentAI::V1::Processor, ::Hash]
1451
- # Required. The processor to be created, requires [processor_type] and
1452
- # [display_name] to be set. Also, the processor is under CMEK if CMEK fields
1453
- # are set.
1457
+ # Required. The processor to be created, requires
1458
+ # {::Google::Cloud::DocumentAI::V1::Processor#type Processor.type} and
1459
+ # [Processor.display_name]][] to be set. Also, the
1460
+ # {::Google::Cloud::DocumentAI::V1::Processor#kms_key_name Processor.kms_key_name}
1461
+ # field must be set if the processor is under CMEK.
1454
1462
  #
1455
1463
  # @yield [response, operation] Access the result along with the RPC operation
1456
1464
  # @yieldparam response [::Google::Cloud::DocumentAI::V1::Processor]
@@ -1922,8 +1930,9 @@ module Google
1922
1930
  # @param inline_document [::Google::Cloud::DocumentAI::V1::Document, ::Hash]
1923
1931
  # An inline document proto.
1924
1932
  # @param human_review_config [::String]
1925
- # Required. The resource name of the HumanReviewConfig that the document will
1926
- # be reviewed with.
1933
+ # Required. The resource name of the
1934
+ # [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
1935
+ # document will be reviewed with.
1927
1936
  # @param enable_schema_validation [::Boolean]
1928
1937
  # Whether the validation should be performed on the ad-hoc review request.
1929
1938
  # @param priority [::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest::Priority]
@@ -2215,8 +2224,8 @@ module Google
2215
2224
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
2216
2225
  # @param page_size [::Integer]
2217
2226
  # The standard list page size.
2218
- # If unspecified, at most 5 evaluations will be returned.
2219
- # The maximum value is 100; values above 100 will be coerced to 100.
2227
+ # If unspecified, at most `5` evaluations are returned.
2228
+ # The maximum value is `100`. Values above `100` are coerced to `100`.
2220
2229
  # @param page_token [::String]
2221
2230
  # A page token, received from a previous `ListEvaluations` call.
2222
2231
  # Provide this to retrieve the subsequent page.
@@ -2328,9 +2337,9 @@ module Google
2328
2337
  # * (`String`) The path to a service account key file in JSON format
2329
2338
  # * (`Hash`) A service account key as a Hash
2330
2339
  # * (`Google::Auth::Credentials`) A googleauth credentials object
2331
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2340
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2332
2341
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2333
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2342
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2334
2343
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2335
2344
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2336
2345
  # * (`nil`) indicating no credentials
@@ -2372,7 +2381,9 @@ module Google
2372
2381
  class Configuration
2373
2382
  extend ::Gapic::Config
2374
2383
 
2375
- config_attr :endpoint, "documentai.googleapis.com", ::String
2384
+ DEFAULT_ENDPOINT = "documentai.googleapis.com"
2385
+
2386
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2376
2387
  config_attr :credentials, nil do |value|
2377
2388
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2378
2389
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -620,9 +620,9 @@ module Google
620
620
  # * (`String`) The path to a service account key file in JSON format
621
621
  # * (`Hash`) A service account key as a Hash
622
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
623
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
624
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
625
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
626
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
627
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
628
628
  # * (`nil`) indicating no credentials
@@ -664,7 +664,9 @@ module Google
664
664
  class Configuration
665
665
  extend ::Gapic::Config
666
666
 
667
- config_attr :endpoint, "documentai.googleapis.com", ::String
667
+ DEFAULT_ENDPOINT = "documentai.googleapis.com"
668
+
669
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
670
  config_attr :credentials, nil do |value|
669
671
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
672
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -30,7 +30,7 @@ module Google
30
30
  ##
31
31
  # REST client for the DocumentProcessorService service.
32
32
  #
33
- # Service to call Cloud DocumentAI to process documents according to the
33
+ # Service to call Document AI to process documents according to the
34
34
  # processor's definition. Processors are built using state-of-the-art Google
35
35
  # AI such as natural language, computer vision, and translation to extract
36
36
  # structured information from unstructured or semi-structured documents.
@@ -70,7 +70,7 @@ module Google
70
70
  end
71
71
  default_config = Client::Configuration.new parent_config
72
72
 
73
- default_config.rpcs.process_document.timeout = 120.0
73
+ default_config.rpcs.process_document.timeout = 300.0
74
74
  default_config.rpcs.process_document.retry_policy = {
75
75
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
76
76
  }
@@ -138,7 +138,7 @@ module Google
138
138
  credentials = @config.credentials
139
139
  # Use self-signed JWT if the endpoint is unchanged from default,
140
140
  # but only if the default endpoint does not have a region prefix.
141
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
142
  !@config.endpoint.split(".").first.include?("-")
143
143
  credentials ||= Credentials.default scope: @config.scope,
144
144
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -215,12 +215,13 @@ module Google
215
215
  # or
216
216
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
217
217
  # @param skip_human_review [::Boolean]
218
- # Whether Human Review feature should be skipped for this request. Default to
219
- # false.
218
+ # Whether human review should be skipped for this request. Default to
219
+ # `false`.
220
220
  # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
221
- # Specifies which fields to include in ProcessResponse's document.
222
- # Only supports top level document and pages field so it must be in the form
223
- # of `{document_field_name}` or `pages.{page_field_name}`.
221
+ # Specifies which fields to include in the
222
+ # {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
223
+ # output. Only supports top-level document and pages field, so it must be in
224
+ # the form of `{document_field_name}` or `pages.{page_field_name}`.
224
225
  # @yield [result, operation] Access the result along with the TransportOperation object
225
226
  # @yieldparam result [::Google::Cloud::DocumentAI::V1::ProcessResponse]
226
227
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -290,12 +291,16 @@ module Google
290
291
  # or
291
292
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
292
293
  # @param input_documents [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig, ::Hash]
293
- # The input documents for batch process.
294
+ # The input documents for the
295
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client#batch_process_documents BatchProcessDocuments}
296
+ # method.
294
297
  # @param document_output_config [::Google::Cloud::DocumentAI::V1::DocumentOutputConfig, ::Hash]
295
- # The overall output config for batch process.
298
+ # The output configuration for the
299
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client#batch_process_documents BatchProcessDocuments}
300
+ # method.
296
301
  # @param skip_human_review [::Boolean]
297
- # Whether Human Review feature should be skipped for this request. Default to
298
- # false.
302
+ # Whether human review should be skipped for this request. Default to
303
+ # `false`.
299
304
  # @yield [result, operation] Access the result along with the TransportOperation object
300
305
  # @yieldparam result [::Gapic::Operation]
301
306
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -340,8 +345,9 @@ module Google
340
345
  end
341
346
 
342
347
  ##
343
- # Fetches processor types. Note that we do not use ListProcessorTypes here
344
- # because it is not paginated.
348
+ # Fetches processor types. Note that we don't use
349
+ # {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Rest::Client#list_processor_types ListProcessorTypes}
350
+ # here, because it isn't paginated.
345
351
  #
346
352
  # @overload fetch_processor_types(request, options = nil)
347
353
  # Pass arguments to `fetch_processor_types` via a request object, either of type
@@ -359,9 +365,8 @@ module Google
359
365
  # the default parameter values, pass an empty Hash as a request object (see above).
360
366
  #
361
367
  # @param parent [::String]
362
- # Required. The project of processor type to list.
363
- # The available processor types may depend on the allow-listing on projects.
364
- # Format: `projects/{project}/locations/{location}`
368
+ # Required. The location of processor types to list.
369
+ # Format: `projects/{project}/locations/{location}`.
365
370
  # @yield [result, operation] Access the result along with the TransportOperation object
366
371
  # @yieldparam result [::Google::Cloud::DocumentAI::V1::FetchProcessorTypesResponse]
367
372
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -423,13 +428,12 @@ module Google
423
428
  # the default parameter values, pass an empty Hash as a request object (see above).
424
429
  #
425
430
  # @param parent [::String]
426
- # Required. The location of processor type to list.
427
- # The available processor types may depend on the allow-listing on projects.
428
- # Format: `projects/{project}/locations/{location}`
431
+ # Required. The location of processor types to list.
432
+ # Format: `projects/{project}/locations/{location}`.
429
433
  # @param page_size [::Integer]
430
434
  # The maximum number of processor types to return.
431
- # If unspecified, at most 100 processor types will be returned.
432
- # The maximum value is 500; values above 500 will be coerced to 500.
435
+ # If unspecified, at most `100` processor types will be returned.
436
+ # The maximum value is `500`. Values above `500` will be coerced to `500`.
433
437
  # @param page_token [::String]
434
438
  # Used to retrieve the next page of results, empty if at the end of the list.
435
439
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -560,8 +564,8 @@ module Google
560
564
  # Processors. Format: `projects/{project}/locations/{location}`
561
565
  # @param page_size [::Integer]
562
566
  # The maximum number of processors to return.
563
- # If unspecified, at most 50 processors will be returned.
564
- # The maximum value is 100; values above 100 will be coerced to 100.
567
+ # If unspecified, at most `50` processors will be returned.
568
+ # The maximum value is `100`. Values above `100` will be coerced to `100`.
565
569
  # @param page_token [::String]
566
570
  # We will return the processors sorted by creation time. The page token
567
571
  # will point to the next processor.
@@ -673,7 +677,7 @@ module Google
673
677
  ##
674
678
  # Trains a new processor version.
675
679
  # Operation metadata is returned as
676
- # cloud_documentai_core.TrainProcessorVersionMetadata.
680
+ # {::Google::Cloud::DocumentAI::V1::TrainProcessorVersionMetadata TrainProcessorVersionMetadata}.
677
681
  #
678
682
  # @overload train_processor_version(request, options = nil)
679
683
  # Pass arguments to `train_processor_version` via a request object, either of type
@@ -699,7 +703,8 @@ module Google
699
703
  # @param document_schema [::Google::Cloud::DocumentAI::V1::DocumentSchema, ::Hash]
700
704
  # Optional. The schema the processor version will be trained with.
701
705
  # @param input_data [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::InputData, ::Hash]
702
- # Optional. The input data used to train the `ProcessorVersion`.
706
+ # Optional. The input data used to train the
707
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
703
708
  # @param base_processor_version [::String]
704
709
  # Optional. The processor version to use as a base for training. This
705
710
  # processor version must be a child of `parent`. Format:
@@ -833,8 +838,8 @@ module Google
833
838
  # `projects/{project}/locations/{location}/processors/{processor}`
834
839
  # @param page_size [::Integer]
835
840
  # The maximum number of processor versions to return.
836
- # If unspecified, at most 10 processor versions will be returned.
837
- # The maximum value is 20; values above 20 will be coerced to 20.
841
+ # If unspecified, at most `10` processor versions will be returned.
842
+ # The maximum value is `20`. Values above `20` will be coerced to `20`.
838
843
  # @param page_token [::String]
839
844
  # We will return the processor versions sorted by creation time. The page
840
845
  # token will point to the next processor version.
@@ -1072,8 +1077,9 @@ module Google
1072
1077
  end
1073
1078
 
1074
1079
  ##
1075
- # Creates a processor from the type processor that the user chose.
1076
- # The processor will be at "ENABLED" state by default after its creation.
1080
+ # Creates a processor from the
1081
+ # {::Google::Cloud::DocumentAI::V1::ProcessorType ProcessorType} provided. The
1082
+ # processor will be at `ENABLED` state by default after its creation.
1077
1083
  #
1078
1084
  # @overload create_processor(request, options = nil)
1079
1085
  # Pass arguments to `create_processor` via a request object, either of type
@@ -1094,9 +1100,11 @@ module Google
1094
1100
  # Required. The parent (project and location) under which to create the
1095
1101
  # processor. Format: `projects/{project}/locations/{location}`
1096
1102
  # @param processor [::Google::Cloud::DocumentAI::V1::Processor, ::Hash]
1097
- # Required. The processor to be created, requires [processor_type] and
1098
- # [display_name] to be set. Also, the processor is under CMEK if CMEK fields
1099
- # are set.
1103
+ # Required. The processor to be created, requires
1104
+ # {::Google::Cloud::DocumentAI::V1::Processor#type Processor.type} and
1105
+ # [Processor.display_name]][] to be set. Also, the
1106
+ # {::Google::Cloud::DocumentAI::V1::Processor#kms_key_name Processor.kms_key_name}
1107
+ # field must be set if the processor is under CMEK.
1100
1108
  # @yield [result, operation] Access the result along with the TransportOperation object
1101
1109
  # @yieldparam result [::Google::Cloud::DocumentAI::V1::Processor]
1102
1110
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1425,8 +1433,9 @@ module Google
1425
1433
  # @param inline_document [::Google::Cloud::DocumentAI::V1::Document, ::Hash]
1426
1434
  # An inline document proto.
1427
1435
  # @param human_review_config [::String]
1428
- # Required. The resource name of the HumanReviewConfig that the document will
1429
- # be reviewed with.
1436
+ # Required. The resource name of the
1437
+ # [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
1438
+ # document will be reviewed with.
1430
1439
  # @param enable_schema_validation [::Boolean]
1431
1440
  # Whether the validation should be performed on the ad-hoc review request.
1432
1441
  # @param priority [::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest::Priority]
@@ -1635,8 +1644,8 @@ module Google
1635
1644
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
1636
1645
  # @param page_size [::Integer]
1637
1646
  # The standard list page size.
1638
- # If unspecified, at most 5 evaluations will be returned.
1639
- # The maximum value is 100; values above 100 will be coerced to 100.
1647
+ # If unspecified, at most `5` evaluations are returned.
1648
+ # The maximum value is `100`. Values above `100` are coerced to `100`.
1640
1649
  # @param page_token [::String]
1641
1650
  # A page token, received from a previous `ListEvaluations` call.
1642
1651
  # Provide this to retrieve the subsequent page.
@@ -1721,9 +1730,9 @@ module Google
1721
1730
  # * (`String`) The path to a service account key file in JSON format
1722
1731
  # * (`Hash`) A service account key as a Hash
1723
1732
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1724
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1733
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1725
1734
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1726
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1735
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1727
1736
  # * (`nil`) indicating no credentials
1728
1737
  # @return [::Object]
1729
1738
  # @!attribute [rw] scope
@@ -1756,7 +1765,9 @@ module Google
1756
1765
  class Configuration
1757
1766
  extend ::Gapic::Config
1758
1767
 
1759
- config_attr :endpoint, "documentai.googleapis.com", ::String
1768
+ DEFAULT_ENDPOINT = "documentai.googleapis.com"
1769
+
1770
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1760
1771
  config_attr :credentials, nil do |value|
1761
1772
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1762
1773
  allowed.any? { |klass| klass === value }
@@ -411,9 +411,9 @@ module Google
411
411
  # * (`String`) The path to a service account key file in JSON format
412
412
  # * (`Hash`) A service account key as a Hash
413
413
  # * (`Google::Auth::Credentials`) A googleauth credentials object
414
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
414
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
415
415
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
416
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
416
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
417
417
  # * (`nil`) indicating no credentials
418
418
  # @return [::Object]
419
419
  # @!attribute [rw] scope
@@ -446,7 +446,9 @@ module Google
446
446
  class Configuration
447
447
  extend ::Gapic::Config
448
448
 
449
- config_attr :endpoint, "documentai.googleapis.com", ::String
449
+ DEFAULT_ENDPOINT = "documentai.googleapis.com"
450
+
451
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
452
  config_attr :credentials, nil do |value|
451
453
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
454
  allowed.any? { |klass| klass === value }
@@ -567,7 +569,7 @@ module Google
567
569
 
568
570
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
571
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
572
+ query_string_params.to_h { |p| p.split "=", 2 }
571
573
  else
572
574
  {}
573
575
  end
@@ -605,7 +607,7 @@ module Google
605
607
 
606
608
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
609
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
610
+ query_string_params.to_h { |p| p.split "=", 2 }
609
611
  else
610
612
  {}
611
613
  end
@@ -643,7 +645,7 @@ module Google
643
645
 
644
646
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
647
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
648
+ query_string_params.to_h { |p| p.split "=", 2 }
647
649
  else
648
650
  {}
649
651
  end
@@ -681,7 +683,7 @@ module Google
681
683
 
682
684
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
685
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
686
+ query_string_params.to_h { |p| p.split "=", 2 }
685
687
  else
686
688
  {}
687
689
  end