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