google-cloud-document_ai-v1beta3 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +957 -123
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/paths.rb +21 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/barcode_pb.rb +24 -0
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +0 -2
- data/lib/google/cloud/documentai/v1beta3/document_pb.rb +12 -1
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +83 -0
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +21 -1
- data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +60 -0
- data/lib/google/cloud/documentai/v1beta3/geometry_pb.rb +0 -2
- data/lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb +1 -1
- data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +27 -2
- data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +2 -1
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/documentai/v1beta3/barcode.rb +71 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document.rb +111 -138
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +223 -10
- data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +154 -0
- data/proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb +3 -0
- data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +92 -7
- data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +9 -6
- data/proto_docs/google/protobuf/empty.rb +0 -2
- metadata +27 -2
@@ -30,7 +30,12 @@ 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::V1beta3::Processor Processor} or
|
34
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}
|
35
|
+
# to use for processing. If a {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} is specified, the server will use
|
36
|
+
# its {::Google::Cloud::DocumentAI::V1beta3::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] document
|
35
40
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document]
|
36
41
|
# The document payload, the [content] and [mime_type] fields must be set.
|
@@ -38,6 +43,9 @@ module Google
|
|
38
43
|
# @return [::Boolean]
|
39
44
|
# Whether Human Review feature should be skipped for this request. Default to
|
40
45
|
# false.
|
46
|
+
# @!attribute [rw] field_mask
|
47
|
+
# @return [::Google::Protobuf::FieldMask]
|
48
|
+
# Specifies which fields to include in ProcessResponse's document.
|
41
49
|
class ProcessRequest
|
42
50
|
include ::Google::Protobuf::MessageExts
|
43
51
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -104,7 +112,11 @@ module Google
|
|
104
112
|
# Request message for batch process document method.
|
105
113
|
# @!attribute [rw] name
|
106
114
|
# @return [::String]
|
107
|
-
# Required. The
|
115
|
+
# Required. The resource name of {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
|
116
|
+
# {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion}.
|
117
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`,
|
118
|
+
# or
|
119
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
108
120
|
# @!attribute [rw] input_configs
|
109
121
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::BatchProcessRequest::BatchInputConfig>]
|
110
122
|
# The input config for each single document in the batch process.
|
@@ -185,10 +197,10 @@ module Google
|
|
185
197
|
# document during the process.
|
186
198
|
# @!attribute [rw] status
|
187
199
|
# @return [::Google::Rpc::Status]
|
188
|
-
# The status
|
200
|
+
# The status processing the document.
|
189
201
|
# @!attribute [rw] output_gcs_destination
|
190
202
|
# @return [::String]
|
191
|
-
# The output_gcs_destination (in the request as
|
203
|
+
# The output_gcs_destination (in the request as `output_gcs_destination`)
|
192
204
|
# of the processed document if it was successful, otherwise empty.
|
193
205
|
# @!attribute [rw] human_review_operation
|
194
206
|
# @return [::String]
|
@@ -233,7 +245,8 @@ module Google
|
|
233
245
|
# @!attribute [rw] parent
|
234
246
|
# @return [::String]
|
235
247
|
# Required. The project of processor type to list.
|
236
|
-
#
|
248
|
+
# The available processor types may depend on the allow-listing on projects.
|
249
|
+
# Format: `projects/{project}/locations/{location}`
|
237
250
|
class FetchProcessorTypesRequest
|
238
251
|
include ::Google::Protobuf::MessageExts
|
239
252
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -248,11 +261,42 @@ module Google
|
|
248
261
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
249
262
|
end
|
250
263
|
|
264
|
+
# Request message for list processor types.
|
265
|
+
# @!attribute [rw] parent
|
266
|
+
# @return [::String]
|
267
|
+
# Required. The location of processor type to list.
|
268
|
+
# The available processor types may depend on the allow-listing on projects.
|
269
|
+
# Format: `projects/{project}/locations/{location}`
|
270
|
+
# @!attribute [rw] page_size
|
271
|
+
# @return [::Integer]
|
272
|
+
# The maximum number of processor types to return.
|
273
|
+
# If unspecified, at most 100 processor types will be returned.
|
274
|
+
# The maximum value is 500; values above 500 will be coerced to 500.
|
275
|
+
# @!attribute [rw] page_token
|
276
|
+
# @return [::String]
|
277
|
+
# Used to retrieve the next page of results, empty if at the end of the list.
|
278
|
+
class ListProcessorTypesRequest
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
|
283
|
+
# Response message for list processor types.
|
284
|
+
# @!attribute [rw] processor_types
|
285
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorType>]
|
286
|
+
# The processor types.
|
287
|
+
# @!attribute [rw] next_page_token
|
288
|
+
# @return [::String]
|
289
|
+
# Points to the next page, otherwise empty.
|
290
|
+
class ListProcessorTypesResponse
|
291
|
+
include ::Google::Protobuf::MessageExts
|
292
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
293
|
+
end
|
294
|
+
|
251
295
|
# Request message for list all processors belongs to a project.
|
252
296
|
# @!attribute [rw] parent
|
253
297
|
# @return [::String]
|
254
298
|
# Required. The parent (project and location) which owns this collection of Processors.
|
255
|
-
# Format: projects
|
299
|
+
# Format: `projects/{project}/locations/{location}`
|
256
300
|
# @!attribute [rw] page_size
|
257
301
|
# @return [::Integer]
|
258
302
|
# The maximum number of processors to return.
|
@@ -279,13 +323,129 @@ module Google
|
|
279
323
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
280
324
|
end
|
281
325
|
|
326
|
+
# Request message for get processor.
|
327
|
+
# @!attribute [rw] name
|
328
|
+
# @return [::String]
|
329
|
+
# Required. The processor resource name.
|
330
|
+
class GetProcessorRequest
|
331
|
+
include ::Google::Protobuf::MessageExts
|
332
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
333
|
+
end
|
334
|
+
|
335
|
+
# Request message for get processor version.
|
336
|
+
# @!attribute [rw] name
|
337
|
+
# @return [::String]
|
338
|
+
# Required. The processor resource name.
|
339
|
+
class GetProcessorVersionRequest
|
340
|
+
include ::Google::Protobuf::MessageExts
|
341
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
342
|
+
end
|
343
|
+
|
344
|
+
# Request message for list all processor versions belongs to a processor.
|
345
|
+
# @!attribute [rw] parent
|
346
|
+
# @return [::String]
|
347
|
+
# Required. The parent (project, location and processor) to list all versions.
|
348
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`
|
349
|
+
# @!attribute [rw] page_size
|
350
|
+
# @return [::Integer]
|
351
|
+
# The maximum number of processor versions to return.
|
352
|
+
# If unspecified, at most 10 processor versions will be returned.
|
353
|
+
# The maximum value is 20; values above 20 will be coerced to 20.
|
354
|
+
# @!attribute [rw] page_token
|
355
|
+
# @return [::String]
|
356
|
+
# We will return the processor versions sorted by creation time. The page
|
357
|
+
# token will point to the next processor version.
|
358
|
+
class ListProcessorVersionsRequest
|
359
|
+
include ::Google::Protobuf::MessageExts
|
360
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
361
|
+
end
|
362
|
+
|
363
|
+
# Response message for list processors.
|
364
|
+
# @!attribute [rw] processor_versions
|
365
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion>]
|
366
|
+
# The list of processors.
|
367
|
+
# @!attribute [rw] next_page_token
|
368
|
+
# @return [::String]
|
369
|
+
# Points to the next processor, otherwise empty.
|
370
|
+
class ListProcessorVersionsResponse
|
371
|
+
include ::Google::Protobuf::MessageExts
|
372
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
373
|
+
end
|
374
|
+
|
375
|
+
# Request message for the delete processor version method.
|
376
|
+
# @!attribute [rw] name
|
377
|
+
# @return [::String]
|
378
|
+
# Required. The processor version resource name to be deleted.
|
379
|
+
class DeleteProcessorVersionRequest
|
380
|
+
include ::Google::Protobuf::MessageExts
|
381
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
382
|
+
end
|
383
|
+
|
384
|
+
# The long running operation metadata for delete processor version method.
|
385
|
+
# @!attribute [rw] common_metadata
|
386
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
|
387
|
+
# The basic metadata of the long running operation.
|
388
|
+
class DeleteProcessorVersionMetadata
|
389
|
+
include ::Google::Protobuf::MessageExts
|
390
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
391
|
+
end
|
392
|
+
|
393
|
+
# Request message for the deploy processor version method.
|
394
|
+
# @!attribute [rw] name
|
395
|
+
# @return [::String]
|
396
|
+
# Required. The processor version resource name to be deployed.
|
397
|
+
class DeployProcessorVersionRequest
|
398
|
+
include ::Google::Protobuf::MessageExts
|
399
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
400
|
+
end
|
401
|
+
|
402
|
+
# Response message for the deploy processor version method.
|
403
|
+
class DeployProcessorVersionResponse
|
404
|
+
include ::Google::Protobuf::MessageExts
|
405
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
406
|
+
end
|
407
|
+
|
408
|
+
# The long running operation metadata for deploy processor version method.
|
409
|
+
# @!attribute [rw] common_metadata
|
410
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
|
411
|
+
# The basic metadata of the long running operation.
|
412
|
+
class DeployProcessorVersionMetadata
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
417
|
+
# Request message for the undeploy processor version method.
|
418
|
+
# @!attribute [rw] name
|
419
|
+
# @return [::String]
|
420
|
+
# Required. The processor version resource name to be undeployed.
|
421
|
+
class UndeployProcessorVersionRequest
|
422
|
+
include ::Google::Protobuf::MessageExts
|
423
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
424
|
+
end
|
425
|
+
|
426
|
+
# Response message for the undeploy processor version method.
|
427
|
+
class UndeployProcessorVersionResponse
|
428
|
+
include ::Google::Protobuf::MessageExts
|
429
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
430
|
+
end
|
431
|
+
|
432
|
+
# The long running operation metadata for the undeploy processor version
|
433
|
+
# method.
|
434
|
+
# @!attribute [rw] common_metadata
|
435
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
|
436
|
+
# The basic metadata of the long running operation.
|
437
|
+
class UndeployProcessorVersionMetadata
|
438
|
+
include ::Google::Protobuf::MessageExts
|
439
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
440
|
+
end
|
441
|
+
|
282
442
|
# Request message for create a processor. Notice this request is sent to
|
283
443
|
# a regionalized backend service, and if the processor type is not available
|
284
444
|
# on that region, the creation will fail.
|
285
445
|
# @!attribute [rw] parent
|
286
446
|
# @return [::String]
|
287
447
|
# Required. The parent (project and location) under which to create the processor.
|
288
|
-
# Format: projects
|
448
|
+
# Format: `projects/{project}/locations/{location}`
|
289
449
|
# @!attribute [rw] processor
|
290
450
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Processor]
|
291
451
|
# Required. The processor to be created, requires [processor_type] and [display_name]
|
@@ -323,6 +483,7 @@ module Google
|
|
323
483
|
end
|
324
484
|
|
325
485
|
# Response message for the enable processor method.
|
486
|
+
# Intentionally empty proto for adding fields in future.
|
326
487
|
class EnableProcessorResponse
|
327
488
|
include ::Google::Protobuf::MessageExts
|
328
489
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -347,6 +508,7 @@ module Google
|
|
347
508
|
end
|
348
509
|
|
349
510
|
# Response message for the disable processor method.
|
511
|
+
# Intentionally empty proto for adding fields in future.
|
350
512
|
class DisableProcessorResponse
|
351
513
|
include ::Google::Protobuf::MessageExts
|
352
514
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -361,8 +523,37 @@ module Google
|
|
361
523
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
362
524
|
end
|
363
525
|
|
526
|
+
# Request message for the set default processor version method.
|
527
|
+
# @!attribute [rw] processor
|
528
|
+
# @return [::String]
|
529
|
+
# Required. The resource name of the {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} to change default version.
|
530
|
+
# @!attribute [rw] default_processor_version
|
531
|
+
# @return [::String]
|
532
|
+
# Required. The resource name of child {::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion ProcessorVersion} to use as default.
|
533
|
+
# Format:
|
534
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
|
535
|
+
class SetDefaultProcessorVersionRequest
|
536
|
+
include ::Google::Protobuf::MessageExts
|
537
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
538
|
+
end
|
539
|
+
|
540
|
+
# Response message for set default processor version method.
|
541
|
+
class SetDefaultProcessorVersionResponse
|
542
|
+
include ::Google::Protobuf::MessageExts
|
543
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
544
|
+
end
|
545
|
+
|
546
|
+
# The long running operation metadata for set default processor version
|
547
|
+
# method.
|
548
|
+
# @!attribute [rw] common_metadata
|
549
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
|
550
|
+
# The basic metadata of the long running operation.
|
551
|
+
class SetDefaultProcessorVersionMetadata
|
552
|
+
include ::Google::Protobuf::MessageExts
|
553
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
554
|
+
end
|
555
|
+
|
364
556
|
# Request message for review document method.
|
365
|
-
# Next Id: 6.
|
366
557
|
# @!attribute [rw] inline_document
|
367
558
|
# @return [::Google::Cloud::DocumentAI::V1beta3::Document]
|
368
559
|
# An inline document proto.
|
@@ -379,6 +570,9 @@ module Google
|
|
379
570
|
# @!attribute [rw] priority
|
380
571
|
# @return [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentRequest::Priority]
|
381
572
|
# The priority of the human review task.
|
573
|
+
# @!attribute [rw] document_schema
|
574
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema]
|
575
|
+
# The document schema of the human review task.
|
382
576
|
class ReviewDocumentRequest
|
383
577
|
include ::Google::Protobuf::MessageExts
|
384
578
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -397,10 +591,29 @@ module Google
|
|
397
591
|
# Response message for review document method.
|
398
592
|
# @!attribute [rw] gcs_destination
|
399
593
|
# @return [::String]
|
400
|
-
# The Cloud Storage uri for the human reviewed document
|
594
|
+
# The Cloud Storage uri for the human reviewed document if the review is
|
595
|
+
# succeeded.
|
596
|
+
# @!attribute [rw] state
|
597
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::ReviewDocumentResponse::State]
|
598
|
+
# The state of the review operation.
|
599
|
+
# @!attribute [rw] rejection_reason
|
600
|
+
# @return [::String]
|
601
|
+
# The reason why the review is rejected by reviewer.
|
401
602
|
class ReviewDocumentResponse
|
402
603
|
include ::Google::Protobuf::MessageExts
|
403
604
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
605
|
+
|
606
|
+
# Possible states of the review operation.
|
607
|
+
module State
|
608
|
+
# The default value. This value is used if the state is omitted.
|
609
|
+
STATE_UNSPECIFIED = 0
|
610
|
+
|
611
|
+
# The review operation is rejected by the reviewer.
|
612
|
+
REJECTED = 1
|
613
|
+
|
614
|
+
# The review operation is succeeded.
|
615
|
+
SUCCEEDED = 2
|
616
|
+
end
|
404
617
|
end
|
405
618
|
|
406
619
|
# The long running operation metadata for review document method.
|
@@ -422,7 +635,7 @@ module Google
|
|
422
635
|
# The basic metadata of the long running operation.
|
423
636
|
# @!attribute [rw] question_id
|
424
637
|
# @return [::String]
|
425
|
-
# The question ID.
|
638
|
+
# The Crowd Compute question ID.
|
426
639
|
class ReviewDocumentOperationMetadata
|
427
640
|
include ::Google::Protobuf::MessageExts
|
428
641
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,154 @@
|
|
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 V1beta3
|
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::V1beta3::DocumentSchema::EntityType>]
|
33
|
+
# Entity types of the schema.
|
34
|
+
# @!attribute [rw] metadata
|
35
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::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::V1beta3::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
|
+
# - *use snake_casing*
|
60
|
+
# - name matching is case-insensitive
|
61
|
+
# - Maximum 64 characters.
|
62
|
+
# - Must start with a letter.
|
63
|
+
# - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
|
64
|
+
# compatibility internal infrastructure and tooling can handle any ascii
|
65
|
+
# character)
|
66
|
+
# - The '/' is sometimes used to denote a property of a type. For example
|
67
|
+
# line_item/amount. This convention is deprecated, but will still be
|
68
|
+
# honored for backward compatibility.
|
69
|
+
# @!attribute [rw] base_types
|
70
|
+
# @return [::Array<::String>]
|
71
|
+
# The entity type that this type is derived from. For now, one and only
|
72
|
+
# one should be set.
|
73
|
+
# @!attribute [rw] properties
|
74
|
+
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::DocumentSchema::EntityType::Property>]
|
75
|
+
# Describing the nested structure, or composition of an entity.
|
76
|
+
class EntityType
|
77
|
+
include ::Google::Protobuf::MessageExts
|
78
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
79
|
+
|
80
|
+
# Defines the a list of enum values.
|
81
|
+
# @!attribute [rw] values
|
82
|
+
# @return [::Array<::String>]
|
83
|
+
# The individual values that this enum values type can include.
|
84
|
+
class EnumValues
|
85
|
+
include ::Google::Protobuf::MessageExts
|
86
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
87
|
+
end
|
88
|
+
|
89
|
+
# Defines properties that can be part of the entity type.
|
90
|
+
# @!attribute [rw] name
|
91
|
+
# @return [::String]
|
92
|
+
# The name of the property. Follows the same guidelines as the
|
93
|
+
# EntityType name.
|
94
|
+
# @!attribute [rw] value_type
|
95
|
+
# @return [::String]
|
96
|
+
# A reference to the value type of the property. This type is subject
|
97
|
+
# to the same conventions as the `Entity.base_types` field.
|
98
|
+
# @!attribute [rw] occurrence_type
|
99
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema::EntityType::Property::OccurrenceType]
|
100
|
+
# Occurrence type limits the number of instances an entity type appears
|
101
|
+
# in the document.
|
102
|
+
class Property
|
103
|
+
include ::Google::Protobuf::MessageExts
|
104
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
105
|
+
|
106
|
+
# Types of occurrences of the entity type in the document. Note: this
|
107
|
+
# represents the number of instances of an entity types, not number of
|
108
|
+
# mentions of a given entity instance.
|
109
|
+
module OccurrenceType
|
110
|
+
# Unspecified occurrence type.
|
111
|
+
OCCURRENCE_TYPE_UNSPECIFIED = 0
|
112
|
+
|
113
|
+
# There will be zero or one instance of this entity type.
|
114
|
+
OPTIONAL_ONCE = 1
|
115
|
+
|
116
|
+
# The entity type will appear zero or multiple times.
|
117
|
+
OPTIONAL_MULTIPLE = 2
|
118
|
+
|
119
|
+
# The entity type will only appear exactly once.
|
120
|
+
REQUIRED_ONCE = 3
|
121
|
+
|
122
|
+
# The entity type will appear once or more times.
|
123
|
+
REQUIRED_MULTIPLE = 4
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Metadata for global schema behavior.
|
129
|
+
# @!attribute [rw] document_splitter
|
130
|
+
# @return [::Boolean]
|
131
|
+
# If true, a `document` entity type can be applied to subdocument (
|
132
|
+
# splitting). Otherwise, it can only be applied to the entire document
|
133
|
+
# (classification).
|
134
|
+
# @!attribute [rw] document_allow_multiple_labels
|
135
|
+
# @return [::Boolean]
|
136
|
+
# If true, on a given page, there can be multiple `document` annotations
|
137
|
+
# covering it.
|
138
|
+
# @!attribute [rw] prefixed_naming_on_properties
|
139
|
+
# @return [::Boolean]
|
140
|
+
# If set, all the nested entities must be prefixed with the parents.
|
141
|
+
# @!attribute [rw] skip_naming_validation
|
142
|
+
# @return [::Boolean]
|
143
|
+
# If set, we will skip the naming format validation in the schema. So the
|
144
|
+
# string values in `DocumentSchema.EntityType.name` and
|
145
|
+
# `DocumentSchema.EntityType.Property.name` will not be checked.
|
146
|
+
class Metadata
|
147
|
+
include ::Google::Protobuf::MessageExts
|
148
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
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.
|
@@ -21,15 +21,92 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module DocumentAI
|
23
23
|
module V1beta3
|
24
|
-
#
|
25
|
-
#
|
24
|
+
# A processor version is an implementation of a processor. Each processor
|
25
|
+
# can have multiple versions, pre-trained by Google internally or up-trained
|
26
|
+
# by the customer. At a time, a processor can only have one default version
|
27
|
+
# version. So the processor's behavior (when processing documents) is defined
|
28
|
+
# by a default version
|
29
|
+
# @!attribute [rw] name
|
30
|
+
# @return [::String]
|
31
|
+
# The resource name of the processor version.
|
32
|
+
# Format:
|
33
|
+
# `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`
|
34
|
+
# @!attribute [rw] display_name
|
35
|
+
# @return [::String]
|
36
|
+
# The display name of the processor version.
|
37
|
+
# @!attribute [rw] state
|
38
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion::State]
|
39
|
+
# The state of the processor version.
|
40
|
+
# @!attribute [rw] create_time
|
41
|
+
# @return [::Google::Protobuf::Timestamp]
|
42
|
+
# The time the processor version was created.
|
43
|
+
# @!attribute [rw] kms_key_name
|
44
|
+
# @return [::String]
|
45
|
+
# The KMS key name used for encryption.
|
46
|
+
# @!attribute [rw] kms_key_version_name
|
47
|
+
# @return [::String]
|
48
|
+
# The KMS key version with which data is encrypted.
|
49
|
+
# @!attribute [rw] google_managed
|
50
|
+
# @return [::Boolean]
|
51
|
+
# Denotes that this ProcessorVersion is managed by google.
|
52
|
+
# @!attribute [rw] deprecation_info
|
53
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion::DeprecationInfo]
|
54
|
+
# If set, information about the eventual deprecation of this version.
|
55
|
+
class ProcessorVersion
|
56
|
+
include ::Google::Protobuf::MessageExts
|
57
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
58
|
+
|
59
|
+
# Information about the upcoming deprecation of this processor version.
|
60
|
+
# @!attribute [rw] deprecation_time
|
61
|
+
# @return [::Google::Protobuf::Timestamp]
|
62
|
+
# The time at which this processor version will be deprecated.
|
63
|
+
# @!attribute [rw] replacement_processor_version
|
64
|
+
# @return [::String]
|
65
|
+
# If set, the processor version that will be used as a replacement.
|
66
|
+
class DeprecationInfo
|
67
|
+
include ::Google::Protobuf::MessageExts
|
68
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
69
|
+
end
|
70
|
+
|
71
|
+
# The possible states of the processor version.
|
72
|
+
module State
|
73
|
+
# The processor version is in an unspecified state.
|
74
|
+
STATE_UNSPECIFIED = 0
|
75
|
+
|
76
|
+
# The processor version is deployed and can be used for processing.
|
77
|
+
DEPLOYED = 1
|
78
|
+
|
79
|
+
# The processor version is being deployed.
|
80
|
+
DEPLOYING = 2
|
81
|
+
|
82
|
+
# The processor version is not deployed and cannot be used for processing.
|
83
|
+
UNDEPLOYED = 3
|
84
|
+
|
85
|
+
# The processor version is being undeployed.
|
86
|
+
UNDEPLOYING = 4
|
87
|
+
|
88
|
+
# The processor version is being created.
|
89
|
+
CREATING = 5
|
90
|
+
|
91
|
+
# The processor version is being deleted.
|
92
|
+
DELETING = 6
|
93
|
+
|
94
|
+
# The processor version failed and is in an indeterminate state.
|
95
|
+
FAILED = 7
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# The first-class citizen for Document AI. Each processor defines how to
|
100
|
+
# extract structural information from a document.
|
26
101
|
# @!attribute [r] name
|
27
102
|
# @return [::String]
|
28
103
|
# Output only. Immutable. The resource name of the processor.
|
29
|
-
# Format: projects
|
104
|
+
# Format: `projects/{project}/locations/{location}/processors/{processor}`
|
30
105
|
# @!attribute [rw] type
|
31
106
|
# @return [::String]
|
32
|
-
# The processor type.
|
107
|
+
# The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc.
|
108
|
+
# To get a list of processors types, see
|
109
|
+
# {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}.
|
33
110
|
# @!attribute [rw] display_name
|
34
111
|
# @return [::String]
|
35
112
|
# The display name of the processor.
|
@@ -58,7 +135,9 @@ module Google
|
|
58
135
|
# The processor is in an unspecified state.
|
59
136
|
STATE_UNSPECIFIED = 0
|
60
137
|
|
61
|
-
# The processor is enabled.
|
138
|
+
# The processor is enabled, i.e., has an enabled version which can
|
139
|
+
# currently serve processing requests and all the feature dependencies have
|
140
|
+
# been successfully initialized.
|
62
141
|
ENABLED = 1
|
63
142
|
|
64
143
|
# The processor is disabled.
|
@@ -70,10 +149,16 @@ module Google
|
|
70
149
|
# The processor is being disabled, will become DISABLED if successful.
|
71
150
|
DISABLING = 4
|
72
151
|
|
73
|
-
# The processor is being created
|
152
|
+
# The processor is being created, will become either ENABLED (for
|
153
|
+
# successful creation) or FAILED (for failed ones).
|
154
|
+
# Once a processor is in this state, it can then be used for document
|
155
|
+
# processing, but the feature dependencies of the processor might not be
|
156
|
+
# fully created yet.
|
74
157
|
CREATING = 5
|
75
158
|
|
76
|
-
# The processor failed during creation
|
159
|
+
# The processor failed during creation or initialization of feature
|
160
|
+
# dependencies. The user should delete the processor and recreate one as
|
161
|
+
# all the functionalities of the processor are disabled.
|
77
162
|
FAILED = 6
|
78
163
|
|
79
164
|
# The processor is being deleted, will be removed if successful.
|
@@ -26,20 +26,23 @@ module Google
|
|
26
26
|
# @!attribute [rw] name
|
27
27
|
# @return [::String]
|
28
28
|
# The resource name of the processor type.
|
29
|
+
# Format: projects/\\{project}/processorTypes/\\{processor_type}
|
29
30
|
# @!attribute [rw] type
|
30
31
|
# @return [::String]
|
31
|
-
# The type of the processor.
|
32
|
+
# The type of the processor, e.g., "invoice_parsing".
|
32
33
|
# @!attribute [rw] category
|
33
34
|
# @return [::String]
|
34
|
-
# The processor category.
|
35
|
+
# The processor category, used by UI to group processor types.
|
35
36
|
# @!attribute [rw] available_locations
|
36
37
|
# @return [::Array<::Google::Cloud::DocumentAI::V1beta3::ProcessorType::LocationInfo>]
|
37
38
|
# The locations in which this processor is available.
|
38
39
|
# @!attribute [rw] allow_creation
|
39
40
|
# @return [::Boolean]
|
40
|
-
# Whether the processor type allows creation. If
|
41
|
-
# processor of this processor type. Otherwise,
|
42
|
-
#
|
41
|
+
# Whether the processor type allows creation. If true, users can create a
|
42
|
+
# processor of this processor type. Otherwise, users need to request access.
|
43
|
+
# @!attribute [rw] launch_stage
|
44
|
+
# @return [::Google::Api::LaunchStage]
|
45
|
+
# Launch stage of the processor type
|
43
46
|
class ProcessorType
|
44
47
|
include ::Google::Protobuf::MessageExts
|
45
48
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -47,7 +50,7 @@ module Google
|
|
47
50
|
# The location information about where the processor is available.
|
48
51
|
# @!attribute [rw] location_id
|
49
52
|
# @return [::String]
|
50
|
-
# The location id.
|
53
|
+
# The location id, currently must be one of [us, eu].
|
51
54
|
class LocationInfo
|
52
55
|
include ::Google::Protobuf::MessageExts
|
53
56
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -26,8 +26,6 @@ module Google
|
|
26
26
|
# service Foo {
|
27
27
|
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
28
|
# }
|
29
|
-
#
|
30
|
-
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
29
|
class Empty
|
32
30
|
include ::Google::Protobuf::MessageExts
|
33
31
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|