google-cloud-document_ai-v1beta3 0.23.0 → 0.24.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +54 -39
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +54 -39
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb +1 -1
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +1 -1
  6. data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +618 -0
  7. data/lib/google/cloud/document_ai/v1beta3/document_service/credentials.rb +51 -0
  8. data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +770 -0
  9. data/lib/google/cloud/document_ai/v1beta3/document_service/paths.rb +90 -0
  10. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +530 -0
  11. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +815 -0
  12. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb +227 -0
  13. data/lib/google/cloud/document_ai/v1beta3/document_service/rest.rb +54 -0
  14. data/lib/google/cloud/document_ai/v1beta3/document_service.rb +56 -0
  15. data/lib/google/cloud/document_ai/v1beta3/rest.rb +1 -0
  16. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  17. data/lib/google/cloud/document_ai/v1beta3.rb +1 -0
  18. data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +55 -0
  19. data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +1 -1
  20. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +2 -1
  21. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +4 -1
  22. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +8 -6
  23. data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +3 -1
  24. data/lib/google/cloud/documentai/v1beta3/document_service_pb.rb +57 -0
  25. data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +49 -0
  26. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +1 -1
  27. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +125 -0
  28. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +88 -27
  29. data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +10 -1
  30. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +258 -123
  31. data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +44 -13
  32. data/proto_docs/google/cloud/documentai/v1beta3/document_service.rb +73 -0
  33. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +11 -9
  34. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -2
  35. metadata +16 -2
@@ -24,14 +24,16 @@ module Google
24
24
  # Options for Process API
25
25
  # @!attribute [rw] ocr_config
26
26
  # @return [::Google::Cloud::DocumentAI::V1beta3::OcrConfig]
27
- # Only applicable to "Document OCR Processor". Returns error if set on other
27
+ # Only applicable to `OCR_PROCESSOR`. Returns error if set on other
28
28
  # processor types.
29
29
  class ProcessOptions
30
30
  include ::Google::Protobuf::MessageExts
31
31
  extend ::Google::Protobuf::MessageExts::ClassMethods
32
32
  end
33
33
 
34
- # Request message for the process document method.
34
+ # Request message for the
35
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#process_document ProcessDocument}
36
+ # method.
35
37
  # @!attribute [rw] inline_document
36
38
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
37
39
  # An inline document proto.
@@ -52,16 +54,20 @@ module Google
52
54
  # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
53
55
  # @!attribute [rw] document
54
56
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
55
- # The document payload, the [content] and [mime_type] fields must be set.
57
+ # The document payload, the
58
+ # {::Google::Cloud::DocumentAI::V1beta3::Document#content content} and
59
+ # {::Google::Cloud::DocumentAI::V1beta3::Document#mime_type mime_type} fields must
60
+ # be set.
56
61
  # @!attribute [rw] skip_human_review
57
62
  # @return [::Boolean]
58
- # Whether Human Review feature should be skipped for this request. Default to
59
- # false.
63
+ # Whether human review should be skipped for this request. Default to
64
+ # `false`.
60
65
  # @!attribute [rw] field_mask
61
66
  # @return [::Google::Protobuf::FieldMask]
62
- # Specifies which fields to include in ProcessResponse's document.
63
- # Only supports top level document and pages field so it must be in the form
64
- # of `{document_field_name}` or `pages.{page_field_name}`.
67
+ # Specifies which fields to include in the
68
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessResponse#document ProcessResponse.document}
69
+ # output. Only supports top-level document and pages field, so it must be in
70
+ # the form of `{document_field_name}` or `pages.{page_field_name}`.
65
71
  # @!attribute [rw] process_options
66
72
  # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessOptions]
67
73
  # Inference-time options for the process API
@@ -80,9 +86,11 @@ module Google
80
86
  # @!attribute [rw] human_review_operation
81
87
  # @return [::String]
82
88
  # The name of the operation triggered by the processed document. This field
83
- # is populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has
84
- # the same response type and metadata as the long running operation returned
85
- # by [ReviewDocument] method.
89
+ # is populated only when the
90
+ # {::Google::Cloud::DocumentAI::V1beta3::HumanReviewStatus#state state} is
91
+ # `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as
92
+ # the long-running operation returned by
93
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#review_document ReviewDocument}.
86
94
  class HumanReviewStatus
87
95
  include ::Google::Protobuf::MessageExts
88
96
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -93,7 +101,7 @@ module Google
93
101
  STATE_UNSPECIFIED = 0
94
102
 
95
103
  # Human review is skipped for the document. This can happen because human
96
- # review is not enabled on the processor or the processing request has
104
+ # review isn't enabled on the processor or the processing request has
97
105
  # been set to skip this document.
98
106
  SKIPPED = 1
99
107
 
@@ -104,12 +112,15 @@ module Google
104
112
  IN_PROGRESS = 3
105
113
 
106
114
  # Some error happened during triggering human review, see the
107
- # [state_message] for details.
115
+ # {::Google::Cloud::DocumentAI::V1beta3::HumanReviewStatus#state_message state_message}
116
+ # for details.
108
117
  ERROR = 4
109
118
  end
110
119
  end
111
120
 
112
- # Response message for the process document method.
121
+ # Response message for the
122
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#process_document ProcessDocument}
123
+ # method.
113
124
  # @!attribute [rw] document
114
125
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
115
126
  # The document payload, will populate fields based on the processor's
@@ -117,9 +128,9 @@ module Google
117
128
  # @!attribute [rw] human_review_operation
118
129
  # @return [::String]
119
130
  # The name of the operation triggered by the processed document. If the human
120
- # review process is not triggered, this field will be empty. It has the same
121
- # response type and metadata as the long running operation returned by
122
- # ReviewDocument method.
131
+ # review process isn't triggered, this field is empty. It has the same
132
+ # response type and metadata as the long-running operation returned by
133
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#review_document ReviewDocument}.
123
134
  # @!attribute [rw] human_review_status
124
135
  # @return [::Google::Cloud::DocumentAI::V1beta3::HumanReviewStatus]
125
136
  # The status of human review on the processed document.
@@ -128,7 +139,8 @@ module Google
128
139
  extend ::Google::Protobuf::MessageExts::ClassMethods
129
140
  end
130
141
 
131
- # Request message for batch process document method.
142
+ # Request message for
143
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
132
144
  # @!attribute [rw] name
133
145
  # @return [::String]
134
146
  # Required. The resource name of
@@ -145,14 +157,18 @@ module Google
145
157
  # The overall output config for batch process.
146
158
  # @!attribute [rw] input_documents
147
159
  # @return [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig]
148
- # The input documents for batch process.
160
+ # The input documents for the
161
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
162
+ # method.
149
163
  # @!attribute [rw] document_output_config
150
164
  # @return [::Google::Cloud::DocumentAI::V1beta3::DocumentOutputConfig]
151
- # The overall output config for batch process.
165
+ # The output configuration for the
166
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
167
+ # method.
152
168
  # @!attribute [rw] skip_human_review
153
169
  # @return [::Boolean]
154
- # Whether Human Review feature should be skipped for this request. Default to
155
- # false.
170
+ # Whether human review should be skipped for this request. Default to
171
+ # `false`.
156
172
  # @!attribute [rw] process_options
157
173
  # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessOptions]
158
174
  # Inference-time options for the process API
@@ -166,15 +182,21 @@ module Google
166
182
  # The Cloud Storage location as the source of the document.
167
183
  # @!attribute [rw] mime_type
168
184
  # @return [::String]
169
- # Mimetype of the input. If the input is a raw document, the supported
170
- # mimetypes are application/pdf, image/tiff, and image/gif.
171
- # If the input is a [Document] proto, the type should be application/json.
185
+ # An IANA published [media type (MIME
186
+ # type)](https://www.iana.org/assignments/media-types/media-types.xhtml) of
187
+ # the input. If the input is a raw document, refer to [supported file
188
+ # types](https://cloud.google.com/document-ai/docs/file-types) for the list
189
+ # of media types. If the input is a
190
+ # {::Google::Cloud::DocumentAI::V1beta3::Document Document}, the type should be
191
+ # `application/json`.
172
192
  class BatchInputConfig
173
193
  include ::Google::Protobuf::MessageExts
174
194
  extend ::Google::Protobuf::MessageExts::ClassMethods
175
195
  end
176
196
 
177
- # The message for output config in batch process.
197
+ # The output configuration in the
198
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
199
+ # method.
178
200
  # @!attribute [rw] gcs_destination
179
201
  # @return [::String]
180
202
  # The output Cloud Storage directory to put the processed documents.
@@ -184,13 +206,15 @@ module Google
184
206
  end
185
207
  end
186
208
 
187
- # Response message for batch process document method.
209
+ # Response message for
210
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
188
211
  class BatchProcessResponse
189
212
  include ::Google::Protobuf::MessageExts
190
213
  extend ::Google::Protobuf::MessageExts::ClassMethods
191
214
  end
192
215
 
193
- # The long running operation metadata for batch process method.
216
+ # The long-running operation metadata for
217
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
194
218
  # @!attribute [rw] state
195
219
  # @return [::Google::Cloud::DocumentAI::V1beta3::BatchProcessMetadata::State]
196
220
  # The state of the current batch processing.
@@ -214,23 +238,25 @@ module Google
214
238
  # The status of a each individual document in the batch process.
215
239
  # @!attribute [rw] input_gcs_source
216
240
  # @return [::String]
217
- # The source of the document, same as the [input_gcs_source] field in the
218
- # request when the batch process started. The batch process is started by
219
- # take snapshot of that document, since a user can move or change that
220
- # document during the process.
241
+ # The source of the document, same as the
242
+ # {::Google::Cloud::DocumentAI::V1beta3::BatchProcessMetadata::IndividualProcessStatus#input_gcs_source input_gcs_source}
243
+ # field in the request when the batch process started.
221
244
  # @!attribute [rw] status
222
245
  # @return [::Google::Rpc::Status]
223
246
  # The status processing the document.
224
247
  # @!attribute [rw] output_gcs_destination
225
248
  # @return [::String]
226
- # The output_gcs_destination (in the request as `output_gcs_destination`)
249
+ # The Cloud Storage output destination (in the request as
250
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentOutputConfig::GcsOutputConfig#gcs_uri DocumentOutputConfig.GcsOutputConfig.gcs_uri})
227
251
  # of the processed document if it was successful, otherwise empty.
228
252
  # @!attribute [rw] human_review_operation
229
253
  # @return [::String]
230
254
  # The name of the operation triggered by the processed document. If the
231
- # human review process is not triggered, this field will be empty. It has
232
- # the same response type and metadata as the long running operation
233
- # returned by ReviewDocument method.
255
+ # human review process isn't triggered, this field will be empty. It has
256
+ # the same response type and metadata as the long-running operation
257
+ # returned by the
258
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#review_document ReviewDocument}
259
+ # method.
234
260
  # @!attribute [rw] human_review_status
235
261
  # @return [::Google::Cloud::DocumentAI::V1beta3::HumanReviewStatus]
236
262
  # The status of human review on the processed document.
@@ -264,18 +290,22 @@ module Google
264
290
  end
265
291
  end
266
292
 
267
- # Request message for fetch processor types.
293
+ # Request message for the
294
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}
295
+ # method. Some processor types may require the project be added to an
296
+ # allowlist.
268
297
  # @!attribute [rw] parent
269
298
  # @return [::String]
270
- # Required. The project of processor type to list.
271
- # The available processor types may depend on the allow-listing on projects.
272
- # Format: `projects/{project}/locations/{location}`
299
+ # Required. The location of processor types to list.
300
+ # Format: `projects/{project}/locations/{location}`.
273
301
  class FetchProcessorTypesRequest
274
302
  include ::Google::Protobuf::MessageExts
275
303
  extend ::Google::Protobuf::MessageExts::ClassMethods
276
304
  end
277
305
 
278
- # Response message for fetch processor types.
306
+ # Response message for the
307
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}
308
+ # method.
279
309
  # @!attribute [rw] processor_types
280
310
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
281
311
  # The list of processor types.
@@ -284,17 +314,19 @@ module Google
284
314
  extend ::Google::Protobuf::MessageExts::ClassMethods
285
315
  end
286
316
 
287
- # Request message for list processor types.
317
+ # Request message for the
318
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
319
+ # method. Some processor types may require the project be added to an
320
+ # allowlist.
288
321
  # @!attribute [rw] parent
289
322
  # @return [::String]
290
- # Required. The location of processor type to list.
291
- # The available processor types may depend on the allow-listing on projects.
292
- # Format: `projects/{project}/locations/{location}`
323
+ # Required. The location of processor types to list.
324
+ # Format: `projects/{project}/locations/{location}`.
293
325
  # @!attribute [rw] page_size
294
326
  # @return [::Integer]
295
327
  # The maximum number of processor types to return.
296
- # If unspecified, at most 100 processor types will be returned.
297
- # The maximum value is 500; values above 500 will be coerced to 500.
328
+ # If unspecified, at most `100` processor types will be returned.
329
+ # The maximum value is `500`. Values above `500` will be coerced to `500`.
298
330
  # @!attribute [rw] page_token
299
331
  # @return [::String]
300
332
  # Used to retrieve the next page of results, empty if at the end of the list.
@@ -303,7 +335,9 @@ module Google
303
335
  extend ::Google::Protobuf::MessageExts::ClassMethods
304
336
  end
305
337
 
306
- # Response message for list processor types.
338
+ # Response message for the
339
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
340
+ # method.
307
341
  # @!attribute [rw] processor_types
308
342
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
309
343
  # The processor types.
@@ -323,8 +357,8 @@ module Google
323
357
  # @!attribute [rw] page_size
324
358
  # @return [::Integer]
325
359
  # The maximum number of processors to return.
326
- # If unspecified, at most 50 processors will be returned.
327
- # The maximum value is 100; values above 100 will be coerced to 100.
360
+ # If unspecified, at most `50` processors will be returned.
361
+ # The maximum value is `100`. Values above `100` will be coerced to `100`.
328
362
  # @!attribute [rw] page_token
329
363
  # @return [::String]
330
364
  # We will return the processors sorted by creation time. The page token
@@ -334,7 +368,9 @@ module Google
334
368
  extend ::Google::Protobuf::MessageExts::ClassMethods
335
369
  end
336
370
 
337
- # Response message for list processors.
371
+ # Response message for the
372
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#list_processors ListProcessors}
373
+ # method.
338
374
  # @!attribute [rw] processors
339
375
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Processor>]
340
376
  # The list of processors.
@@ -346,7 +382,9 @@ module Google
346
382
  extend ::Google::Protobuf::MessageExts::ClassMethods
347
383
  end
348
384
 
349
- # Request message for get processor.
385
+ # Request message for the
386
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#get_processor_type GetProcessorType}
387
+ # method.
350
388
  # @!attribute [rw] name
351
389
  # @return [::String]
352
390
  # Required. The processor type resource name.
@@ -355,7 +393,9 @@ module Google
355
393
  extend ::Google::Protobuf::MessageExts::ClassMethods
356
394
  end
357
395
 
358
- # Request message for get processor.
396
+ # Request message for the
397
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#get_processor GetProcessor}
398
+ # method.
359
399
  # @!attribute [rw] name
360
400
  # @return [::String]
361
401
  # Required. The processor resource name.
@@ -364,7 +404,9 @@ module Google
364
404
  extend ::Google::Protobuf::MessageExts::ClassMethods
365
405
  end
366
406
 
367
- # Request message for get processor version.
407
+ # Request message for the
408
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#get_processor_version GetProcessorVersion}
409
+ # method.
368
410
  # @!attribute [rw] name
369
411
  # @return [::String]
370
412
  # Required. The processor resource name.
@@ -382,8 +424,8 @@ module Google
382
424
  # @!attribute [rw] page_size
383
425
  # @return [::Integer]
384
426
  # The maximum number of processor versions to return.
385
- # If unspecified, at most 10 processor versions will be returned.
386
- # The maximum value is 20; values above 20 will be coerced to 20.
427
+ # If unspecified, at most `10` processor versions will be returned.
428
+ # The maximum value is `20`. Values above `20` will be coerced to `20`.
387
429
  # @!attribute [rw] page_token
388
430
  # @return [::String]
389
431
  # We will return the processor versions sorted by creation time. The page
@@ -393,7 +435,9 @@ module Google
393
435
  extend ::Google::Protobuf::MessageExts::ClassMethods
394
436
  end
395
437
 
396
- # Response message for list processors.
438
+ # Response message for the
439
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#list_processor_versions ListProcessorVersions}
440
+ # method.
397
441
  # @!attribute [rw] processor_versions
398
442
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>]
399
443
  # The list of processors.
@@ -405,7 +449,9 @@ module Google
405
449
  extend ::Google::Protobuf::MessageExts::ClassMethods
406
450
  end
407
451
 
408
- # Request message for the delete processor version method.
452
+ # Request message for the
453
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#delete_processor_version DeleteProcessorVersion}
454
+ # method.
409
455
  # @!attribute [rw] name
410
456
  # @return [::String]
411
457
  # Required. The processor version resource name to be deleted.
@@ -414,16 +460,20 @@ module Google
414
460
  extend ::Google::Protobuf::MessageExts::ClassMethods
415
461
  end
416
462
 
417
- # The long running operation metadata for delete processor version method.
463
+ # The long-running operation metadata for the
464
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#delete_processor_version DeleteProcessorVersion}
465
+ # method.
418
466
  # @!attribute [rw] common_metadata
419
467
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
420
- # The basic metadata of the long running operation.
468
+ # The basic metadata of the long-running operation.
421
469
  class DeleteProcessorVersionMetadata
422
470
  include ::Google::Protobuf::MessageExts
423
471
  extend ::Google::Protobuf::MessageExts::ClassMethods
424
472
  end
425
473
 
426
- # Request message for the deploy processor version method.
474
+ # Request message for the
475
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#deploy_processor_version DeployProcessorVersion}
476
+ # method.
427
477
  # @!attribute [rw] name
428
478
  # @return [::String]
429
479
  # Required. The processor version resource name to be deployed.
@@ -432,22 +482,28 @@ module Google
432
482
  extend ::Google::Protobuf::MessageExts::ClassMethods
433
483
  end
434
484
 
435
- # Response message for the deploy processor version method.
485
+ # Response message for the
486
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#deploy_processor_version DeployProcessorVersion}
487
+ # method.
436
488
  class DeployProcessorVersionResponse
437
489
  include ::Google::Protobuf::MessageExts
438
490
  extend ::Google::Protobuf::MessageExts::ClassMethods
439
491
  end
440
492
 
441
- # The long running operation metadata for deploy processor version method.
493
+ # The long-running operation metadata for the
494
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#deploy_processor_version DeployProcessorVersion}
495
+ # method.
442
496
  # @!attribute [rw] common_metadata
443
497
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
444
- # The basic metadata of the long running operation.
498
+ # The basic metadata of the long-running operation.
445
499
  class DeployProcessorVersionMetadata
446
500
  include ::Google::Protobuf::MessageExts
447
501
  extend ::Google::Protobuf::MessageExts::ClassMethods
448
502
  end
449
503
 
450
- # Request message for the undeploy processor version method.
504
+ # Request message for the
505
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#undeploy_processor_version UndeployProcessorVersion}
506
+ # method.
451
507
  # @!attribute [rw] name
452
508
  # @return [::String]
453
509
  # Required. The processor version resource name to be undeployed.
@@ -456,40 +512,49 @@ module Google
456
512
  extend ::Google::Protobuf::MessageExts::ClassMethods
457
513
  end
458
514
 
459
- # Response message for the undeploy processor version method.
515
+ # Response message for the
516
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#undeploy_processor_version UndeployProcessorVersion}
517
+ # method.
460
518
  class UndeployProcessorVersionResponse
461
519
  include ::Google::Protobuf::MessageExts
462
520
  extend ::Google::Protobuf::MessageExts::ClassMethods
463
521
  end
464
522
 
465
- # The long running operation metadata for the undeploy processor version
523
+ # The long-running operation metadata for the
524
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#undeploy_processor_version UndeployProcessorVersion}
466
525
  # method.
467
526
  # @!attribute [rw] common_metadata
468
527
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
469
- # The basic metadata of the long running operation.
528
+ # The basic metadata of the long-running operation.
470
529
  class UndeployProcessorVersionMetadata
471
530
  include ::Google::Protobuf::MessageExts
472
531
  extend ::Google::Protobuf::MessageExts::ClassMethods
473
532
  end
474
533
 
475
- # Request message for create a processor. Notice this request is sent to
476
- # a regionalized backend service, and if the processor type is not available
477
- # on that region, the creation will fail.
534
+ # Request message for the
535
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#create_processor CreateProcessor}
536
+ # method. Notice this request is sent to a regionalized backend service. If the
537
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorType ProcessorType} isn't
538
+ # available in that region, the creation fails.
478
539
  # @!attribute [rw] parent
479
540
  # @return [::String]
480
541
  # Required. The parent (project and location) under which to create the
481
542
  # processor. Format: `projects/{project}/locations/{location}`
482
543
  # @!attribute [rw] processor
483
544
  # @return [::Google::Cloud::DocumentAI::V1beta3::Processor]
484
- # Required. The processor to be created, requires [processor_type] and
485
- # [display_name] to be set. Also, the processor is under CMEK if CMEK fields
486
- # are set.
545
+ # Required. The processor to be created, requires
546
+ # {::Google::Cloud::DocumentAI::V1beta3::Processor#type Processor.type} and
547
+ # [Processor.display_name]][] to be set. Also, the
548
+ # {::Google::Cloud::DocumentAI::V1beta3::Processor#kms_key_name Processor.kms_key_name}
549
+ # field must be set if the processor is under CMEK.
487
550
  class CreateProcessorRequest
488
551
  include ::Google::Protobuf::MessageExts
489
552
  extend ::Google::Protobuf::MessageExts::ClassMethods
490
553
  end
491
554
 
492
- # Request message for the delete processor method.
555
+ # Request message for the
556
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#delete_processor DeleteProcessor}
557
+ # method.
493
558
  # @!attribute [rw] name
494
559
  # @return [::String]
495
560
  # Required. The processor resource name to be deleted.
@@ -498,16 +563,20 @@ module Google
498
563
  extend ::Google::Protobuf::MessageExts::ClassMethods
499
564
  end
500
565
 
501
- # The long running operation metadata for delete processor method.
566
+ # The long-running operation metadata for the
567
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#delete_processor DeleteProcessor}
568
+ # method.
502
569
  # @!attribute [rw] common_metadata
503
570
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
504
- # The basic metadata of the long running operation.
571
+ # The basic metadata of the long-running operation.
505
572
  class DeleteProcessorMetadata
506
573
  include ::Google::Protobuf::MessageExts
507
574
  extend ::Google::Protobuf::MessageExts::ClassMethods
508
575
  end
509
576
 
510
- # Request message for the enable processor method.
577
+ # Request message for the
578
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#enable_processor EnableProcessor}
579
+ # method.
511
580
  # @!attribute [rw] name
512
581
  # @return [::String]
513
582
  # Required. The processor resource name to be enabled.
@@ -516,23 +585,28 @@ module Google
516
585
  extend ::Google::Protobuf::MessageExts::ClassMethods
517
586
  end
518
587
 
519
- # Response message for the enable processor method.
520
- # Intentionally empty proto for adding fields in future.
588
+ # Response message for the
589
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#enable_processor EnableProcessor}
590
+ # method. Intentionally empty proto for adding fields in future.
521
591
  class EnableProcessorResponse
522
592
  include ::Google::Protobuf::MessageExts
523
593
  extend ::Google::Protobuf::MessageExts::ClassMethods
524
594
  end
525
595
 
526
- # The long running operation metadata for enable processor method.
596
+ # The long-running operation metadata for the
597
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#enable_processor EnableProcessor}
598
+ # method.
527
599
  # @!attribute [rw] common_metadata
528
600
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
529
- # The basic metadata of the long running operation.
601
+ # The basic metadata of the long-running operation.
530
602
  class EnableProcessorMetadata
531
603
  include ::Google::Protobuf::MessageExts
532
604
  extend ::Google::Protobuf::MessageExts::ClassMethods
533
605
  end
534
606
 
535
- # Request message for the disable processor method.
607
+ # Request message for the
608
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#disable_processor DisableProcessor}
609
+ # method.
536
610
  # @!attribute [rw] name
537
611
  # @return [::String]
538
612
  # Required. The processor resource name to be disabled.
@@ -541,23 +615,28 @@ module Google
541
615
  extend ::Google::Protobuf::MessageExts::ClassMethods
542
616
  end
543
617
 
544
- # Response message for the disable processor method.
545
- # Intentionally empty proto for adding fields in future.
618
+ # Response message for the
619
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#disable_processor DisableProcessor}
620
+ # method. Intentionally empty proto for adding fields in future.
546
621
  class DisableProcessorResponse
547
622
  include ::Google::Protobuf::MessageExts
548
623
  extend ::Google::Protobuf::MessageExts::ClassMethods
549
624
  end
550
625
 
551
- # The long running operation metadata for disable processor method.
626
+ # The long-running operation metadata for the
627
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#disable_processor DisableProcessor}
628
+ # method.
552
629
  # @!attribute [rw] common_metadata
553
630
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
554
- # The basic metadata of the long running operation.
631
+ # The basic metadata of the long-running operation.
555
632
  class DisableProcessorMetadata
556
633
  include ::Google::Protobuf::MessageExts
557
634
  extend ::Google::Protobuf::MessageExts::ClassMethods
558
635
  end
559
636
 
560
- # Request message for the set default processor version method.
637
+ # Request message for the
638
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#set_default_processor_version SetDefaultProcessorVersion}
639
+ # method.
561
640
  # @!attribute [rw] processor
562
641
  # @return [::String]
563
642
  # Required. The resource name of the
@@ -574,23 +653,31 @@ module Google
574
653
  extend ::Google::Protobuf::MessageExts::ClassMethods
575
654
  end
576
655
 
577
- # Response message for set default processor version method.
656
+ # Response message for the
657
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#set_default_processor_version SetDefaultProcessorVersion}
658
+ # method.
578
659
  class SetDefaultProcessorVersionResponse
579
660
  include ::Google::Protobuf::MessageExts
580
661
  extend ::Google::Protobuf::MessageExts::ClassMethods
581
662
  end
582
663
 
583
- # The long running operation metadata for set default processor version
664
+ # The long-running operation metadata for the
665
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#set_default_processor_version SetDefaultProcessorVersion}
584
666
  # method.
585
667
  # @!attribute [rw] common_metadata
586
668
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
587
- # The basic metadata of the long running operation.
669
+ # The basic metadata of the long-running operation.
588
670
  class SetDefaultProcessorVersionMetadata
589
671
  include ::Google::Protobuf::MessageExts
590
672
  extend ::Google::Protobuf::MessageExts::ClassMethods
591
673
  end
592
674
 
593
- # Request message for the create processor version method.
675
+ # Request message for the
676
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#train_processor_version TrainProcessorVersion}
677
+ # method.
678
+ # @!attribute [rw] custom_document_extraction_options
679
+ # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::CustomDocumentExtractionOptions]
680
+ # Options to control Custom Document Extraction (CDE) Processor.
594
681
  # @!attribute [rw] parent
595
682
  # @return [::String]
596
683
  # Required. The parent (project, location and processor) to create the new
@@ -604,7 +691,8 @@ module Google
604
691
  # Optional. The schema the processor version will be trained with.
605
692
  # @!attribute [rw] input_data
606
693
  # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::InputData]
607
- # Optional. The input data used to train the `ProcessorVersion`.
694
+ # Optional. The input data used to train the
695
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
608
696
  # @!attribute [rw] base_processor_version
609
697
  # @return [::String]
610
698
  # Optional. The processor version to use as a base for training. This
@@ -614,7 +702,8 @@ module Google
614
702
  include ::Google::Protobuf::MessageExts
615
703
  extend ::Google::Protobuf::MessageExts::ClassMethods
616
704
 
617
- # The input data used to train a new `ProcessorVersion`.
705
+ # The input data used to train a new
706
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
618
707
  # @!attribute [rw] training_documents
619
708
  # @return [::Google::Cloud::DocumentAI::V1beta3::BatchDocumentsInputConfig]
620
709
  # The documents used for training the new version.
@@ -625,9 +714,30 @@ module Google
625
714
  include ::Google::Protobuf::MessageExts
626
715
  extend ::Google::Protobuf::MessageExts::ClassMethods
627
716
  end
717
+
718
+ # Options to control the training of the Custom Document Extraction (CDE)
719
+ # Processor.
720
+ # @!attribute [rw] training_method
721
+ # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::CustomDocumentExtractionOptions::TrainingMethod]
722
+ # Training method to use for CDE training.
723
+ class CustomDocumentExtractionOptions
724
+ include ::Google::Protobuf::MessageExts
725
+ extend ::Google::Protobuf::MessageExts::ClassMethods
726
+
727
+ # Training Method for CDE. TRAINING_METHOD_UNSPECIFIED will fallback to
728
+ # MODEL_BASED.
729
+ module TrainingMethod
730
+ TRAINING_METHOD_UNSPECIFIED = 0
731
+
732
+ MODEL_BASED = 1
733
+
734
+ TEMPLATE_BASED = 2
735
+ end
736
+ end
628
737
  end
629
738
 
630
- # The response for the TrainProcessorVersion method.
739
+ # The response for
740
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#train_processor_version TrainProcessorVersion}.
631
741
  # @!attribute [rw] processor_version
632
742
  # @return [::String]
633
743
  # The resource name of the processor version produced by training.
@@ -639,7 +749,7 @@ module Google
639
749
  # The metadata that represents a processor version being created.
640
750
  # @!attribute [rw] common_metadata
641
751
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
642
- # The basic metadata of the long running operation.
752
+ # The basic metadata of the long-running operation.
643
753
  # @!attribute [rw] training_dataset_validation
644
754
  # @return [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionMetadata::DatasetValidation]
645
755
  # The training dataset validation information.
@@ -674,14 +784,17 @@ module Google
674
784
  end
675
785
  end
676
786
 
677
- # Request message for review document method.
787
+ # Request message for the
788
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#review_document ReviewDocument}
789
+ # method.
678
790
  # @!attribute [rw] inline_document
679
791
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
680
792
  # An inline document proto.
681
793
  # @!attribute [rw] human_review_config
682
794
  # @return [::String]
683
- # Required. The resource name of the HumanReviewConfig that the document will
684
- # be reviewed with.
795
+ # Required. The resource name of the
796
+ # [HumanReviewConfig][google.cloud.documentai.v1beta3.HumanReviewConfig] that
797
+ # the document will be reviewed with.
685
798
  # @!attribute [rw] document
686
799
  # @return [::Google::Cloud::DocumentAI::V1beta3::Document]
687
800
  # The document that needs human review.
@@ -709,7 +822,9 @@ module Google
709
822
  end
710
823
  end
711
824
 
712
- # Response message for review document method.
825
+ # Response message for the
826
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#review_document ReviewDocument}
827
+ # method.
713
828
  # @!attribute [rw] gcs_destination
714
829
  # @return [::String]
715
830
  # The Cloud Storage uri for the human reviewed document if the review is
@@ -737,7 +852,9 @@ module Google
737
852
  end
738
853
  end
739
854
 
740
- # The long running operation metadata for review document method.
855
+ # The long-running operation metadata for the
856
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#review_document ReviewDocument}
857
+ # method.
741
858
  # @!attribute [rw] state
742
859
  # @return [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentOperationMetadata::State]
743
860
  # Used only when Operation.done is false.
@@ -753,7 +870,7 @@ module Google
753
870
  # The last update time of the operation.
754
871
  # @!attribute [rw] common_metadata
755
872
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
756
- # The basic metadata of the long running operation.
873
+ # The basic metadata of the long-running operation.
757
874
  # @!attribute [rw] question_id
758
875
  # @return [::String]
759
876
  # The Crowd Compute question ID.
@@ -761,7 +878,7 @@ module Google
761
878
  include ::Google::Protobuf::MessageExts
762
879
  extend ::Google::Protobuf::MessageExts::ClassMethods
763
880
 
764
- # State of the longrunning operation.
881
+ # State of the long-running operation.
765
882
  module State
766
883
  # Unspecified state.
767
884
  STATE_UNSPECIFIED = 0
@@ -783,7 +900,9 @@ module Google
783
900
  end
784
901
  end
785
902
 
786
- # Evaluates the given ProcessorVersion against the supplied documents.
903
+ # Evaluates the given
904
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} against
905
+ # the supplied documents.
787
906
  # @!attribute [rw] processor_version
788
907
  # @return [::String]
789
908
  # Required. The resource name of the
@@ -799,16 +918,20 @@ module Google
799
918
  extend ::Google::Protobuf::MessageExts::ClassMethods
800
919
  end
801
920
 
802
- # Metadata of the EvaluateProcessorVersion method.
921
+ # Metadata of the
922
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#evaluate_processor_version EvaluateProcessorVersion}
923
+ # method.
803
924
  # @!attribute [rw] common_metadata
804
925
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
805
- # The basic metadata of the long running operation.
926
+ # The basic metadata of the long-running operation.
806
927
  class EvaluateProcessorVersionMetadata
807
928
  include ::Google::Protobuf::MessageExts
808
929
  extend ::Google::Protobuf::MessageExts::ClassMethods
809
930
  end
810
931
 
811
- # Metadata of the EvaluateProcessorVersion method.
932
+ # Response of the
933
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#evaluate_processor_version EvaluateProcessorVersion}
934
+ # method.
812
935
  # @!attribute [rw] evaluation
813
936
  # @return [::String]
814
937
  # The resource name of the created evaluation.
@@ -828,7 +951,8 @@ module Google
828
951
  extend ::Google::Protobuf::MessageExts::ClassMethods
829
952
  end
830
953
 
831
- # Retrieves a list of evaluations for a given ProcessorVersion.
954
+ # Retrieves a list of evaluations for a given
955
+ # {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
832
956
  # @!attribute [rw] parent
833
957
  # @return [::String]
834
958
  # Required. The resource name of the
@@ -838,8 +962,8 @@ module Google
838
962
  # @!attribute [rw] page_size
839
963
  # @return [::Integer]
840
964
  # The standard list page size.
841
- # If unspecified, at most 5 evaluations will be returned.
842
- # The maximum value is 100; values above 100 will be coerced to 100.
965
+ # If unspecified, at most `5` evaluations are returned.
966
+ # The maximum value is `100`. Values above `100` are coerced to `100`.
843
967
  # @!attribute [rw] page_token
844
968
  # @return [::String]
845
969
  # A page token, received from a previous `ListEvaluations` call.
@@ -849,7 +973,7 @@ module Google
849
973
  extend ::Google::Protobuf::MessageExts::ClassMethods
850
974
  end
851
975
 
852
- # The response from ListEvaluations.
976
+ # The response from `ListEvaluations`.
853
977
  # @!attribute [rw] evaluations
854
978
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::Evaluation>]
855
979
  # The evaluations requested.
@@ -862,19 +986,27 @@ module Google
862
986
  extend ::Google::Protobuf::MessageExts::ClassMethods
863
987
  end
864
988
 
865
- # The request message for the ImportProcessorVersion method.
866
- # This method requires Document AI Service Agent of the destination project in
867
- # the source project's IAM with [Document AI Editor
868
- # role](https://cloud.google.com/document-ai/docs/access-control/iam-roles).
989
+ # The request message for the
990
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#import_processor_version ImportProcessorVersion}
991
+ # method. Requirements:
869
992
  #
870
- # The destination project is specified as part of the `parent` field.
871
- # The source project is specified as part of `source` field.
993
+ # - The source processor version and destination processor
994
+ # must be in the same location.
995
+ # - The Document AI [Service
996
+ # Agent](https://cloud.google.com/iam/docs/service-agents) of the destination
997
+ # project must have [Document AI Editor
998
+ # role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on
999
+ # the source project.
872
1000
  #
873
- # The Service Agent for Document AI can be found in
874
- # https://cloud.google.com/iam/docs/service-agents.
1001
+ # The destination project is specified as part of the
1002
+ # {::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest#parent parent}
1003
+ # field. The source project is specified as part of the
1004
+ # {::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest#processor_version_source source}
1005
+ # field.
875
1006
  # @!attribute [rw] processor_version_source
876
1007
  # @return [::String]
877
- # The source processor version to import from.
1008
+ # The source processor version to import from. The source processor version
1009
+ # and destination processor need to be in the same environment and region.
878
1010
  # @!attribute [rw] parent
879
1011
  # @return [::String]
880
1012
  # Required. The destination processor name to create the processor version
@@ -885,7 +1017,9 @@ module Google
885
1017
  extend ::Google::Protobuf::MessageExts::ClassMethods
886
1018
  end
887
1019
 
888
- # The response message for the ImportProcessorVersion method.
1020
+ # The response message for the
1021
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#import_processor_version ImportProcessorVersion}
1022
+ # method.
889
1023
  # @!attribute [rw] processor_version
890
1024
  # @return [::String]
891
1025
  # The destination processor version name.
@@ -894,11 +1028,12 @@ module Google
894
1028
  extend ::Google::Protobuf::MessageExts::ClassMethods
895
1029
  end
896
1030
 
897
- # The long running operation metadata for the ImportProcessorVersion
1031
+ # The long-running operation metadata for the
1032
+ # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#import_processor_version ImportProcessorVersion}
898
1033
  # method.
899
1034
  # @!attribute [rw] common_metadata
900
1035
  # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
901
- # The basic metadata for the long running operation.
1036
+ # The basic metadata for the long-running operation.
902
1037
  class ImportProcessorVersionMetadata
903
1038
  include ::Google::Protobuf::MessageExts
904
1039
  extend ::Google::Protobuf::MessageExts::ClassMethods