google-cloud-document_ai-v1 0.12.0 → 0.14.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +66 -40
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +10 -1
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +501 -39
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +75 -0
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest.rb +1 -1
- data/lib/google/cloud/document_ai/v1/document_processor_service.rb +1 -1
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/document_io_pb.rb +3 -1
- data/lib/google/cloud/documentai/v1/document_pb.rb +2 -1
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +5 -2
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +8 -6
- data/lib/google/cloud/documentai/v1/processor_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/documentai/v1/document.rb +88 -27
- data/proto_docs/google/cloud/documentai/v1/document_io.rb +47 -0
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +230 -98
- data/proto_docs/google/cloud/documentai/v1/document_schema.rb +6 -7
- data/proto_docs/google/cloud/documentai/v1/processor.rb +12 -10
- data/proto_docs/google/cloud/documentai/v1/processor_type.rb +3 -2
- metadata +5 -5
@@ -21,13 +21,28 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module DocumentAI
|
23
23
|
module V1
|
24
|
-
#
|
24
|
+
# Options for Process API
|
25
|
+
# @!attribute [rw] ocr_config
|
26
|
+
# @return [::Google::Cloud::DocumentAI::V1::OcrConfig]
|
27
|
+
# Only applicable to `OCR_PROCESSOR`. Returns error if set on other
|
28
|
+
# processor types.
|
29
|
+
class ProcessOptions
|
30
|
+
include ::Google::Protobuf::MessageExts
|
31
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
32
|
+
end
|
33
|
+
|
34
|
+
# Request message for the
|
35
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#process_document ProcessDocument}
|
36
|
+
# method.
|
25
37
|
# @!attribute [rw] inline_document
|
26
38
|
# @return [::Google::Cloud::DocumentAI::V1::Document]
|
27
39
|
# An inline document proto.
|
28
40
|
# @!attribute [rw] raw_document
|
29
41
|
# @return [::Google::Cloud::DocumentAI::V1::RawDocument]
|
30
42
|
# A raw document content (bytes).
|
43
|
+
# @!attribute [rw] gcs_document
|
44
|
+
# @return [::Google::Cloud::DocumentAI::V1::GcsDocument]
|
45
|
+
# A raw document on Google Cloud Storage.
|
31
46
|
# @!attribute [rw] name
|
32
47
|
# @return [::String]
|
33
48
|
# Required. The resource name of the
|
@@ -42,13 +57,17 @@ module Google
|
|
42
57
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
43
58
|
# @!attribute [rw] skip_human_review
|
44
59
|
# @return [::Boolean]
|
45
|
-
# Whether
|
46
|
-
# false
|
60
|
+
# Whether human review should be skipped for this request. Default to
|
61
|
+
# `false`.
|
47
62
|
# @!attribute [rw] field_mask
|
48
63
|
# @return [::Google::Protobuf::FieldMask]
|
49
|
-
# Specifies which fields to include in
|
50
|
-
#
|
51
|
-
#
|
64
|
+
# Specifies which fields to include in the
|
65
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessResponse#document ProcessResponse.document}
|
66
|
+
# output. Only supports top-level document and pages field, so it must be in
|
67
|
+
# the form of `{document_field_name}` or `pages.{page_field_name}`.
|
68
|
+
# @!attribute [rw] process_options
|
69
|
+
# @return [::Google::Cloud::DocumentAI::V1::ProcessOptions]
|
70
|
+
# Inference-time options for the process API
|
52
71
|
class ProcessRequest
|
53
72
|
include ::Google::Protobuf::MessageExts
|
54
73
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -64,9 +83,11 @@ module Google
|
|
64
83
|
# @!attribute [rw] human_review_operation
|
65
84
|
# @return [::String]
|
66
85
|
# The name of the operation triggered by the processed document. This field
|
67
|
-
# is populated only when the
|
68
|
-
#
|
69
|
-
#
|
86
|
+
# is populated only when the
|
87
|
+
# {::Google::Cloud::DocumentAI::V1::HumanReviewStatus#state state} is
|
88
|
+
# `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as
|
89
|
+
# the long-running operation returned by
|
90
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#review_document ReviewDocument}.
|
70
91
|
class HumanReviewStatus
|
71
92
|
include ::Google::Protobuf::MessageExts
|
72
93
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -77,7 +98,7 @@ module Google
|
|
77
98
|
STATE_UNSPECIFIED = 0
|
78
99
|
|
79
100
|
# Human review is skipped for the document. This can happen because human
|
80
|
-
# review
|
101
|
+
# review isn't enabled on the processor or the processing request has
|
81
102
|
# been set to skip this document.
|
82
103
|
SKIPPED = 1
|
83
104
|
|
@@ -88,12 +109,15 @@ module Google
|
|
88
109
|
IN_PROGRESS = 3
|
89
110
|
|
90
111
|
# Some error happened during triggering human review, see the
|
91
|
-
#
|
112
|
+
# {::Google::Cloud::DocumentAI::V1::HumanReviewStatus#state_message state_message}
|
113
|
+
# for details.
|
92
114
|
ERROR = 4
|
93
115
|
end
|
94
116
|
end
|
95
117
|
|
96
|
-
# Response message for the
|
118
|
+
# Response message for the
|
119
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#process_document ProcessDocument}
|
120
|
+
# method.
|
97
121
|
# @!attribute [rw] document
|
98
122
|
# @return [::Google::Cloud::DocumentAI::V1::Document]
|
99
123
|
# The document payload, will populate fields based on the processor's
|
@@ -106,7 +130,8 @@ module Google
|
|
106
130
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
107
131
|
end
|
108
132
|
|
109
|
-
# Request message for
|
133
|
+
# Request message for
|
134
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
|
110
135
|
# @!attribute [rw] name
|
111
136
|
# @return [::String]
|
112
137
|
# Required. The resource name of
|
@@ -117,26 +142,35 @@ module Google
|
|
117
142
|
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
118
143
|
# @!attribute [rw] input_documents
|
119
144
|
# @return [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig]
|
120
|
-
# The input documents for
|
145
|
+
# The input documents for the
|
146
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
|
147
|
+
# method.
|
121
148
|
# @!attribute [rw] document_output_config
|
122
149
|
# @return [::Google::Cloud::DocumentAI::V1::DocumentOutputConfig]
|
123
|
-
# The
|
150
|
+
# The output configuration for the
|
151
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}
|
152
|
+
# method.
|
124
153
|
# @!attribute [rw] skip_human_review
|
125
154
|
# @return [::Boolean]
|
126
|
-
# Whether
|
127
|
-
# false
|
155
|
+
# Whether human review should be skipped for this request. Default to
|
156
|
+
# `false`.
|
157
|
+
# @!attribute [rw] process_options
|
158
|
+
# @return [::Google::Cloud::DocumentAI::V1::ProcessOptions]
|
159
|
+
# Inference-time options for the process API
|
128
160
|
class BatchProcessRequest
|
129
161
|
include ::Google::Protobuf::MessageExts
|
130
162
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
131
163
|
end
|
132
164
|
|
133
|
-
# Response message for
|
165
|
+
# Response message for
|
166
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
|
134
167
|
class BatchProcessResponse
|
135
168
|
include ::Google::Protobuf::MessageExts
|
136
169
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
137
170
|
end
|
138
171
|
|
139
|
-
# The long
|
172
|
+
# The long-running operation metadata for
|
173
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#batch_process_documents BatchProcessDocuments}.
|
140
174
|
# @!attribute [rw] state
|
141
175
|
# @return [::Google::Cloud::DocumentAI::V1::BatchProcessMetadata::State]
|
142
176
|
# The state of the current batch processing.
|
@@ -160,16 +194,16 @@ module Google
|
|
160
194
|
# The status of a each individual document in the batch process.
|
161
195
|
# @!attribute [rw] input_gcs_source
|
162
196
|
# @return [::String]
|
163
|
-
# The source of the document, same as the
|
164
|
-
#
|
165
|
-
#
|
166
|
-
# document during the process.
|
197
|
+
# The source of the document, same as the
|
198
|
+
# {::Google::Cloud::DocumentAI::V1::BatchProcessMetadata::IndividualProcessStatus#input_gcs_source input_gcs_source}
|
199
|
+
# field in the request when the batch process started.
|
167
200
|
# @!attribute [rw] status
|
168
201
|
# @return [::Google::Rpc::Status]
|
169
202
|
# The status processing the document.
|
170
203
|
# @!attribute [rw] output_gcs_destination
|
171
204
|
# @return [::String]
|
172
|
-
# The
|
205
|
+
# The Cloud Storage output destination (in the request as
|
206
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentOutputConfig::GcsOutputConfig#gcs_uri DocumentOutputConfig.GcsOutputConfig.gcs_uri})
|
173
207
|
# of the processed document if it was successful, otherwise empty.
|
174
208
|
# @!attribute [rw] human_review_status
|
175
209
|
# @return [::Google::Cloud::DocumentAI::V1::HumanReviewStatus]
|
@@ -204,18 +238,22 @@ module Google
|
|
204
238
|
end
|
205
239
|
end
|
206
240
|
|
207
|
-
# Request message for
|
241
|
+
# Request message for the
|
242
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}
|
243
|
+
# method. Some processor types may require the project be added to an
|
244
|
+
# allowlist.
|
208
245
|
# @!attribute [rw] parent
|
209
246
|
# @return [::String]
|
210
|
-
# Required. The
|
211
|
-
#
|
212
|
-
# Format: `projects/{project}/locations/{location}`
|
247
|
+
# Required. The location of processor types to list.
|
248
|
+
# Format: `projects/{project}/locations/{location}`.
|
213
249
|
class FetchProcessorTypesRequest
|
214
250
|
include ::Google::Protobuf::MessageExts
|
215
251
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
216
252
|
end
|
217
253
|
|
218
|
-
# Response message for
|
254
|
+
# Response message for the
|
255
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}
|
256
|
+
# method.
|
219
257
|
# @!attribute [rw] processor_types
|
220
258
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorType>]
|
221
259
|
# The list of processor types.
|
@@ -224,17 +262,19 @@ module Google
|
|
224
262
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
225
263
|
end
|
226
264
|
|
227
|
-
# Request message for
|
265
|
+
# Request message for the
|
266
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
|
267
|
+
# method. Some processor types may require the project be added to an
|
268
|
+
# allowlist.
|
228
269
|
# @!attribute [rw] parent
|
229
270
|
# @return [::String]
|
230
|
-
# Required. The location of processor
|
231
|
-
#
|
232
|
-
# Format: `projects/{project}/locations/{location}`
|
271
|
+
# Required. The location of processor types to list.
|
272
|
+
# Format: `projects/{project}/locations/{location}`.
|
233
273
|
# @!attribute [rw] page_size
|
234
274
|
# @return [::Integer]
|
235
275
|
# The maximum number of processor types to return.
|
236
|
-
# If unspecified, at most 100 processor types will be returned.
|
237
|
-
# The maximum value is 500
|
276
|
+
# If unspecified, at most `100` processor types will be returned.
|
277
|
+
# The maximum value is `500`. Values above `500` will be coerced to `500`.
|
238
278
|
# @!attribute [rw] page_token
|
239
279
|
# @return [::String]
|
240
280
|
# Used to retrieve the next page of results, empty if at the end of the list.
|
@@ -243,7 +283,9 @@ module Google
|
|
243
283
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
244
284
|
end
|
245
285
|
|
246
|
-
# Response message for
|
286
|
+
# Response message for the
|
287
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processor_types ListProcessorTypes}
|
288
|
+
# method.
|
247
289
|
# @!attribute [rw] processor_types
|
248
290
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorType>]
|
249
291
|
# The processor types.
|
@@ -263,8 +305,8 @@ module Google
|
|
263
305
|
# @!attribute [rw] page_size
|
264
306
|
# @return [::Integer]
|
265
307
|
# The maximum number of processors to return.
|
266
|
-
# If unspecified, at most 50 processors will be returned.
|
267
|
-
# The maximum value is 100
|
308
|
+
# If unspecified, at most `50` processors will be returned.
|
309
|
+
# The maximum value is `100`. Values above `100` will be coerced to `100`.
|
268
310
|
# @!attribute [rw] page_token
|
269
311
|
# @return [::String]
|
270
312
|
# We will return the processors sorted by creation time. The page token
|
@@ -274,7 +316,9 @@ module Google
|
|
274
316
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
275
317
|
end
|
276
318
|
|
277
|
-
# Response message for
|
319
|
+
# Response message for the
|
320
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processors ListProcessors}
|
321
|
+
# method.
|
278
322
|
# @!attribute [rw] processors
|
279
323
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Processor>]
|
280
324
|
# The list of processors.
|
@@ -286,7 +330,9 @@ module Google
|
|
286
330
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
287
331
|
end
|
288
332
|
|
289
|
-
# Request message for
|
333
|
+
# Request message for the
|
334
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#get_processor_type GetProcessorType}
|
335
|
+
# method.
|
290
336
|
# @!attribute [rw] name
|
291
337
|
# @return [::String]
|
292
338
|
# Required. The processor type resource name.
|
@@ -295,7 +341,9 @@ module Google
|
|
295
341
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
296
342
|
end
|
297
343
|
|
298
|
-
# Request message for
|
344
|
+
# Request message for the
|
345
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#get_processor GetProcessor}
|
346
|
+
# method.
|
299
347
|
# @!attribute [rw] name
|
300
348
|
# @return [::String]
|
301
349
|
# Required. The processor resource name.
|
@@ -304,7 +352,9 @@ module Google
|
|
304
352
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
305
353
|
end
|
306
354
|
|
307
|
-
# Request message for
|
355
|
+
# Request message for the
|
356
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#get_processor_version GetProcessorVersion}
|
357
|
+
# method.
|
308
358
|
# @!attribute [rw] name
|
309
359
|
# @return [::String]
|
310
360
|
# Required. The processor resource name.
|
@@ -322,8 +372,8 @@ module Google
|
|
322
372
|
# @!attribute [rw] page_size
|
323
373
|
# @return [::Integer]
|
324
374
|
# The maximum number of processor versions to return.
|
325
|
-
# If unspecified, at most 10 processor versions will be returned.
|
326
|
-
# The maximum value is 20
|
375
|
+
# If unspecified, at most `10` processor versions will be returned.
|
376
|
+
# The maximum value is `20`. Values above `20` will be coerced to `20`.
|
327
377
|
# @!attribute [rw] page_token
|
328
378
|
# @return [::String]
|
329
379
|
# We will return the processor versions sorted by creation time. The page
|
@@ -333,7 +383,9 @@ module Google
|
|
333
383
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
334
384
|
end
|
335
385
|
|
336
|
-
# Response message for
|
386
|
+
# Response message for the
|
387
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#list_processor_versions ListProcessorVersions}
|
388
|
+
# method.
|
337
389
|
# @!attribute [rw] processor_versions
|
338
390
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorVersion>]
|
339
391
|
# The list of processors.
|
@@ -345,7 +397,9 @@ module Google
|
|
345
397
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
346
398
|
end
|
347
399
|
|
348
|
-
# Request message for the
|
400
|
+
# Request message for the
|
401
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#delete_processor_version DeleteProcessorVersion}
|
402
|
+
# method.
|
349
403
|
# @!attribute [rw] name
|
350
404
|
# @return [::String]
|
351
405
|
# Required. The processor version resource name to be deleted.
|
@@ -354,16 +408,20 @@ module Google
|
|
354
408
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
355
409
|
end
|
356
410
|
|
357
|
-
# The long
|
411
|
+
# The long-running operation metadata for the
|
412
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#delete_processor_version DeleteProcessorVersion}
|
413
|
+
# method.
|
358
414
|
# @!attribute [rw] common_metadata
|
359
415
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
360
|
-
# The basic metadata of the long
|
416
|
+
# The basic metadata of the long-running operation.
|
361
417
|
class DeleteProcessorVersionMetadata
|
362
418
|
include ::Google::Protobuf::MessageExts
|
363
419
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
364
420
|
end
|
365
421
|
|
366
|
-
# Request message for the
|
422
|
+
# Request message for the
|
423
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#deploy_processor_version DeployProcessorVersion}
|
424
|
+
# method.
|
367
425
|
# @!attribute [rw] name
|
368
426
|
# @return [::String]
|
369
427
|
# Required. The processor version resource name to be deployed.
|
@@ -372,22 +430,28 @@ module Google
|
|
372
430
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
373
431
|
end
|
374
432
|
|
375
|
-
# Response message for the
|
433
|
+
# Response message for the
|
434
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#deploy_processor_version DeployProcessorVersion}
|
435
|
+
# method.
|
376
436
|
class DeployProcessorVersionResponse
|
377
437
|
include ::Google::Protobuf::MessageExts
|
378
438
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
379
439
|
end
|
380
440
|
|
381
|
-
# The long
|
441
|
+
# The long-running operation metadata for the
|
442
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#deploy_processor_version DeployProcessorVersion}
|
443
|
+
# method.
|
382
444
|
# @!attribute [rw] common_metadata
|
383
445
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
384
|
-
# The basic metadata of the long
|
446
|
+
# The basic metadata of the long-running operation.
|
385
447
|
class DeployProcessorVersionMetadata
|
386
448
|
include ::Google::Protobuf::MessageExts
|
387
449
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
388
450
|
end
|
389
451
|
|
390
|
-
# Request message for the
|
452
|
+
# Request message for the
|
453
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#undeploy_processor_version UndeployProcessorVersion}
|
454
|
+
# method.
|
391
455
|
# @!attribute [rw] name
|
392
456
|
# @return [::String]
|
393
457
|
# Required. The processor version resource name to be undeployed.
|
@@ -396,40 +460,49 @@ module Google
|
|
396
460
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
397
461
|
end
|
398
462
|
|
399
|
-
# Response message for the
|
463
|
+
# Response message for the
|
464
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#undeploy_processor_version UndeployProcessorVersion}
|
465
|
+
# method.
|
400
466
|
class UndeployProcessorVersionResponse
|
401
467
|
include ::Google::Protobuf::MessageExts
|
402
468
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
403
469
|
end
|
404
470
|
|
405
|
-
# The long
|
471
|
+
# The long-running operation metadata for the
|
472
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#undeploy_processor_version UndeployProcessorVersion}
|
406
473
|
# method.
|
407
474
|
# @!attribute [rw] common_metadata
|
408
475
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
409
|
-
# The basic metadata of the long
|
476
|
+
# The basic metadata of the long-running operation.
|
410
477
|
class UndeployProcessorVersionMetadata
|
411
478
|
include ::Google::Protobuf::MessageExts
|
412
479
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
413
480
|
end
|
414
481
|
|
415
|
-
# Request message for
|
416
|
-
#
|
417
|
-
#
|
482
|
+
# Request message for the
|
483
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#create_processor CreateProcessor}
|
484
|
+
# method. Notice this request is sent to a regionalized backend service. If the
|
485
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorType ProcessorType} isn't available in
|
486
|
+
# that region, the creation fails.
|
418
487
|
# @!attribute [rw] parent
|
419
488
|
# @return [::String]
|
420
489
|
# Required. The parent (project and location) under which to create the
|
421
490
|
# processor. Format: `projects/{project}/locations/{location}`
|
422
491
|
# @!attribute [rw] processor
|
423
492
|
# @return [::Google::Cloud::DocumentAI::V1::Processor]
|
424
|
-
# Required. The processor to be created, requires
|
425
|
-
#
|
426
|
-
#
|
493
|
+
# Required. The processor to be created, requires
|
494
|
+
# {::Google::Cloud::DocumentAI::V1::Processor#type Processor.type} and
|
495
|
+
# [Processor.display_name]][] to be set. Also, the
|
496
|
+
# {::Google::Cloud::DocumentAI::V1::Processor#kms_key_name Processor.kms_key_name}
|
497
|
+
# field must be set if the processor is under CMEK.
|
427
498
|
class CreateProcessorRequest
|
428
499
|
include ::Google::Protobuf::MessageExts
|
429
500
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
430
501
|
end
|
431
502
|
|
432
|
-
# Request message for the
|
503
|
+
# Request message for the
|
504
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#delete_processor DeleteProcessor}
|
505
|
+
# method.
|
433
506
|
# @!attribute [rw] name
|
434
507
|
# @return [::String]
|
435
508
|
# Required. The processor resource name to be deleted.
|
@@ -438,16 +511,20 @@ module Google
|
|
438
511
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
439
512
|
end
|
440
513
|
|
441
|
-
# The long
|
514
|
+
# The long-running operation metadata for the
|
515
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#delete_processor DeleteProcessor}
|
516
|
+
# method.
|
442
517
|
# @!attribute [rw] common_metadata
|
443
518
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
444
|
-
# The basic metadata of the long
|
519
|
+
# The basic metadata of the long-running operation.
|
445
520
|
class DeleteProcessorMetadata
|
446
521
|
include ::Google::Protobuf::MessageExts
|
447
522
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
448
523
|
end
|
449
524
|
|
450
|
-
# Request message for the
|
525
|
+
# Request message for the
|
526
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#enable_processor EnableProcessor}
|
527
|
+
# method.
|
451
528
|
# @!attribute [rw] name
|
452
529
|
# @return [::String]
|
453
530
|
# Required. The processor resource name to be enabled.
|
@@ -456,23 +533,28 @@ module Google
|
|
456
533
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
457
534
|
end
|
458
535
|
|
459
|
-
# Response message for the
|
460
|
-
#
|
536
|
+
# Response message for the
|
537
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#enable_processor EnableProcessor}
|
538
|
+
# method. Intentionally empty proto for adding fields in future.
|
461
539
|
class EnableProcessorResponse
|
462
540
|
include ::Google::Protobuf::MessageExts
|
463
541
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
464
542
|
end
|
465
543
|
|
466
|
-
# The long
|
544
|
+
# The long-running operation metadata for the
|
545
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#enable_processor EnableProcessor}
|
546
|
+
# method.
|
467
547
|
# @!attribute [rw] common_metadata
|
468
548
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
469
|
-
# The basic metadata of the long
|
549
|
+
# The basic metadata of the long-running operation.
|
470
550
|
class EnableProcessorMetadata
|
471
551
|
include ::Google::Protobuf::MessageExts
|
472
552
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
473
553
|
end
|
474
554
|
|
475
|
-
# Request message for the
|
555
|
+
# Request message for the
|
556
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#disable_processor DisableProcessor}
|
557
|
+
# method.
|
476
558
|
# @!attribute [rw] name
|
477
559
|
# @return [::String]
|
478
560
|
# Required. The processor resource name to be disabled.
|
@@ -481,23 +563,28 @@ module Google
|
|
481
563
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
482
564
|
end
|
483
565
|
|
484
|
-
# Response message for the
|
485
|
-
#
|
566
|
+
# Response message for the
|
567
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#disable_processor DisableProcessor}
|
568
|
+
# method. Intentionally empty proto for adding fields in future.
|
486
569
|
class DisableProcessorResponse
|
487
570
|
include ::Google::Protobuf::MessageExts
|
488
571
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
489
572
|
end
|
490
573
|
|
491
|
-
# The long
|
574
|
+
# The long-running operation metadata for the
|
575
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#disable_processor DisableProcessor}
|
576
|
+
# method.
|
492
577
|
# @!attribute [rw] common_metadata
|
493
578
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
494
|
-
# The basic metadata of the long
|
579
|
+
# The basic metadata of the long-running operation.
|
495
580
|
class DisableProcessorMetadata
|
496
581
|
include ::Google::Protobuf::MessageExts
|
497
582
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
498
583
|
end
|
499
584
|
|
500
|
-
# Request message for the
|
585
|
+
# Request message for the
|
586
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#set_default_processor_version SetDefaultProcessorVersion}
|
587
|
+
# method.
|
501
588
|
# @!attribute [rw] processor
|
502
589
|
# @return [::String]
|
503
590
|
# Required. The resource name of the
|
@@ -514,23 +601,31 @@ module Google
|
|
514
601
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
515
602
|
end
|
516
603
|
|
517
|
-
# Response message for
|
604
|
+
# Response message for the
|
605
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#set_default_processor_version SetDefaultProcessorVersion}
|
606
|
+
# method.
|
518
607
|
class SetDefaultProcessorVersionResponse
|
519
608
|
include ::Google::Protobuf::MessageExts
|
520
609
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
521
610
|
end
|
522
611
|
|
523
|
-
# The long
|
612
|
+
# The long-running operation metadata for the
|
613
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#set_default_processor_version SetDefaultProcessorVersion}
|
524
614
|
# method.
|
525
615
|
# @!attribute [rw] common_metadata
|
526
616
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
527
|
-
# The basic metadata of the long
|
617
|
+
# The basic metadata of the long-running operation.
|
528
618
|
class SetDefaultProcessorVersionMetadata
|
529
619
|
include ::Google::Protobuf::MessageExts
|
530
620
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
531
621
|
end
|
532
622
|
|
533
|
-
# Request message for the
|
623
|
+
# Request message for the
|
624
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#train_processor_version TrainProcessorVersion}
|
625
|
+
# method.
|
626
|
+
# @!attribute [rw] custom_document_extraction_options
|
627
|
+
# @return [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::CustomDocumentExtractionOptions]
|
628
|
+
# Options to control Custom Document Extraction (CDE) Processor.
|
534
629
|
# @!attribute [rw] parent
|
535
630
|
# @return [::String]
|
536
631
|
# Required. The parent (project, location and processor) to create the new
|
@@ -544,7 +639,8 @@ module Google
|
|
544
639
|
# Optional. The schema the processor version will be trained with.
|
545
640
|
# @!attribute [rw] input_data
|
546
641
|
# @return [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::InputData]
|
547
|
-
# Optional. The input data used to train the
|
642
|
+
# Optional. The input data used to train the
|
643
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
|
548
644
|
# @!attribute [rw] base_processor_version
|
549
645
|
# @return [::String]
|
550
646
|
# Optional. The processor version to use as a base for training. This
|
@@ -554,7 +650,8 @@ module Google
|
|
554
650
|
include ::Google::Protobuf::MessageExts
|
555
651
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
556
652
|
|
557
|
-
# The input data used to train a new
|
653
|
+
# The input data used to train a new
|
654
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
|
558
655
|
# @!attribute [rw] training_documents
|
559
656
|
# @return [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig]
|
560
657
|
# The documents used for training the new version.
|
@@ -565,9 +662,30 @@ module Google
|
|
565
662
|
include ::Google::Protobuf::MessageExts
|
566
663
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
567
664
|
end
|
665
|
+
|
666
|
+
# Options to control the training of the Custom Document Extraction (CDE)
|
667
|
+
# Processor.
|
668
|
+
# @!attribute [rw] training_method
|
669
|
+
# @return [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::CustomDocumentExtractionOptions::TrainingMethod]
|
670
|
+
# Training method to use for CDE training.
|
671
|
+
class CustomDocumentExtractionOptions
|
672
|
+
include ::Google::Protobuf::MessageExts
|
673
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
674
|
+
|
675
|
+
# Training Method for CDE. TRAINING_METHOD_UNSPECIFIED will fallback to
|
676
|
+
# MODEL_BASED.
|
677
|
+
module TrainingMethod
|
678
|
+
TRAINING_METHOD_UNSPECIFIED = 0
|
679
|
+
|
680
|
+
MODEL_BASED = 1
|
681
|
+
|
682
|
+
TEMPLATE_BASED = 2
|
683
|
+
end
|
684
|
+
end
|
568
685
|
end
|
569
686
|
|
570
|
-
# The response for
|
687
|
+
# The response for
|
688
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#train_processor_version TrainProcessorVersion}.
|
571
689
|
# @!attribute [rw] processor_version
|
572
690
|
# @return [::String]
|
573
691
|
# The resource name of the processor version produced by training.
|
@@ -579,7 +697,7 @@ module Google
|
|
579
697
|
# The metadata that represents a processor version being created.
|
580
698
|
# @!attribute [rw] common_metadata
|
581
699
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
582
|
-
# The basic metadata of the long
|
700
|
+
# The basic metadata of the long-running operation.
|
583
701
|
# @!attribute [rw] training_dataset_validation
|
584
702
|
# @return [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionMetadata::DatasetValidation]
|
585
703
|
# The training dataset validation information.
|
@@ -614,14 +732,17 @@ module Google
|
|
614
732
|
end
|
615
733
|
end
|
616
734
|
|
617
|
-
# Request message for
|
735
|
+
# Request message for the
|
736
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#review_document ReviewDocument}
|
737
|
+
# method.
|
618
738
|
# @!attribute [rw] inline_document
|
619
739
|
# @return [::Google::Cloud::DocumentAI::V1::Document]
|
620
740
|
# An inline document proto.
|
621
741
|
# @!attribute [rw] human_review_config
|
622
742
|
# @return [::String]
|
623
|
-
# Required. The resource name of the
|
624
|
-
#
|
743
|
+
# Required. The resource name of the
|
744
|
+
# [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
|
745
|
+
# document will be reviewed with.
|
625
746
|
# @!attribute [rw] enable_schema_validation
|
626
747
|
# @return [::Boolean]
|
627
748
|
# Whether the validation should be performed on the ad-hoc review request.
|
@@ -646,7 +767,9 @@ module Google
|
|
646
767
|
end
|
647
768
|
end
|
648
769
|
|
649
|
-
# Response message for
|
770
|
+
# Response message for the
|
771
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#review_document ReviewDocument}
|
772
|
+
# method.
|
650
773
|
# @!attribute [rw] gcs_destination
|
651
774
|
# @return [::String]
|
652
775
|
# The Cloud Storage uri for the human reviewed document if the review is
|
@@ -674,10 +797,12 @@ module Google
|
|
674
797
|
end
|
675
798
|
end
|
676
799
|
|
677
|
-
# The long
|
800
|
+
# The long-running operation metadata for the
|
801
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#review_document ReviewDocument}
|
802
|
+
# method.
|
678
803
|
# @!attribute [rw] common_metadata
|
679
804
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
680
|
-
# The basic metadata of the long
|
805
|
+
# The basic metadata of the long-running operation.
|
681
806
|
# @!attribute [rw] question_id
|
682
807
|
# @return [::String]
|
683
808
|
# The Crowd Compute question ID.
|
@@ -686,7 +811,9 @@ module Google
|
|
686
811
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
687
812
|
end
|
688
813
|
|
689
|
-
# Evaluates the given
|
814
|
+
# Evaluates the given
|
815
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} against the
|
816
|
+
# supplied documents.
|
690
817
|
# @!attribute [rw] processor_version
|
691
818
|
# @return [::String]
|
692
819
|
# Required. The resource name of the
|
@@ -702,16 +829,20 @@ module Google
|
|
702
829
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
703
830
|
end
|
704
831
|
|
705
|
-
# Metadata of the
|
832
|
+
# Metadata of the
|
833
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#evaluate_processor_version EvaluateProcessorVersion}
|
834
|
+
# method.
|
706
835
|
# @!attribute [rw] common_metadata
|
707
836
|
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
708
|
-
# The basic metadata of the long
|
837
|
+
# The basic metadata of the long-running operation.
|
709
838
|
class EvaluateProcessorVersionMetadata
|
710
839
|
include ::Google::Protobuf::MessageExts
|
711
840
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
712
841
|
end
|
713
842
|
|
714
|
-
#
|
843
|
+
# Response of the
|
844
|
+
# {::Google::Cloud::DocumentAI::V1::DocumentProcessorService::Client#evaluate_processor_version EvaluateProcessorVersion}
|
845
|
+
# method.
|
715
846
|
# @!attribute [rw] evaluation
|
716
847
|
# @return [::String]
|
717
848
|
# The resource name of the created evaluation.
|
@@ -731,7 +862,8 @@ module Google
|
|
731
862
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
732
863
|
end
|
733
864
|
|
734
|
-
# Retrieves a list of evaluations for a given
|
865
|
+
# Retrieves a list of evaluations for a given
|
866
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
|
735
867
|
# @!attribute [rw] parent
|
736
868
|
# @return [::String]
|
737
869
|
# Required. The resource name of the
|
@@ -741,8 +873,8 @@ module Google
|
|
741
873
|
# @!attribute [rw] page_size
|
742
874
|
# @return [::Integer]
|
743
875
|
# The standard list page size.
|
744
|
-
# If unspecified, at most 5 evaluations
|
745
|
-
# The maximum value is 100
|
876
|
+
# If unspecified, at most `5` evaluations are returned.
|
877
|
+
# The maximum value is `100`. Values above `100` are coerced to `100`.
|
746
878
|
# @!attribute [rw] page_token
|
747
879
|
# @return [::String]
|
748
880
|
# A page token, received from a previous `ListEvaluations` call.
|
@@ -752,7 +884,7 @@ module Google
|
|
752
884
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
753
885
|
end
|
754
886
|
|
755
|
-
# The response from ListEvaluations
|
887
|
+
# The response from `ListEvaluations`.
|
756
888
|
# @!attribute [rw] evaluations
|
757
889
|
# @return [::Array<::Google::Cloud::DocumentAI::V1::Evaluation>]
|
758
890
|
# The evaluations requested.
|