google-cloud-document_ai-v1 0.2.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +1490 -58
  4. data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +3 -0
  5. data/lib/google/cloud/document_ai/v1/document_processor_service/paths.rb +38 -0
  6. data/lib/google/cloud/document_ai/v1/version.rb +1 -1
  7. data/lib/google/cloud/document_ai/v1.rb +2 -0
  8. data/lib/google/cloud/documentai/v1/barcode_pb.rb +24 -0
  9. data/lib/google/cloud/documentai/v1/document_io_pb.rb +0 -1
  10. data/lib/google/cloud/documentai/v1/document_pb.rb +20 -2
  11. data/lib/google/cloud/documentai/v1/document_processor_service_pb.rb +142 -1
  12. data/lib/google/cloud/documentai/v1/document_processor_service_services_pb.rb +34 -0
  13. data/lib/google/cloud/documentai/v1/document_schema_pb.rb +60 -0
  14. data/lib/google/cloud/documentai/v1/geometry_pb.rb +0 -1
  15. data/lib/google/cloud/documentai/v1/operation_metadata_pb.rb +3 -2
  16. data/lib/google/cloud/documentai/v1/processor_pb.rb +71 -0
  17. data/lib/google/cloud/documentai/v1/processor_type_pb.rb +34 -0
  18. data/proto_docs/google/api/launch_stage.rb +71 -0
  19. data/proto_docs/google/cloud/documentai/v1/barcode.rb +71 -0
  20. data/proto_docs/google/cloud/documentai/v1/document.rb +87 -31
  21. data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +354 -5
  22. data/proto_docs/google/cloud/documentai/v1/document_schema.rb +154 -0
  23. data/proto_docs/google/cloud/documentai/v1/operation_metadata.rb +3 -0
  24. data/proto_docs/google/cloud/documentai/v1/processor.rb +171 -0
  25. data/proto_docs/google/cloud/documentai/v1/processor_type.rb +62 -0
  26. data/proto_docs/google/protobuf/any.rb +3 -3
  27. data/proto_docs/google/protobuf/empty.rb +0 -2
  28. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  29. metadata +41 -12
@@ -30,11 +30,19 @@ module Google
30
30
  # A raw document content (bytes).
31
31
  # @!attribute [rw] name
32
32
  # @return [::String]
33
- # Required. The processor resource name.
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.
38
46
  class ProcessRequest
39
47
  include ::Google::Protobuf::MessageExts
40
48
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -95,7 +103,11 @@ module Google
95
103
  # Request message for batch process document method.
96
104
  # @!attribute [rw] name
97
105
  # @return [::String]
98
- # Required. The processor resource name.
106
+ # Required. The resource name of {::Google::Cloud::DocumentAI::V1::Processor Processor} or
107
+ # {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion}.
108
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`,
109
+ # or
110
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
99
111
  # @!attribute [rw] input_documents
100
112
  # @return [::Google::Cloud::DocumentAI::V1::BatchDocumentsInputConfig]
101
113
  # The input documents for batch process.
@@ -147,10 +159,10 @@ module Google
147
159
  # document during the process.
148
160
  # @!attribute [rw] status
149
161
  # @return [::Google::Rpc::Status]
150
- # The status of the processing of the document.
162
+ # The status processing the document.
151
163
  # @!attribute [rw] output_gcs_destination
152
164
  # @return [::String]
153
- # The output_gcs_destination (in the request as 'output_gcs_destination')
165
+ # The output_gcs_destination (in the request as `output_gcs_destination`)
154
166
  # of the processed document if it was successful, otherwise empty.
155
167
  # @!attribute [rw] human_review_status
156
168
  # @return [::Google::Cloud::DocumentAI::V1::HumanReviewStatus]
@@ -185,6 +197,318 @@ module Google
185
197
  end
186
198
  end
187
199
 
200
+ # Request message for fetch processor types.
201
+ # @!attribute [rw] parent
202
+ # @return [::String]
203
+ # Required. The project of processor type to list.
204
+ # The available processor types may depend on the allow-listing on projects.
205
+ # Format: `projects/{project}/locations/{location}`
206
+ class FetchProcessorTypesRequest
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+ end
210
+
211
+ # Response message for fetch processor types.
212
+ # @!attribute [rw] processor_types
213
+ # @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorType>]
214
+ # The list of processor types.
215
+ class FetchProcessorTypesResponse
216
+ include ::Google::Protobuf::MessageExts
217
+ extend ::Google::Protobuf::MessageExts::ClassMethods
218
+ end
219
+
220
+ # Request message for list processor types.
221
+ # @!attribute [rw] parent
222
+ # @return [::String]
223
+ # Required. The location of processor type to list.
224
+ # The available processor types may depend on the allow-listing on projects.
225
+ # Format: `projects/{project}/locations/{location}`
226
+ # @!attribute [rw] page_size
227
+ # @return [::Integer]
228
+ # The maximum number of processor types to return.
229
+ # If unspecified, at most 100 processor types will be returned.
230
+ # The maximum value is 500; values above 500 will be coerced to 500.
231
+ # @!attribute [rw] page_token
232
+ # @return [::String]
233
+ # Used to retrieve the next page of results, empty if at the end of the list.
234
+ class ListProcessorTypesRequest
235
+ include ::Google::Protobuf::MessageExts
236
+ extend ::Google::Protobuf::MessageExts::ClassMethods
237
+ end
238
+
239
+ # Response message for list processor types.
240
+ # @!attribute [rw] processor_types
241
+ # @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorType>]
242
+ # The processor types.
243
+ # @!attribute [rw] next_page_token
244
+ # @return [::String]
245
+ # Points to the next page, otherwise empty.
246
+ class ListProcessorTypesResponse
247
+ include ::Google::Protobuf::MessageExts
248
+ extend ::Google::Protobuf::MessageExts::ClassMethods
249
+ end
250
+
251
+ # Request message for list all processors belongs to a project.
252
+ # @!attribute [rw] parent
253
+ # @return [::String]
254
+ # Required. The parent (project and location) which owns this collection of Processors.
255
+ # Format: `projects/{project}/locations/{location}`
256
+ # @!attribute [rw] page_size
257
+ # @return [::Integer]
258
+ # The maximum number of processors to return.
259
+ # If unspecified, at most 50 processors will be returned.
260
+ # The maximum value is 100; values above 100 will be coerced to 100.
261
+ # @!attribute [rw] page_token
262
+ # @return [::String]
263
+ # We will return the processors sorted by creation time. The page token
264
+ # will point to the next processor.
265
+ class ListProcessorsRequest
266
+ include ::Google::Protobuf::MessageExts
267
+ extend ::Google::Protobuf::MessageExts::ClassMethods
268
+ end
269
+
270
+ # Response message for list processors.
271
+ # @!attribute [rw] processors
272
+ # @return [::Array<::Google::Cloud::DocumentAI::V1::Processor>]
273
+ # The list of processors.
274
+ # @!attribute [rw] next_page_token
275
+ # @return [::String]
276
+ # Points to the next processor, otherwise empty.
277
+ class ListProcessorsResponse
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+ end
281
+
282
+ # Request message for get processor.
283
+ # @!attribute [rw] name
284
+ # @return [::String]
285
+ # Required. The processor resource name.
286
+ class GetProcessorRequest
287
+ include ::Google::Protobuf::MessageExts
288
+ extend ::Google::Protobuf::MessageExts::ClassMethods
289
+ end
290
+
291
+ # Request message for get processor version.
292
+ # @!attribute [rw] name
293
+ # @return [::String]
294
+ # Required. The processor resource name.
295
+ class GetProcessorVersionRequest
296
+ include ::Google::Protobuf::MessageExts
297
+ extend ::Google::Protobuf::MessageExts::ClassMethods
298
+ end
299
+
300
+ # Request message for list all processor versions belongs to a processor.
301
+ # @!attribute [rw] parent
302
+ # @return [::String]
303
+ # Required. The parent (project, location and processor) to list all versions.
304
+ # Format: `projects/{project}/locations/{location}/processors/{processor}`
305
+ # @!attribute [rw] page_size
306
+ # @return [::Integer]
307
+ # The maximum number of processor versions to return.
308
+ # If unspecified, at most 10 processor versions will be returned.
309
+ # The maximum value is 20; values above 20 will be coerced to 20.
310
+ # @!attribute [rw] page_token
311
+ # @return [::String]
312
+ # We will return the processor versions sorted by creation time. The page
313
+ # token will point to the next processor version.
314
+ class ListProcessorVersionsRequest
315
+ include ::Google::Protobuf::MessageExts
316
+ extend ::Google::Protobuf::MessageExts::ClassMethods
317
+ end
318
+
319
+ # Response message for list processors.
320
+ # @!attribute [rw] processor_versions
321
+ # @return [::Array<::Google::Cloud::DocumentAI::V1::ProcessorVersion>]
322
+ # The list of processors.
323
+ # @!attribute [rw] next_page_token
324
+ # @return [::String]
325
+ # Points to the next processor, otherwise empty.
326
+ class ListProcessorVersionsResponse
327
+ include ::Google::Protobuf::MessageExts
328
+ extend ::Google::Protobuf::MessageExts::ClassMethods
329
+ end
330
+
331
+ # Request message for the delete processor version method.
332
+ # @!attribute [rw] name
333
+ # @return [::String]
334
+ # Required. The processor version resource name to be deleted.
335
+ class DeleteProcessorVersionRequest
336
+ include ::Google::Protobuf::MessageExts
337
+ extend ::Google::Protobuf::MessageExts::ClassMethods
338
+ end
339
+
340
+ # The long running operation metadata for delete processor version method.
341
+ # @!attribute [rw] common_metadata
342
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
343
+ # The basic metadata of the long running operation.
344
+ class DeleteProcessorVersionMetadata
345
+ include ::Google::Protobuf::MessageExts
346
+ extend ::Google::Protobuf::MessageExts::ClassMethods
347
+ end
348
+
349
+ # Request message for the deploy processor version method.
350
+ # @!attribute [rw] name
351
+ # @return [::String]
352
+ # Required. The processor version resource name to be deployed.
353
+ class DeployProcessorVersionRequest
354
+ include ::Google::Protobuf::MessageExts
355
+ extend ::Google::Protobuf::MessageExts::ClassMethods
356
+ end
357
+
358
+ # Response message for the deploy processor version method.
359
+ class DeployProcessorVersionResponse
360
+ include ::Google::Protobuf::MessageExts
361
+ extend ::Google::Protobuf::MessageExts::ClassMethods
362
+ end
363
+
364
+ # The long running operation metadata for deploy processor version method.
365
+ # @!attribute [rw] common_metadata
366
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
367
+ # The basic metadata of the long running operation.
368
+ class DeployProcessorVersionMetadata
369
+ include ::Google::Protobuf::MessageExts
370
+ extend ::Google::Protobuf::MessageExts::ClassMethods
371
+ end
372
+
373
+ # Request message for the undeploy processor version method.
374
+ # @!attribute [rw] name
375
+ # @return [::String]
376
+ # Required. The processor version resource name to be undeployed.
377
+ class UndeployProcessorVersionRequest
378
+ include ::Google::Protobuf::MessageExts
379
+ extend ::Google::Protobuf::MessageExts::ClassMethods
380
+ end
381
+
382
+ # Response message for the undeploy processor version method.
383
+ class UndeployProcessorVersionResponse
384
+ include ::Google::Protobuf::MessageExts
385
+ extend ::Google::Protobuf::MessageExts::ClassMethods
386
+ end
387
+
388
+ # The long running operation metadata for the undeploy processor version
389
+ # method.
390
+ # @!attribute [rw] common_metadata
391
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
392
+ # The basic metadata of the long running operation.
393
+ class UndeployProcessorVersionMetadata
394
+ include ::Google::Protobuf::MessageExts
395
+ extend ::Google::Protobuf::MessageExts::ClassMethods
396
+ end
397
+
398
+ # Request message for create a processor. Notice this request is sent to
399
+ # a regionalized backend service, and if the processor type is not available
400
+ # on that region, the creation will fail.
401
+ # @!attribute [rw] parent
402
+ # @return [::String]
403
+ # Required. The parent (project and location) under which to create the processor.
404
+ # Format: `projects/{project}/locations/{location}`
405
+ # @!attribute [rw] processor
406
+ # @return [::Google::Cloud::DocumentAI::V1::Processor]
407
+ # Required. The processor to be created, requires [processor_type] and [display_name]
408
+ # to be set. Also, the processor is under CMEK if CMEK fields are set.
409
+ class CreateProcessorRequest
410
+ include ::Google::Protobuf::MessageExts
411
+ extend ::Google::Protobuf::MessageExts::ClassMethods
412
+ end
413
+
414
+ # Request message for the delete processor method.
415
+ # @!attribute [rw] name
416
+ # @return [::String]
417
+ # Required. The processor resource name to be deleted.
418
+ class DeleteProcessorRequest
419
+ include ::Google::Protobuf::MessageExts
420
+ extend ::Google::Protobuf::MessageExts::ClassMethods
421
+ end
422
+
423
+ # The long running operation metadata for delete processor method.
424
+ # @!attribute [rw] common_metadata
425
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
426
+ # The basic metadata of the long running operation.
427
+ class DeleteProcessorMetadata
428
+ include ::Google::Protobuf::MessageExts
429
+ extend ::Google::Protobuf::MessageExts::ClassMethods
430
+ end
431
+
432
+ # Request message for the enable processor method.
433
+ # @!attribute [rw] name
434
+ # @return [::String]
435
+ # Required. The processor resource name to be enabled.
436
+ class EnableProcessorRequest
437
+ include ::Google::Protobuf::MessageExts
438
+ extend ::Google::Protobuf::MessageExts::ClassMethods
439
+ end
440
+
441
+ # Response message for the enable processor method.
442
+ # Intentionally empty proto for adding fields in future.
443
+ class EnableProcessorResponse
444
+ include ::Google::Protobuf::MessageExts
445
+ extend ::Google::Protobuf::MessageExts::ClassMethods
446
+ end
447
+
448
+ # The long running operation metadata for enable processor method.
449
+ # @!attribute [rw] common_metadata
450
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
451
+ # The basic metadata of the long running operation.
452
+ class EnableProcessorMetadata
453
+ include ::Google::Protobuf::MessageExts
454
+ extend ::Google::Protobuf::MessageExts::ClassMethods
455
+ end
456
+
457
+ # Request message for the disable processor method.
458
+ # @!attribute [rw] name
459
+ # @return [::String]
460
+ # Required. The processor resource name to be disabled.
461
+ class DisableProcessorRequest
462
+ include ::Google::Protobuf::MessageExts
463
+ extend ::Google::Protobuf::MessageExts::ClassMethods
464
+ end
465
+
466
+ # Response message for the disable processor method.
467
+ # Intentionally empty proto for adding fields in future.
468
+ class DisableProcessorResponse
469
+ include ::Google::Protobuf::MessageExts
470
+ extend ::Google::Protobuf::MessageExts::ClassMethods
471
+ end
472
+
473
+ # The long running operation metadata for disable processor method.
474
+ # @!attribute [rw] common_metadata
475
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
476
+ # The basic metadata of the long running operation.
477
+ class DisableProcessorMetadata
478
+ include ::Google::Protobuf::MessageExts
479
+ extend ::Google::Protobuf::MessageExts::ClassMethods
480
+ end
481
+
482
+ # Request message for the set default processor version method.
483
+ # @!attribute [rw] processor
484
+ # @return [::String]
485
+ # Required. The resource name of the {::Google::Cloud::DocumentAI::V1::Processor Processor} to change default version.
486
+ # @!attribute [rw] default_processor_version
487
+ # @return [::String]
488
+ # Required. The resource name of child {::Google::Cloud::DocumentAI::V1::ProcessorVersion ProcessorVersion} to use as default.
489
+ # Format:
490
+ # `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
491
+ class SetDefaultProcessorVersionRequest
492
+ include ::Google::Protobuf::MessageExts
493
+ extend ::Google::Protobuf::MessageExts::ClassMethods
494
+ end
495
+
496
+ # Response message for set default processor version method.
497
+ class SetDefaultProcessorVersionResponse
498
+ include ::Google::Protobuf::MessageExts
499
+ extend ::Google::Protobuf::MessageExts::ClassMethods
500
+ end
501
+
502
+ # The long running operation metadata for set default processor version
503
+ # method.
504
+ # @!attribute [rw] common_metadata
505
+ # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
506
+ # The basic metadata of the long running operation.
507
+ class SetDefaultProcessorVersionMetadata
508
+ include ::Google::Protobuf::MessageExts
509
+ extend ::Google::Protobuf::MessageExts::ClassMethods
510
+ end
511
+
188
512
  # Request message for review document method.
189
513
  # @!attribute [rw] inline_document
190
514
  # @return [::Google::Cloud::DocumentAI::V1::Document]
@@ -199,6 +523,9 @@ module Google
199
523
  # @!attribute [rw] priority
200
524
  # @return [::Google::Cloud::DocumentAI::V1::ReviewDocumentRequest::Priority]
201
525
  # The priority of the human review task.
526
+ # @!attribute [rw] document_schema
527
+ # @return [::Google::Cloud::DocumentAI::V1::DocumentSchema]
528
+ # The document schema of the human review task.
202
529
  class ReviewDocumentRequest
203
530
  include ::Google::Protobuf::MessageExts
204
531
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -217,16 +544,38 @@ module Google
217
544
  # Response message for review document method.
218
545
  # @!attribute [rw] gcs_destination
219
546
  # @return [::String]
220
- # The Cloud Storage uri for the human reviewed document.
547
+ # The Cloud Storage uri for the human reviewed document if the review is
548
+ # succeeded.
549
+ # @!attribute [rw] state
550
+ # @return [::Google::Cloud::DocumentAI::V1::ReviewDocumentResponse::State]
551
+ # The state of the review operation.
552
+ # @!attribute [rw] rejection_reason
553
+ # @return [::String]
554
+ # The reason why the review is rejected by reviewer.
221
555
  class ReviewDocumentResponse
222
556
  include ::Google::Protobuf::MessageExts
223
557
  extend ::Google::Protobuf::MessageExts::ClassMethods
558
+
559
+ # Possible states of the review operation.
560
+ module State
561
+ # The default value. This value is used if the state is omitted.
562
+ STATE_UNSPECIFIED = 0
563
+
564
+ # The review operation is rejected by the reviewer.
565
+ REJECTED = 1
566
+
567
+ # The review operation is succeeded.
568
+ SUCCEEDED = 2
569
+ end
224
570
  end
225
571
 
226
572
  # The long running operation metadata for review document method.
227
573
  # @!attribute [rw] common_metadata
228
574
  # @return [::Google::Cloud::DocumentAI::V1::CommonOperationMetadata]
229
575
  # The basic metadata of the long running operation.
576
+ # @!attribute [rw] question_id
577
+ # @return [::String]
578
+ # The Crowd Compute question ID.
230
579
  class ReviewDocumentOperationMetadata
231
580
  include ::Google::Protobuf::MessageExts
232
581
  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 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
+ # - *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::V1::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::V1::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.