google-cloud-document_ai-v1 0.4.0 → 0.6.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/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +1492 -58
- data/lib/google/cloud/document_ai/v1/document_processor_service/paths.rb +38 -0
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/lib/google/cloud/documentai/v1/barcode_pb.rb +24 -0
- data/lib/google/cloud/documentai/v1/document_io_pb.rb +3 -0
- data/lib/google/cloud/documentai/v1/document_pb.rb +25 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +140 -0
- data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +34 -0
- data/lib/google/cloud/documentai/v1/document_schema_pb.rb +60 -0
- data/lib/google/cloud/documentai/v1/operation_metadata_pb.rb +1 -0
- data/lib/google/cloud/documentai/v1/processor_pb.rb +73 -0
- data/lib/google/cloud/documentai/v1/processor_type_pb.rb +34 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/documentai/v1/barcode.rb +73 -0
- data/proto_docs/google/cloud/documentai/v1/document.rb +158 -135
- data/proto_docs/google/cloud/documentai/v1/document_io.rb +7 -2
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +354 -6
- data/proto_docs/google/cloud/documentai/v1/document_schema.rb +155 -0
- data/proto_docs/google/cloud/documentai/v1/operation_metadata.rb +3 -0
- data/proto_docs/google/cloud/documentai/v1/processor.rb +174 -0
- data/proto_docs/google/cloud/documentai/v1/processor_type.rb +62 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +34 -4
@@ -30,11 +30,21 @@ module Google
|
|
30
30
|
# A raw document content (bytes).
|
31
31
|
# @!attribute [rw] name
|
32
32
|
# @return [::String]
|
33
|
-
# Required. The
|
33
|
+
# Required. The resource name of the {::Google::Cloud::DocumentAI::V1::Processor Processor} or
|
34
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}
|
35
|
+
# to use for processing. If a {::Google::Cloud::DocumentAI::V1::Processor Processor} is specified, the server will use
|
36
|
+
# its {::Google::Cloud::DocumentAI::V1::Processor#default_processor_version default version}. Format:
|
37
|
+
# `projects/{project}/locations/{location}/processors/{processor}`, or
|
38
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
34
39
|
# @!attribute [rw] skip_human_review
|
35
40
|
# @return [::Boolean]
|
36
41
|
# Whether Human Review feature should be skipped for this request. Default to
|
37
42
|
# false.
|
43
|
+
# @!attribute [rw] field_mask
|
44
|
+
# @return [::Google::Protobuf::FieldMask]
|
45
|
+
# Specifies which fields to include in ProcessResponse's document.
|
46
|
+
# Only supports top level document and pages field so it must be in the form
|
47
|
+
# of `{document_field_name}` or `pages.{page_field_name}`.
|
38
48
|
class ProcessRequest
|
39
49
|
include ::Google::Protobuf::MessageExts
|
40
50
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -95,7 +105,11 @@ module Google
|
|
95
105
|
# Request message for batch process document method.
|
96
106
|
# @!attribute [rw] name
|
97
107
|
# @return [::String]
|
98
|
-
# Required. The
|
108
|
+
# Required. The resource name of {::Google::Cloud::DocumentAI::V1::Processor Processor} or
|
109
|
+
# {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
|
110
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
111
|
+
# or
|
112
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
99
113
|
# @!attribute [rw] input_documents
|
100
114
|
# @return [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig]
|
101
115
|
# The input documents for batch process.
|
@@ -147,10 +161,10 @@ module Google
|
|
147
161
|
# document during the process.
|
148
162
|
# @!attribute [rw] status
|
149
163
|
# @return [::Google::Rpc::Status]
|
150
|
-
# The status
|
164
|
+
# The status processing the document.
|
151
165
|
# @!attribute [rw] output_gcs_destination
|
152
166
|
# @return [::String]
|
153
|
-
# The output_gcs_destination (in the request as
|
167
|
+
# The output_gcs_destination (in the request as `output_gcs_destination`)
|
154
168
|
# of the processed document if it was successful, otherwise empty.
|
155
169
|
# @!attribute [rw] human_review_status
|
156
170
|
# @return [::Google::Cloud::DocumentAI::V1::HumanReviewStatus]
|
@@ -185,6 +199,318 @@ module Google
|
|
185
199
|
end
|
186
200
|
end
|
187
201
|
|
202
|
+
# Request message for fetch processor types.
|
203
|
+
# @!attribute [rw] parent
|
204
|
+
# @return [::String]
|
205
|
+
# Required. The project of processor type to list.
|
206
|
+
# The available processor types may depend on the allow-listing on projects.
|
207
|
+
# Format: `projects/{project}/locations/{location}`
|
208
|
+
class FetchProcessorTypesRequest
|
209
|
+
include ::Google::Protobuf::MessageExts
|
210
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
211
|
+
end
|
212
|
+
|
213
|
+
# Response message for fetch processor types.
|
214
|
+
# @!attribute [rw] processor_types
|
215
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorType>]
|
216
|
+
# The list of processor types.
|
217
|
+
class FetchProcessorTypesResponse
|
218
|
+
include ::Google::Protobuf::MessageExts
|
219
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
|
+
end
|
221
|
+
|
222
|
+
# Request message for list processor types.
|
223
|
+
# @!attribute [rw] parent
|
224
|
+
# @return [::String]
|
225
|
+
# Required. The location of processor type to list.
|
226
|
+
# The available processor types may depend on the allow-listing on projects.
|
227
|
+
# Format: `projects/{project}/locations/{location}`
|
228
|
+
# @!attribute [rw] page_size
|
229
|
+
# @return [::Integer]
|
230
|
+
# The maximum number of processor types to return.
|
231
|
+
# If unspecified, at most 100 processor types will be returned.
|
232
|
+
# The maximum value is 500; values above 500 will be coerced to 500.
|
233
|
+
# @!attribute [rw] page_token
|
234
|
+
# @return [::String]
|
235
|
+
# Used to retrieve the next page of results, empty if at the end of the list.
|
236
|
+
class ListProcessorTypesRequest
|
237
|
+
include ::Google::Protobuf::MessageExts
|
238
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
239
|
+
end
|
240
|
+
|
241
|
+
# Response message for list processor types.
|
242
|
+
# @!attribute [rw] processor_types
|
243
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorType>]
|
244
|
+
# The processor types.
|
245
|
+
# @!attribute [rw] next_page_token
|
246
|
+
# @return [::String]
|
247
|
+
# Points to the next page, otherwise empty.
|
248
|
+
class ListProcessorTypesResponse
|
249
|
+
include ::Google::Protobuf::MessageExts
|
250
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
251
|
+
end
|
252
|
+
|
253
|
+
# Request message for list all processors belongs to a project.
|
254
|
+
# @!attribute [rw] parent
|
255
|
+
# @return [::String]
|
256
|
+
# Required. The parent (project and location) which owns this collection of Processors.
|
257
|
+
# Format: `projects/{project}/locations/{location}`
|
258
|
+
# @!attribute [rw] page_size
|
259
|
+
# @return [::Integer]
|
260
|
+
# The maximum number of processors to return.
|
261
|
+
# If unspecified, at most 50 processors will be returned.
|
262
|
+
# The maximum value is 100; values above 100 will be coerced to 100.
|
263
|
+
# @!attribute [rw] page_token
|
264
|
+
# @return [::String]
|
265
|
+
# We will return the processors sorted by creation time. The page token
|
266
|
+
# will point to the next processor.
|
267
|
+
class ListProcessorsRequest
|
268
|
+
include ::Google::Protobuf::MessageExts
|
269
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
270
|
+
end
|
271
|
+
|
272
|
+
# Response message for list processors.
|
273
|
+
# @!attribute [rw] processors
|
274
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::Processor>]
|
275
|
+
# The list of processors.
|
276
|
+
# @!attribute [rw] next_page_token
|
277
|
+
# @return [::String]
|
278
|
+
# Points to the next processor, otherwise empty.
|
279
|
+
class ListProcessorsResponse
|
280
|
+
include ::Google::Protobuf::MessageExts
|
281
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
282
|
+
end
|
283
|
+
|
284
|
+
# Request message for get processor.
|
285
|
+
# @!attribute [rw] name
|
286
|
+
# @return [::String]
|
287
|
+
# Required. The processor resource name.
|
288
|
+
class GetProcessorRequest
|
289
|
+
include ::Google::Protobuf::MessageExts
|
290
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
291
|
+
end
|
292
|
+
|
293
|
+
# Request message for get processor version.
|
294
|
+
# @!attribute [rw] name
|
295
|
+
# @return [::String]
|
296
|
+
# Required. The processor resource name.
|
297
|
+
class GetProcessorVersionRequest
|
298
|
+
include ::Google::Protobuf::MessageExts
|
299
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
300
|
+
end
|
301
|
+
|
302
|
+
# Request message for list all processor versions belongs to a processor.
|
303
|
+
# @!attribute [rw] parent
|
304
|
+
# @return [::String]
|
305
|
+
# Required. The parent (project, location and processor) to list all versions.
|
306
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`
|
307
|
+
# @!attribute [rw] page_size
|
308
|
+
# @return [::Integer]
|
309
|
+
# The maximum number of processor versions to return.
|
310
|
+
# If unspecified, at most 10 processor versions will be returned.
|
311
|
+
# The maximum value is 20; values above 20 will be coerced to 20.
|
312
|
+
# @!attribute [rw] page_token
|
313
|
+
# @return [::String]
|
314
|
+
# We will return the processor versions sorted by creation time. The page
|
315
|
+
# token will point to the next processor version.
|
316
|
+
class ListProcessorVersionsRequest
|
317
|
+
include ::Google::Protobuf::MessageExts
|
318
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
319
|
+
end
|
320
|
+
|
321
|
+
# Response message for list processors.
|
322
|
+
# @!attribute [rw] processor_versions
|
323
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorVersion>]
|
324
|
+
# The list of processors.
|
325
|
+
# @!attribute [rw] next_page_token
|
326
|
+
# @return [::String]
|
327
|
+
# Points to the next processor, otherwise empty.
|
328
|
+
class ListProcessorVersionsResponse
|
329
|
+
include ::Google::Protobuf::MessageExts
|
330
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
331
|
+
end
|
332
|
+
|
333
|
+
# Request message for the delete processor version method.
|
334
|
+
# @!attribute [rw] name
|
335
|
+
# @return [::String]
|
336
|
+
# Required. The processor version resource name to be deleted.
|
337
|
+
class DeleteProcessorVersionRequest
|
338
|
+
include ::Google::Protobuf::MessageExts
|
339
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
340
|
+
end
|
341
|
+
|
342
|
+
# The long running operation metadata for delete processor version method.
|
343
|
+
# @!attribute [rw] common_metadata
|
344
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
345
|
+
# The basic metadata of the long running operation.
|
346
|
+
class DeleteProcessorVersionMetadata
|
347
|
+
include ::Google::Protobuf::MessageExts
|
348
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
349
|
+
end
|
350
|
+
|
351
|
+
# Request message for the deploy processor version method.
|
352
|
+
# @!attribute [rw] name
|
353
|
+
# @return [::String]
|
354
|
+
# Required. The processor version resource name to be deployed.
|
355
|
+
class DeployProcessorVersionRequest
|
356
|
+
include ::Google::Protobuf::MessageExts
|
357
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
358
|
+
end
|
359
|
+
|
360
|
+
# Response message for the deploy processor version method.
|
361
|
+
class DeployProcessorVersionResponse
|
362
|
+
include ::Google::Protobuf::MessageExts
|
363
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
364
|
+
end
|
365
|
+
|
366
|
+
# The long running operation metadata for deploy processor version method.
|
367
|
+
# @!attribute [rw] common_metadata
|
368
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
369
|
+
# The basic metadata of the long running operation.
|
370
|
+
class DeployProcessorVersionMetadata
|
371
|
+
include ::Google::Protobuf::MessageExts
|
372
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
373
|
+
end
|
374
|
+
|
375
|
+
# Request message for the undeploy processor version method.
|
376
|
+
# @!attribute [rw] name
|
377
|
+
# @return [::String]
|
378
|
+
# Required. The processor version resource name to be undeployed.
|
379
|
+
class UndeployProcessorVersionRequest
|
380
|
+
include ::Google::Protobuf::MessageExts
|
381
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
382
|
+
end
|
383
|
+
|
384
|
+
# Response message for the undeploy processor version method.
|
385
|
+
class UndeployProcessorVersionResponse
|
386
|
+
include ::Google::Protobuf::MessageExts
|
387
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
388
|
+
end
|
389
|
+
|
390
|
+
# The long running operation metadata for the undeploy processor version
|
391
|
+
# method.
|
392
|
+
# @!attribute [rw] common_metadata
|
393
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
394
|
+
# The basic metadata of the long running operation.
|
395
|
+
class UndeployProcessorVersionMetadata
|
396
|
+
include ::Google::Protobuf::MessageExts
|
397
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
398
|
+
end
|
399
|
+
|
400
|
+
# Request message for create a processor. Notice this request is sent to
|
401
|
+
# a regionalized backend service, and if the processor type is not available
|
402
|
+
# on that region, the creation will fail.
|
403
|
+
# @!attribute [rw] parent
|
404
|
+
# @return [::String]
|
405
|
+
# Required. The parent (project and location) under which to create the processor.
|
406
|
+
# Format: `projects/{project}/locations/{location}`
|
407
|
+
# @!attribute [rw] processor
|
408
|
+
# @return [::Google::Cloud::DocumentAI::V1::Processor]
|
409
|
+
# Required. The processor to be created, requires [processor_type] and [display_name]
|
410
|
+
# to be set. Also, the processor is under CMEK if CMEK fields are set.
|
411
|
+
class CreateProcessorRequest
|
412
|
+
include ::Google::Protobuf::MessageExts
|
413
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
414
|
+
end
|
415
|
+
|
416
|
+
# Request message for the delete processor method.
|
417
|
+
# @!attribute [rw] name
|
418
|
+
# @return [::String]
|
419
|
+
# Required. The processor resource name to be deleted.
|
420
|
+
class DeleteProcessorRequest
|
421
|
+
include ::Google::Protobuf::MessageExts
|
422
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
423
|
+
end
|
424
|
+
|
425
|
+
# The long running operation metadata for delete processor method.
|
426
|
+
# @!attribute [rw] common_metadata
|
427
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
428
|
+
# The basic metadata of the long running operation.
|
429
|
+
class DeleteProcessorMetadata
|
430
|
+
include ::Google::Protobuf::MessageExts
|
431
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
432
|
+
end
|
433
|
+
|
434
|
+
# Request message for the enable processor method.
|
435
|
+
# @!attribute [rw] name
|
436
|
+
# @return [::String]
|
437
|
+
# Required. The processor resource name to be enabled.
|
438
|
+
class EnableProcessorRequest
|
439
|
+
include ::Google::Protobuf::MessageExts
|
440
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
441
|
+
end
|
442
|
+
|
443
|
+
# Response message for the enable processor method.
|
444
|
+
# Intentionally empty proto for adding fields in future.
|
445
|
+
class EnableProcessorResponse
|
446
|
+
include ::Google::Protobuf::MessageExts
|
447
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
448
|
+
end
|
449
|
+
|
450
|
+
# The long running operation metadata for enable processor method.
|
451
|
+
# @!attribute [rw] common_metadata
|
452
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
453
|
+
# The basic metadata of the long running operation.
|
454
|
+
class EnableProcessorMetadata
|
455
|
+
include ::Google::Protobuf::MessageExts
|
456
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
457
|
+
end
|
458
|
+
|
459
|
+
# Request message for the disable processor method.
|
460
|
+
# @!attribute [rw] name
|
461
|
+
# @return [::String]
|
462
|
+
# Required. The processor resource name to be disabled.
|
463
|
+
class DisableProcessorRequest
|
464
|
+
include ::Google::Protobuf::MessageExts
|
465
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
466
|
+
end
|
467
|
+
|
468
|
+
# Response message for the disable processor method.
|
469
|
+
# Intentionally empty proto for adding fields in future.
|
470
|
+
class DisableProcessorResponse
|
471
|
+
include ::Google::Protobuf::MessageExts
|
472
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
473
|
+
end
|
474
|
+
|
475
|
+
# The long running operation metadata for disable processor method.
|
476
|
+
# @!attribute [rw] common_metadata
|
477
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
478
|
+
# The basic metadata of the long running operation.
|
479
|
+
class DisableProcessorMetadata
|
480
|
+
include ::Google::Protobuf::MessageExts
|
481
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
482
|
+
end
|
483
|
+
|
484
|
+
# Request message for the set default processor version method.
|
485
|
+
# @!attribute [rw] processor
|
486
|
+
# @return [::String]
|
487
|
+
# Required. The resource name of the {::Google::Cloud::DocumentAI::V1::Processor Processor} to change default version.
|
488
|
+
# @!attribute [rw] default_processor_version
|
489
|
+
# @return [::String]
|
490
|
+
# Required. The resource name of child {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to use as default.
|
491
|
+
# Format:
|
492
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
|
493
|
+
class SetDefaultProcessorVersionRequest
|
494
|
+
include ::Google::Protobuf::MessageExts
|
495
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
496
|
+
end
|
497
|
+
|
498
|
+
# Response message for set default processor version method.
|
499
|
+
class SetDefaultProcessorVersionResponse
|
500
|
+
include ::Google::Protobuf::MessageExts
|
501
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
502
|
+
end
|
503
|
+
|
504
|
+
# The long running operation metadata for set default processor version
|
505
|
+
# method.
|
506
|
+
# @!attribute [rw] common_metadata
|
507
|
+
# @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
|
508
|
+
# The basic metadata of the long running operation.
|
509
|
+
class SetDefaultProcessorVersionMetadata
|
510
|
+
include ::Google::Protobuf::MessageExts
|
511
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
512
|
+
end
|
513
|
+
|
188
514
|
# Request message for review document method.
|
189
515
|
# @!attribute [rw] inline_document
|
190
516
|
# @return [::Google::Cloud::DocumentAI::V1::Document]
|
@@ -199,6 +525,9 @@ module Google
|
|
199
525
|
# @!attribute [rw] priority
|
200
526
|
# @return [::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest::Priority]
|
201
527
|
# The priority of the human review task.
|
528
|
+
# @!attribute [rw] document_schema
|
529
|
+
# @return [::Google::Cloud::DocumentAI::V1::DocumentSchema]
|
530
|
+
# The document schema of the human review task.
|
202
531
|
class ReviewDocumentRequest
|
203
532
|
include ::Google::Protobuf::MessageExts
|
204
533
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -217,10 +546,29 @@ module Google
|
|
217
546
|
# Response message for review document method.
|
218
547
|
# @!attribute [rw] gcs_destination
|
219
548
|
# @return [::String]
|
220
|
-
# The Cloud Storage uri for the human reviewed document
|
549
|
+
# The Cloud Storage uri for the human reviewed document if the review is
|
550
|
+
# succeeded.
|
551
|
+
# @!attribute [rw] state
|
552
|
+
# @return [::Google::Cloud::DocumentAI::V1::ReviewDocumentResponse::State]
|
553
|
+
# The state of the review operation.
|
554
|
+
# @!attribute [rw] rejection_reason
|
555
|
+
# @return [::String]
|
556
|
+
# The reason why the review is rejected by reviewer.
|
221
557
|
class ReviewDocumentResponse
|
222
558
|
include ::Google::Protobuf::MessageExts
|
223
559
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
560
|
+
|
561
|
+
# Possible states of the review operation.
|
562
|
+
module State
|
563
|
+
# The default value. This value is used if the state is omitted.
|
564
|
+
STATE_UNSPECIFIED = 0
|
565
|
+
|
566
|
+
# The review operation is rejected by the reviewer.
|
567
|
+
REJECTED = 1
|
568
|
+
|
569
|
+
# The review operation is succeeded.
|
570
|
+
SUCCEEDED = 2
|
571
|
+
end
|
224
572
|
end
|
225
573
|
|
226
574
|
# The long running operation metadata for review document method.
|
@@ -229,7 +577,7 @@ module Google
|
|
229
577
|
# The basic metadata of the long running operation.
|
230
578
|
# @!attribute [rw] question_id
|
231
579
|
# @return [::String]
|
232
|
-
# The question ID.
|
580
|
+
# The Crowd Compute question ID.
|
233
581
|
class ReviewDocumentOperationMetadata
|
234
582
|
include ::Google::Protobuf::MessageExts
|
235
583
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,155 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DocumentAI
|
23
|
+
module V1
|
24
|
+
# The schema defines the output of the processed document by a processor.
|
25
|
+
# @!attribute [rw] display_name
|
26
|
+
# @return [::String]
|
27
|
+
# Display name to show to users.
|
28
|
+
# @!attribute [rw] description
|
29
|
+
# @return [::String]
|
30
|
+
# Description of the schema.
|
31
|
+
# @!attribute [rw] entity_types
|
32
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::DocumentSchema::EntityType>]
|
33
|
+
# Entity types of the schema.
|
34
|
+
# @!attribute [rw] metadata
|
35
|
+
# @return [::Google::Cloud::DocumentAI::V1::DocumentSchema::Metadata]
|
36
|
+
# Metadata of the schema.
|
37
|
+
class DocumentSchema
|
38
|
+
include ::Google::Protobuf::MessageExts
|
39
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
40
|
+
|
41
|
+
# EntityType is the wrapper of a label of the corresponding model with
|
42
|
+
# detailed attributes and limitations for entity-based processors. Multiple
|
43
|
+
# types can also compose a dependency tree to represent nested types.
|
44
|
+
# @!attribute [rw] enum_values
|
45
|
+
# @return [::Google::Cloud::DocumentAI::V1::DocumentSchema::EntityType::EnumValues]
|
46
|
+
# If specified, lists all the possible values for this entity. This
|
47
|
+
# should not be more than a handful of values. If the number of values
|
48
|
+
# is >10 or could change frequently use the `EntityType.value_ontology`
|
49
|
+
# field and specify a list of all possible values in a value ontology
|
50
|
+
# file.
|
51
|
+
# @!attribute [rw] display_name
|
52
|
+
# @return [::String]
|
53
|
+
# User defined name for the type.
|
54
|
+
# @!attribute [rw] name
|
55
|
+
# @return [::String]
|
56
|
+
# Name of the type. It must be unique within the schema file and
|
57
|
+
# cannot be a 'Common Type'. Besides that we use the following naming
|
58
|
+
# conventions:
|
59
|
+
#
|
60
|
+
# - *use `snake_casing`*
|
61
|
+
# - name matching is case-insensitive
|
62
|
+
# - Maximum 64 characters.
|
63
|
+
# - Must start with a letter.
|
64
|
+
# - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
|
65
|
+
# compatibility internal infrastructure and tooling can handle any ascii
|
66
|
+
# character)
|
67
|
+
# - The `/` is sometimes used to denote a property of a type. For example
|
68
|
+
# `line_item/amount`. This convention is deprecated, but will still be
|
69
|
+
# honored for backward compatibility.
|
70
|
+
# @!attribute [rw] base_types
|
71
|
+
# @return [::Array<::String>]
|
72
|
+
# The entity type that this type is derived from. For now, one and only
|
73
|
+
# one should be set.
|
74
|
+
# @!attribute [rw] properties
|
75
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1::DocumentSchema::EntityType::Property>]
|
76
|
+
# Describing the nested structure, or composition of an entity.
|
77
|
+
class EntityType
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
|
81
|
+
# Defines the a list of enum values.
|
82
|
+
# @!attribute [rw] values
|
83
|
+
# @return [::Array<::String>]
|
84
|
+
# The individual values that this enum values type can include.
|
85
|
+
class EnumValues
|
86
|
+
include ::Google::Protobuf::MessageExts
|
87
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
88
|
+
end
|
89
|
+
|
90
|
+
# Defines properties that can be part of the entity type.
|
91
|
+
# @!attribute [rw] name
|
92
|
+
# @return [::String]
|
93
|
+
# The name of the property. Follows the same guidelines as the
|
94
|
+
# EntityType name.
|
95
|
+
# @!attribute [rw] value_type
|
96
|
+
# @return [::String]
|
97
|
+
# A reference to the value type of the property. This type is subject
|
98
|
+
# to the same conventions as the `Entity.base_types` field.
|
99
|
+
# @!attribute [rw] occurrence_type
|
100
|
+
# @return [::Google::Cloud::DocumentAI::V1::DocumentSchema::EntityType::Property::OccurrenceType]
|
101
|
+
# Occurrence type limits the number of instances an entity type appears
|
102
|
+
# in the document.
|
103
|
+
class Property
|
104
|
+
include ::Google::Protobuf::MessageExts
|
105
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
106
|
+
|
107
|
+
# Types of occurrences of the entity type in the document. Note: this
|
108
|
+
# represents the number of instances of an entity types, not number of
|
109
|
+
# mentions of a given entity instance.
|
110
|
+
module OccurrenceType
|
111
|
+
# Unspecified occurrence type.
|
112
|
+
OCCURRENCE_TYPE_UNSPECIFIED = 0
|
113
|
+
|
114
|
+
# There will be zero or one instance of this entity type.
|
115
|
+
OPTIONAL_ONCE = 1
|
116
|
+
|
117
|
+
# The entity type will appear zero or multiple times.
|
118
|
+
OPTIONAL_MULTIPLE = 2
|
119
|
+
|
120
|
+
# The entity type will only appear exactly once.
|
121
|
+
REQUIRED_ONCE = 3
|
122
|
+
|
123
|
+
# The entity type will appear once or more times.
|
124
|
+
REQUIRED_MULTIPLE = 4
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Metadata for global schema behavior.
|
130
|
+
# @!attribute [rw] document_splitter
|
131
|
+
# @return [::Boolean]
|
132
|
+
# If true, a `document` entity type can be applied to subdocument (
|
133
|
+
# splitting). Otherwise, it can only be applied to the entire document
|
134
|
+
# (classification).
|
135
|
+
# @!attribute [rw] document_allow_multiple_labels
|
136
|
+
# @return [::Boolean]
|
137
|
+
# If true, on a given page, there can be multiple `document` annotations
|
138
|
+
# covering it.
|
139
|
+
# @!attribute [rw] prefixed_naming_on_properties
|
140
|
+
# @return [::Boolean]
|
141
|
+
# If set, all the nested entities must be prefixed with the parents.
|
142
|
+
# @!attribute [rw] skip_naming_validation
|
143
|
+
# @return [::Boolean]
|
144
|
+
# If set, we will skip the naming format validation in the schema. So the
|
145
|
+
# string values in `DocumentSchema.EntityType.name` and
|
146
|
+
# `DocumentSchema.EntityType.Property.name` will not be checked.
|
147
|
+
class Metadata
|
148
|
+
include ::Google::Protobuf::MessageExts
|
149
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] state_message
|
29
29
|
# @return [::String]
|
30
30
|
# A message providing more details about the current state of processing.
|
31
|
+
# @!attribute [rw] resource
|
32
|
+
# @return [::String]
|
33
|
+
# A related resource to this operation.
|
31
34
|
# @!attribute [rw] create_time
|
32
35
|
# @return [::Google::Protobuf::Timestamp]
|
33
36
|
# The creation time of the operation.
|