google-apis-documentai_v1 0.12.0 → 0.16.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.
@@ -22,6 +22,70 @@ module Google
22
22
  module Apis
23
23
  module DocumentaiV1
24
24
 
25
+ #
26
+ class GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The common metadata for long running operations.
30
+ # Corresponds to the JSON property `commonMetadata`
31
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
32
+ attr_accessor :common_metadata
33
+
34
+ def initialize(**args)
35
+ update!(**args)
36
+ end
37
+
38
+ # Update properties of this object
39
+ def update!(**args)
40
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
41
+ end
42
+ end
43
+
44
+ # Response of the delete documents operation.
45
+ class GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse
46
+ include Google::Apis::Core::Hashable
47
+
48
+ def initialize(**args)
49
+ update!(**args)
50
+ end
51
+
52
+ # Update properties of this object
53
+ def update!(**args)
54
+ end
55
+ end
56
+
57
+ #
58
+ class GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata
59
+ include Google::Apis::Core::Hashable
60
+
61
+ # The common metadata for long running operations.
62
+ # Corresponds to the JSON property `commonMetadata`
63
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
64
+ attr_accessor :common_metadata
65
+
66
+ def initialize(**args)
67
+ update!(**args)
68
+ end
69
+
70
+ # Update properties of this object
71
+ def update!(**args)
72
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
73
+ end
74
+ end
75
+
76
+ # Response of the batch move documents operation.
77
+ class GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsResponse
78
+ include Google::Apis::Core::Hashable
79
+
80
+ def initialize(**args)
81
+ update!(**args)
82
+ end
83
+
84
+ # Update properties of this object
85
+ def update!(**args)
86
+ end
87
+ end
88
+
25
89
  # The common metadata for long running operations.
26
90
  class GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata
27
91
  include Google::Apis::Core::Hashable
@@ -309,6 +373,38 @@ module Google
309
373
  end
310
374
  end
311
375
 
376
+ # Metadata of the import document operation.
377
+ class GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata
378
+ include Google::Apis::Core::Hashable
379
+
380
+ # The common metadata for long running operations.
381
+ # Corresponds to the JSON property `commonMetadata`
382
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
383
+ attr_accessor :common_metadata
384
+
385
+ def initialize(**args)
386
+ update!(**args)
387
+ end
388
+
389
+ # Update properties of this object
390
+ def update!(**args)
391
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
392
+ end
393
+ end
394
+
395
+ # Response of the import document operation.
396
+ class GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse
397
+ include Google::Apis::Core::Hashable
398
+
399
+ def initialize(**args)
400
+ update!(**args)
401
+ end
402
+
403
+ # Update properties of this object
404
+ def update!(**args)
405
+ end
406
+ end
407
+
312
408
  # The long running operation metadata for set default processor version method.
313
409
  class GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata
314
410
  include Google::Apis::Core::Hashable
@@ -466,6 +562,25 @@ module Google
466
562
  end
467
563
  end
468
564
 
565
+ #
566
+ class GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata
567
+ include Google::Apis::Core::Hashable
568
+
569
+ # The common metadata for long running operations.
570
+ # Corresponds to the JSON property `commonMetadata`
571
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata]
572
+ attr_accessor :common_metadata
573
+
574
+ def initialize(**args)
575
+ update!(**args)
576
+ end
577
+
578
+ # Update properties of this object
579
+ def update!(**args)
580
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
581
+ end
582
+ end
583
+
469
584
  # The long running operation metadata for updating the human review
470
585
  # configuration.
471
586
  class GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata
@@ -729,6 +844,135 @@ module Google
729
844
  end
730
845
  end
731
846
 
847
+ # The long running operation metadata for delete processor method.
848
+ class GoogleCloudDocumentaiV1DeleteProcessorMetadata
849
+ include Google::Apis::Core::Hashable
850
+
851
+ # The common metadata for long running operations.
852
+ # Corresponds to the JSON property `commonMetadata`
853
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
854
+ attr_accessor :common_metadata
855
+
856
+ def initialize(**args)
857
+ update!(**args)
858
+ end
859
+
860
+ # Update properties of this object
861
+ def update!(**args)
862
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
863
+ end
864
+ end
865
+
866
+ # The long running operation metadata for delete processor version method.
867
+ class GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata
868
+ include Google::Apis::Core::Hashable
869
+
870
+ # The common metadata for long running operations.
871
+ # Corresponds to the JSON property `commonMetadata`
872
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
873
+ attr_accessor :common_metadata
874
+
875
+ def initialize(**args)
876
+ update!(**args)
877
+ end
878
+
879
+ # Update properties of this object
880
+ def update!(**args)
881
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
882
+ end
883
+ end
884
+
885
+ # The long running operation metadata for deploy processor version method.
886
+ class GoogleCloudDocumentaiV1DeployProcessorVersionMetadata
887
+ include Google::Apis::Core::Hashable
888
+
889
+ # The common metadata for long running operations.
890
+ # Corresponds to the JSON property `commonMetadata`
891
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
892
+ attr_accessor :common_metadata
893
+
894
+ def initialize(**args)
895
+ update!(**args)
896
+ end
897
+
898
+ # Update properties of this object
899
+ def update!(**args)
900
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
901
+ end
902
+ end
903
+
904
+ # Request message for the deploy processor version method.
905
+ class GoogleCloudDocumentaiV1DeployProcessorVersionRequest
906
+ include Google::Apis::Core::Hashable
907
+
908
+ def initialize(**args)
909
+ update!(**args)
910
+ end
911
+
912
+ # Update properties of this object
913
+ def update!(**args)
914
+ end
915
+ end
916
+
917
+ # Response message for the deploy processor version method.
918
+ class GoogleCloudDocumentaiV1DeployProcessorVersionResponse
919
+ include Google::Apis::Core::Hashable
920
+
921
+ def initialize(**args)
922
+ update!(**args)
923
+ end
924
+
925
+ # Update properties of this object
926
+ def update!(**args)
927
+ end
928
+ end
929
+
930
+ # The long running operation metadata for disable processor method.
931
+ class GoogleCloudDocumentaiV1DisableProcessorMetadata
932
+ include Google::Apis::Core::Hashable
933
+
934
+ # The common metadata for long running operations.
935
+ # Corresponds to the JSON property `commonMetadata`
936
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
937
+ attr_accessor :common_metadata
938
+
939
+ def initialize(**args)
940
+ update!(**args)
941
+ end
942
+
943
+ # Update properties of this object
944
+ def update!(**args)
945
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
946
+ end
947
+ end
948
+
949
+ # Request message for the disable processor method.
950
+ class GoogleCloudDocumentaiV1DisableProcessorRequest
951
+ include Google::Apis::Core::Hashable
952
+
953
+ def initialize(**args)
954
+ update!(**args)
955
+ end
956
+
957
+ # Update properties of this object
958
+ def update!(**args)
959
+ end
960
+ end
961
+
962
+ # Response message for the disable processor method. Intentionally empty proto
963
+ # for adding fields in future.
964
+ class GoogleCloudDocumentaiV1DisableProcessorResponse
965
+ include Google::Apis::Core::Hashable
966
+
967
+ def initialize(**args)
968
+ update!(**args)
969
+ end
970
+
971
+ # Update properties of this object
972
+ def update!(**args)
973
+ end
974
+ end
975
+
732
976
  # Document represents the canonical document resource in Document Understanding
733
977
  # AI. It is an interchange format that provides insights into documents and
734
978
  # allows for collaboration between users and Document Understanding AI to
@@ -834,8 +1078,9 @@ module Google
834
1078
  end
835
1079
  end
836
1080
 
837
- # A phrase in the text that is a known entity type, such as a person, an
838
- # organization, or location.
1081
+ # An entity that could be a phrase in the text or a property belongs to the
1082
+ # document. It is a known entity type, such as a person, an organization, or
1083
+ # location.
839
1084
  class GoogleCloudDocumentaiV1DocumentEntity
840
1085
  include Google::Apis::Core::Hashable
841
1086
 
@@ -855,7 +1100,8 @@ module Google
855
1100
  # @return [String]
856
1101
  attr_accessor :mention_id
857
1102
 
858
- # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
1103
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the
1104
+ # entity is not present in the document, this field will be empty.
859
1105
  # Corresponds to the JSON property `mentionText`
860
1106
  # @return [String]
861
1107
  attr_accessor :mention_text
@@ -974,17 +1220,29 @@ module Google
974
1220
  # @return [Google::Apis::DocumentaiV1::GoogleTypeDateTime]
975
1221
  attr_accessor :datetime_value
976
1222
 
1223
+ # Float value.
1224
+ # Corresponds to the JSON property `floatValue`
1225
+ # @return [Float]
1226
+ attr_accessor :float_value
1227
+
1228
+ # Integer value.
1229
+ # Corresponds to the JSON property `integerValue`
1230
+ # @return [Fixnum]
1231
+ attr_accessor :integer_value
1232
+
977
1233
  # Represents an amount of money with its currency type.
978
1234
  # Corresponds to the JSON property `moneyValue`
979
1235
  # @return [Google::Apis::DocumentaiV1::GoogleTypeMoney]
980
1236
  attr_accessor :money_value
981
1237
 
982
- # Required. Normalized entity value stored as a string. This field is populated
983
- # for supported document type (e.g. Invoice). For some entity types, one of
984
- # respective 'structured_value' fields may also be populated. - Money/Currency
985
- # type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`)
986
- # is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the
987
- # ISO 8601 text format.
1238
+ # Optional. An optional field to store a normalized string. For some entity
1239
+ # types, one of respective 'structured_value' fields may also be populated. Also
1240
+ # not all the types of 'structured_value' will be normalized. For example, some
1241
+ # processors may not generate float or int normalized text by default. Below are
1242
+ # sample formats mapped to structured values. - Money/Currency type (`
1243
+ # money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in
1244
+ # the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO
1245
+ # 8601 text format.
988
1246
  # Corresponds to the JSON property `text`
989
1247
  # @return [String]
990
1248
  attr_accessor :text
@@ -999,6 +1257,8 @@ module Google
999
1257
  @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
1000
1258
  @date_value = args[:date_value] if args.key?(:date_value)
1001
1259
  @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
1260
+ @float_value = args[:float_value] if args.key?(:float_value)
1261
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
1002
1262
  @money_value = args[:money_value] if args.key?(:money_value)
1003
1263
  @text = args[:text] if args.key?(:text)
1004
1264
  end
@@ -1340,6 +1600,20 @@ module Google
1340
1600
  class GoogleCloudDocumentaiV1DocumentPageFormField
1341
1601
  include Google::Apis::Core::Hashable
1342
1602
 
1603
+ # Created for Labeling UI to export key text. If corrections were made to the
1604
+ # text identified by the `field_name.text_anchor`, this field will contain the
1605
+ # correction.
1606
+ # Corresponds to the JSON property `correctedKeyText`
1607
+ # @return [String]
1608
+ attr_accessor :corrected_key_text
1609
+
1610
+ # Created for Labeling UI to export value text. If corrections were made to the
1611
+ # text identified by the `field_value.text_anchor`, this field will contain the
1612
+ # correction.
1613
+ # Corresponds to the JSON property `correctedValueText`
1614
+ # @return [String]
1615
+ attr_accessor :corrected_value_text
1616
+
1343
1617
  # Visual element describing a layout unit on a page.
1344
1618
  # Corresponds to the JSON property `fieldName`
1345
1619
  # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentPageLayout]
@@ -1379,6 +1653,8 @@ module Google
1379
1653
 
1380
1654
  # Update properties of this object
1381
1655
  def update!(**args)
1656
+ @corrected_key_text = args[:corrected_key_text] if args.key?(:corrected_key_text)
1657
+ @corrected_value_text = args[:corrected_value_text] if args.key?(:corrected_value_text)
1382
1658
  @field_name = args[:field_name] if args.key?(:field_name)
1383
1659
  @field_value = args[:field_value] if args.key?(:field_value)
1384
1660
  @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages)
@@ -2191,19 +2467,14 @@ module Google
2191
2467
  end
2192
2468
  end
2193
2469
 
2194
- # Specifies a document stored on Cloud Storage.
2195
- class GoogleCloudDocumentaiV1GcsDocument
2470
+ # The long running operation metadata for enable processor method.
2471
+ class GoogleCloudDocumentaiV1EnableProcessorMetadata
2196
2472
  include Google::Apis::Core::Hashable
2197
2473
 
2198
- # The Cloud Storage object uri.
2199
- # Corresponds to the JSON property `gcsUri`
2200
- # @return [String]
2201
- attr_accessor :gcs_uri
2202
-
2203
- # An IANA MIME type (RFC6838) of the content.
2204
- # Corresponds to the JSON property `mimeType`
2205
- # @return [String]
2206
- attr_accessor :mime_type
2474
+ # The common metadata for long running operations.
2475
+ # Corresponds to the JSON property `commonMetadata`
2476
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
2477
+ attr_accessor :common_metadata
2207
2478
 
2208
2479
  def initialize(**args)
2209
2480
  update!(**args)
@@ -2211,31 +2482,199 @@ module Google
2211
2482
 
2212
2483
  # Update properties of this object
2213
2484
  def update!(**args)
2214
- @gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
2215
- @mime_type = args[:mime_type] if args.key?(:mime_type)
2485
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
2216
2486
  end
2217
2487
  end
2218
2488
 
2219
- # Specifies a set of documents on Cloud Storage.
2220
- class GoogleCloudDocumentaiV1GcsDocuments
2489
+ # Request message for the enable processor method.
2490
+ class GoogleCloudDocumentaiV1EnableProcessorRequest
2221
2491
  include Google::Apis::Core::Hashable
2222
2492
 
2223
- # The list of documents.
2224
- # Corresponds to the JSON property `documents`
2225
- # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1GcsDocument>]
2226
- attr_accessor :documents
2227
-
2228
2493
  def initialize(**args)
2229
2494
  update!(**args)
2230
2495
  end
2231
2496
 
2232
2497
  # Update properties of this object
2233
2498
  def update!(**args)
2234
- @documents = args[:documents] if args.key?(:documents)
2235
2499
  end
2236
2500
  end
2237
2501
 
2238
- # Specifies all documents on Cloud Storage with a common prefix.
2502
+ # Response message for the enable processor method. Intentionally empty proto
2503
+ # for adding fields in future.
2504
+ class GoogleCloudDocumentaiV1EnableProcessorResponse
2505
+ include Google::Apis::Core::Hashable
2506
+
2507
+ def initialize(**args)
2508
+ update!(**args)
2509
+ end
2510
+
2511
+ # Update properties of this object
2512
+ def update!(**args)
2513
+ end
2514
+ end
2515
+
2516
+ # Evaluation metrics, either in aggregate or about a specific entity.
2517
+ class GoogleCloudDocumentaiV1EvaluationMetrics
2518
+ include Google::Apis::Core::Hashable
2519
+
2520
+ # The calculated f1 score.
2521
+ # Corresponds to the JSON property `f1Score`
2522
+ # @return [Float]
2523
+ attr_accessor :f1_score
2524
+
2525
+ # The amount of false negatives.
2526
+ # Corresponds to the JSON property `falseNegativesCount`
2527
+ # @return [Fixnum]
2528
+ attr_accessor :false_negatives_count
2529
+
2530
+ # The amount of false positives.
2531
+ # Corresponds to the JSON property `falsePositivesCount`
2532
+ # @return [Fixnum]
2533
+ attr_accessor :false_positives_count
2534
+
2535
+ # The amount of occurrences in ground truth documents.
2536
+ # Corresponds to the JSON property `groundTruthOccurrencesCount`
2537
+ # @return [Fixnum]
2538
+ attr_accessor :ground_truth_occurrences_count
2539
+
2540
+ # The calculated precision.
2541
+ # Corresponds to the JSON property `precision`
2542
+ # @return [Float]
2543
+ attr_accessor :precision
2544
+
2545
+ # The amount of occurrences in predicted documents.
2546
+ # Corresponds to the JSON property `predictedOccurrencesCount`
2547
+ # @return [Fixnum]
2548
+ attr_accessor :predicted_occurrences_count
2549
+
2550
+ # The calculated recall.
2551
+ # Corresponds to the JSON property `recall`
2552
+ # @return [Float]
2553
+ attr_accessor :recall
2554
+
2555
+ # The amount of documents that had an occurrence of this label.
2556
+ # Corresponds to the JSON property `totalDocumentsCount`
2557
+ # @return [Fixnum]
2558
+ attr_accessor :total_documents_count
2559
+
2560
+ # The amount of true positives.
2561
+ # Corresponds to the JSON property `truePositivesCount`
2562
+ # @return [Fixnum]
2563
+ attr_accessor :true_positives_count
2564
+
2565
+ def initialize(**args)
2566
+ update!(**args)
2567
+ end
2568
+
2569
+ # Update properties of this object
2570
+ def update!(**args)
2571
+ @f1_score = args[:f1_score] if args.key?(:f1_score)
2572
+ @false_negatives_count = args[:false_negatives_count] if args.key?(:false_negatives_count)
2573
+ @false_positives_count = args[:false_positives_count] if args.key?(:false_positives_count)
2574
+ @ground_truth_occurrences_count = args[:ground_truth_occurrences_count] if args.key?(:ground_truth_occurrences_count)
2575
+ @precision = args[:precision] if args.key?(:precision)
2576
+ @predicted_occurrences_count = args[:predicted_occurrences_count] if args.key?(:predicted_occurrences_count)
2577
+ @recall = args[:recall] if args.key?(:recall)
2578
+ @total_documents_count = args[:total_documents_count] if args.key?(:total_documents_count)
2579
+ @true_positives_count = args[:true_positives_count] if args.key?(:true_positives_count)
2580
+ end
2581
+ end
2582
+
2583
+ # Gives a short summary of an evaluation, and links to the evaluation itself.
2584
+ class GoogleCloudDocumentaiV1EvaluationReference
2585
+ include Google::Apis::Core::Hashable
2586
+
2587
+ # Evaluation metrics, either in aggregate or about a specific entity.
2588
+ # Corresponds to the JSON property `aggregateMetrics`
2589
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1EvaluationMetrics]
2590
+ attr_accessor :aggregate_metrics
2591
+
2592
+ # The resource name of the evaluation.
2593
+ # Corresponds to the JSON property `evaluation`
2594
+ # @return [String]
2595
+ attr_accessor :evaluation
2596
+
2597
+ # The resource name of the Long Running Operation for the evaluation.
2598
+ # Corresponds to the JSON property `operation`
2599
+ # @return [String]
2600
+ attr_accessor :operation
2601
+
2602
+ def initialize(**args)
2603
+ update!(**args)
2604
+ end
2605
+
2606
+ # Update properties of this object
2607
+ def update!(**args)
2608
+ @aggregate_metrics = args[:aggregate_metrics] if args.key?(:aggregate_metrics)
2609
+ @evaluation = args[:evaluation] if args.key?(:evaluation)
2610
+ @operation = args[:operation] if args.key?(:operation)
2611
+ end
2612
+ end
2613
+
2614
+ # Response message for fetch processor types.
2615
+ class GoogleCloudDocumentaiV1FetchProcessorTypesResponse
2616
+ include Google::Apis::Core::Hashable
2617
+
2618
+ # The list of processor types.
2619
+ # Corresponds to the JSON property `processorTypes`
2620
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorType>]
2621
+ attr_accessor :processor_types
2622
+
2623
+ def initialize(**args)
2624
+ update!(**args)
2625
+ end
2626
+
2627
+ # Update properties of this object
2628
+ def update!(**args)
2629
+ @processor_types = args[:processor_types] if args.key?(:processor_types)
2630
+ end
2631
+ end
2632
+
2633
+ # Specifies a document stored on Cloud Storage.
2634
+ class GoogleCloudDocumentaiV1GcsDocument
2635
+ include Google::Apis::Core::Hashable
2636
+
2637
+ # The Cloud Storage object uri.
2638
+ # Corresponds to the JSON property `gcsUri`
2639
+ # @return [String]
2640
+ attr_accessor :gcs_uri
2641
+
2642
+ # An IANA MIME type (RFC6838) of the content.
2643
+ # Corresponds to the JSON property `mimeType`
2644
+ # @return [String]
2645
+ attr_accessor :mime_type
2646
+
2647
+ def initialize(**args)
2648
+ update!(**args)
2649
+ end
2650
+
2651
+ # Update properties of this object
2652
+ def update!(**args)
2653
+ @gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
2654
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
2655
+ end
2656
+ end
2657
+
2658
+ # Specifies a set of documents on Cloud Storage.
2659
+ class GoogleCloudDocumentaiV1GcsDocuments
2660
+ include Google::Apis::Core::Hashable
2661
+
2662
+ # The list of documents.
2663
+ # Corresponds to the JSON property `documents`
2664
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1GcsDocument>]
2665
+ attr_accessor :documents
2666
+
2667
+ def initialize(**args)
2668
+ update!(**args)
2669
+ end
2670
+
2671
+ # Update properties of this object
2672
+ def update!(**args)
2673
+ @documents = args[:documents] if args.key?(:documents)
2674
+ end
2675
+ end
2676
+
2677
+ # Specifies all documents on Cloud Storage with a common prefix.
2239
2678
  class GoogleCloudDocumentaiV1GcsPrefix
2240
2679
  include Google::Apis::Core::Hashable
2241
2680
 
@@ -2288,6 +2727,56 @@ module Google
2288
2727
  end
2289
2728
  end
2290
2729
 
2730
+ # Response message for list processors.
2731
+ class GoogleCloudDocumentaiV1ListProcessorVersionsResponse
2732
+ include Google::Apis::Core::Hashable
2733
+
2734
+ # Points to the next processor, otherwise empty.
2735
+ # Corresponds to the JSON property `nextPageToken`
2736
+ # @return [String]
2737
+ attr_accessor :next_page_token
2738
+
2739
+ # The list of processors.
2740
+ # Corresponds to the JSON property `processorVersions`
2741
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorVersion>]
2742
+ attr_accessor :processor_versions
2743
+
2744
+ def initialize(**args)
2745
+ update!(**args)
2746
+ end
2747
+
2748
+ # Update properties of this object
2749
+ def update!(**args)
2750
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2751
+ @processor_versions = args[:processor_versions] if args.key?(:processor_versions)
2752
+ end
2753
+ end
2754
+
2755
+ # Response message for list processors.
2756
+ class GoogleCloudDocumentaiV1ListProcessorsResponse
2757
+ include Google::Apis::Core::Hashable
2758
+
2759
+ # Points to the next processor, otherwise empty.
2760
+ # Corresponds to the JSON property `nextPageToken`
2761
+ # @return [String]
2762
+ attr_accessor :next_page_token
2763
+
2764
+ # The list of processors.
2765
+ # Corresponds to the JSON property `processors`
2766
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Processor>]
2767
+ attr_accessor :processors
2768
+
2769
+ def initialize(**args)
2770
+ update!(**args)
2771
+ end
2772
+
2773
+ # Update properties of this object
2774
+ def update!(**args)
2775
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2776
+ @processors = args[:processors] if args.key?(:processors)
2777
+ end
2778
+ end
2779
+
2291
2780
  # A vertex represents a 2D point in the image. NOTE: the normalized vertex
2292
2781
  # coordinates are relative to the original image and range from 0 to 1.
2293
2782
  class GoogleCloudDocumentaiV1NormalizedVertex
@@ -2298,10 +2787,403 @@ module Google
2298
2787
  # @return [Float]
2299
2788
  attr_accessor :x
2300
2789
 
2301
- # Y coordinate (starts from the top of the image).
2302
- # Corresponds to the JSON property `y`
2303
- # @return [Float]
2304
- attr_accessor :y
2790
+ # Y coordinate (starts from the top of the image).
2791
+ # Corresponds to the JSON property `y`
2792
+ # @return [Float]
2793
+ attr_accessor :y
2794
+
2795
+ def initialize(**args)
2796
+ update!(**args)
2797
+ end
2798
+
2799
+ # Update properties of this object
2800
+ def update!(**args)
2801
+ @x = args[:x] if args.key?(:x)
2802
+ @y = args[:y] if args.key?(:y)
2803
+ end
2804
+ end
2805
+
2806
+ # Request message for the process document method.
2807
+ class GoogleCloudDocumentaiV1ProcessRequest
2808
+ include Google::Apis::Core::Hashable
2809
+
2810
+ # Document represents the canonical document resource in Document Understanding
2811
+ # AI. It is an interchange format that provides insights into documents and
2812
+ # allows for collaboration between users and Document Understanding AI to
2813
+ # iterate and optimize for quality.
2814
+ # Corresponds to the JSON property `inlineDocument`
2815
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Document]
2816
+ attr_accessor :inline_document
2817
+
2818
+ # Payload message of raw document content (bytes).
2819
+ # Corresponds to the JSON property `rawDocument`
2820
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1RawDocument]
2821
+ attr_accessor :raw_document
2822
+
2823
+ # Whether Human Review feature should be skipped for this request. Default to
2824
+ # false.
2825
+ # Corresponds to the JSON property `skipHumanReview`
2826
+ # @return [Boolean]
2827
+ attr_accessor :skip_human_review
2828
+ alias_method :skip_human_review?, :skip_human_review
2829
+
2830
+ def initialize(**args)
2831
+ update!(**args)
2832
+ end
2833
+
2834
+ # Update properties of this object
2835
+ def update!(**args)
2836
+ @inline_document = args[:inline_document] if args.key?(:inline_document)
2837
+ @raw_document = args[:raw_document] if args.key?(:raw_document)
2838
+ @skip_human_review = args[:skip_human_review] if args.key?(:skip_human_review)
2839
+ end
2840
+ end
2841
+
2842
+ # Response message for the process document method.
2843
+ class GoogleCloudDocumentaiV1ProcessResponse
2844
+ include Google::Apis::Core::Hashable
2845
+
2846
+ # Document represents the canonical document resource in Document Understanding
2847
+ # AI. It is an interchange format that provides insights into documents and
2848
+ # allows for collaboration between users and Document Understanding AI to
2849
+ # iterate and optimize for quality.
2850
+ # Corresponds to the JSON property `document`
2851
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Document]
2852
+ attr_accessor :document
2853
+
2854
+ # The status of human review on a processed document.
2855
+ # Corresponds to the JSON property `humanReviewStatus`
2856
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1HumanReviewStatus]
2857
+ attr_accessor :human_review_status
2858
+
2859
+ def initialize(**args)
2860
+ update!(**args)
2861
+ end
2862
+
2863
+ # Update properties of this object
2864
+ def update!(**args)
2865
+ @document = args[:document] if args.key?(:document)
2866
+ @human_review_status = args[:human_review_status] if args.key?(:human_review_status)
2867
+ end
2868
+ end
2869
+
2870
+ # The first-class citizen for DAI. Each processor defines how to extract
2871
+ # structural information from a document.
2872
+ class GoogleCloudDocumentaiV1Processor
2873
+ include Google::Apis::Core::Hashable
2874
+
2875
+ # The time the processor was created.
2876
+ # Corresponds to the JSON property `createTime`
2877
+ # @return [String]
2878
+ attr_accessor :create_time
2879
+
2880
+ # The default processor version.
2881
+ # Corresponds to the JSON property `defaultProcessorVersion`
2882
+ # @return [String]
2883
+ attr_accessor :default_processor_version
2884
+
2885
+ # The display name of the processor.
2886
+ # Corresponds to the JSON property `displayName`
2887
+ # @return [String]
2888
+ attr_accessor :display_name
2889
+
2890
+ # The KMS key used for encryption/decryption in CMEK scenarios. See https://
2891
+ # cloud.google.com/security-key-management.
2892
+ # Corresponds to the JSON property `kmsKeyName`
2893
+ # @return [String]
2894
+ attr_accessor :kms_key_name
2895
+
2896
+ # Output only. Immutable. The resource name of the processor. Format: projects/`
2897
+ # project`/locations/`location`/processors/`processor`
2898
+ # Corresponds to the JSON property `name`
2899
+ # @return [String]
2900
+ attr_accessor :name
2901
+
2902
+ # Output only. Immutable. The http endpoint that can be called to invoke
2903
+ # processing.
2904
+ # Corresponds to the JSON property `processEndpoint`
2905
+ # @return [String]
2906
+ attr_accessor :process_endpoint
2907
+
2908
+ # Output only. The state of the processor.
2909
+ # Corresponds to the JSON property `state`
2910
+ # @return [String]
2911
+ attr_accessor :state
2912
+
2913
+ # The processor type, e.g., INVOICE_PARSING, W2_PARSING, etc.
2914
+ # Corresponds to the JSON property `type`
2915
+ # @return [String]
2916
+ attr_accessor :type
2917
+
2918
+ def initialize(**args)
2919
+ update!(**args)
2920
+ end
2921
+
2922
+ # Update properties of this object
2923
+ def update!(**args)
2924
+ @create_time = args[:create_time] if args.key?(:create_time)
2925
+ @default_processor_version = args[:default_processor_version] if args.key?(:default_processor_version)
2926
+ @display_name = args[:display_name] if args.key?(:display_name)
2927
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
2928
+ @name = args[:name] if args.key?(:name)
2929
+ @process_endpoint = args[:process_endpoint] if args.key?(:process_endpoint)
2930
+ @state = args[:state] if args.key?(:state)
2931
+ @type = args[:type] if args.key?(:type)
2932
+ end
2933
+ end
2934
+
2935
+ # A processor type is responsible for performing a certain document
2936
+ # understanding task on a certain type of document. All processor types are
2937
+ # created by the documentai service internally. User will only list all
2938
+ # available processor types via UI. For different users (projects), the
2939
+ # available processor types may be different since we'll expose the access of
2940
+ # some types via EAP whitelisting. We make the ProcessorType a resource under
2941
+ # location so we have a unified API and keep the possibility that UI will load
2942
+ # different available processor types from different regions. But for alpha the
2943
+ # behavior is that the user will always get the union of all available processor
2944
+ # types among all regions no matter which regionalized endpoint is called, and
2945
+ # then we use the 'available_locations' field to show under which regions a
2946
+ # processor type is available. For example, users can call either the 'US' or '
2947
+ # EU' endpoint to feach processor types. In the return, we will have an 'invoice
2948
+ # parsing' processor with 'available_locations' field only containing 'US'. So
2949
+ # the user can try to create an 'invoice parsing' processor under the location '
2950
+ # US'. Such attempt of creating under the location 'EU' will fail. Next ID: 8.
2951
+ class GoogleCloudDocumentaiV1ProcessorType
2952
+ include Google::Apis::Core::Hashable
2953
+
2954
+ # Whether the processor type allows creation. If yes, user can create a
2955
+ # processor of this processor type. Otherwise, user needs to request access.
2956
+ # Corresponds to the JSON property `allowCreation`
2957
+ # @return [Boolean]
2958
+ attr_accessor :allow_creation
2959
+ alias_method :allow_creation?, :allow_creation
2960
+
2961
+ # The locations in which this processor is available.
2962
+ # Corresponds to the JSON property `availableLocations`
2963
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1ProcessorTypeLocationInfo>]
2964
+ attr_accessor :available_locations
2965
+
2966
+ # The processor category, used by UI to group processor types.
2967
+ # Corresponds to the JSON property `category`
2968
+ # @return [String]
2969
+ attr_accessor :category
2970
+
2971
+ # The resource name of the processor type. Format: projects/`project`/
2972
+ # processorTypes/`processor_type`
2973
+ # Corresponds to the JSON property `name`
2974
+ # @return [String]
2975
+ attr_accessor :name
2976
+
2977
+ # The type of the processor, e.g, "invoice_parsing".
2978
+ # Corresponds to the JSON property `type`
2979
+ # @return [String]
2980
+ attr_accessor :type
2981
+
2982
+ def initialize(**args)
2983
+ update!(**args)
2984
+ end
2985
+
2986
+ # Update properties of this object
2987
+ def update!(**args)
2988
+ @allow_creation = args[:allow_creation] if args.key?(:allow_creation)
2989
+ @available_locations = args[:available_locations] if args.key?(:available_locations)
2990
+ @category = args[:category] if args.key?(:category)
2991
+ @name = args[:name] if args.key?(:name)
2992
+ @type = args[:type] if args.key?(:type)
2993
+ end
2994
+ end
2995
+
2996
+ # The location information about where the processor is available.
2997
+ class GoogleCloudDocumentaiV1ProcessorTypeLocationInfo
2998
+ include Google::Apis::Core::Hashable
2999
+
3000
+ # The location id, currently must be one of [us, eu].
3001
+ # Corresponds to the JSON property `locationId`
3002
+ # @return [String]
3003
+ attr_accessor :location_id
3004
+
3005
+ def initialize(**args)
3006
+ update!(**args)
3007
+ end
3008
+
3009
+ # Update properties of this object
3010
+ def update!(**args)
3011
+ @location_id = args[:location_id] if args.key?(:location_id)
3012
+ end
3013
+ end
3014
+
3015
+ # A processor version is an implementation of a processor. Each processor can
3016
+ # have multiple versions, pre-trained by Google internally or up-trained by the
3017
+ # customer. At a time, a processor can only have one default version version. So
3018
+ # the processor's behavior (when processing documents) is defined by a default
3019
+ # version.
3020
+ class GoogleCloudDocumentaiV1ProcessorVersion
3021
+ include Google::Apis::Core::Hashable
3022
+
3023
+ # The time the processor version was created.
3024
+ # Corresponds to the JSON property `createTime`
3025
+ # @return [String]
3026
+ attr_accessor :create_time
3027
+
3028
+ # The display name of the processor version.
3029
+ # Corresponds to the JSON property `displayName`
3030
+ # @return [String]
3031
+ attr_accessor :display_name
3032
+
3033
+ # Gives a short summary of an evaluation, and links to the evaluation itself.
3034
+ # Corresponds to the JSON property `latestEvaluation`
3035
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1EvaluationReference]
3036
+ attr_accessor :latest_evaluation
3037
+
3038
+ # The resource name of the processor version. Format: projects/`project`/
3039
+ # locations/`location`/processors/`processor`/processorVersions/`
3040
+ # processor_version`
3041
+ # Corresponds to the JSON property `name`
3042
+ # @return [String]
3043
+ attr_accessor :name
3044
+
3045
+ # The schema defines the output of the processed document by a processor.
3046
+ # Corresponds to the JSON property `schema`
3047
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Schema]
3048
+ attr_accessor :schema
3049
+
3050
+ # The state of the processor version.
3051
+ # Corresponds to the JSON property `state`
3052
+ # @return [String]
3053
+ attr_accessor :state
3054
+
3055
+ def initialize(**args)
3056
+ update!(**args)
3057
+ end
3058
+
3059
+ # Update properties of this object
3060
+ def update!(**args)
3061
+ @create_time = args[:create_time] if args.key?(:create_time)
3062
+ @display_name = args[:display_name] if args.key?(:display_name)
3063
+ @latest_evaluation = args[:latest_evaluation] if args.key?(:latest_evaluation)
3064
+ @name = args[:name] if args.key?(:name)
3065
+ @schema = args[:schema] if args.key?(:schema)
3066
+ @state = args[:state] if args.key?(:state)
3067
+ end
3068
+ end
3069
+
3070
+ # Payload message of raw document content (bytes).
3071
+ class GoogleCloudDocumentaiV1RawDocument
3072
+ include Google::Apis::Core::Hashable
3073
+
3074
+ # Inline document content.
3075
+ # Corresponds to the JSON property `content`
3076
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
3077
+ # @return [String]
3078
+ attr_accessor :content
3079
+
3080
+ # An IANA MIME type (RFC6838) indicating the nature and format of the [content].
3081
+ # Corresponds to the JSON property `mimeType`
3082
+ # @return [String]
3083
+ attr_accessor :mime_type
3084
+
3085
+ def initialize(**args)
3086
+ update!(**args)
3087
+ end
3088
+
3089
+ # Update properties of this object
3090
+ def update!(**args)
3091
+ @content = args[:content] if args.key?(:content)
3092
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
3093
+ end
3094
+ end
3095
+
3096
+ # The long running operation metadata for review document method.
3097
+ class GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata
3098
+ include Google::Apis::Core::Hashable
3099
+
3100
+ # The common metadata for long running operations.
3101
+ # Corresponds to the JSON property `commonMetadata`
3102
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
3103
+ attr_accessor :common_metadata
3104
+
3105
+ def initialize(**args)
3106
+ update!(**args)
3107
+ end
3108
+
3109
+ # Update properties of this object
3110
+ def update!(**args)
3111
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
3112
+ end
3113
+ end
3114
+
3115
+ # Request message for review document method. Next Id: 6.
3116
+ class GoogleCloudDocumentaiV1ReviewDocumentRequest
3117
+ include Google::Apis::Core::Hashable
3118
+
3119
+ # Whether the validation should be performed on the ad-hoc review request.
3120
+ # Corresponds to the JSON property `enableSchemaValidation`
3121
+ # @return [Boolean]
3122
+ attr_accessor :enable_schema_validation
3123
+ alias_method :enable_schema_validation?, :enable_schema_validation
3124
+
3125
+ # Document represents the canonical document resource in Document Understanding
3126
+ # AI. It is an interchange format that provides insights into documents and
3127
+ # allows for collaboration between users and Document Understanding AI to
3128
+ # iterate and optimize for quality.
3129
+ # Corresponds to the JSON property `inlineDocument`
3130
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Document]
3131
+ attr_accessor :inline_document
3132
+
3133
+ # The priority of the human review task.
3134
+ # Corresponds to the JSON property `priority`
3135
+ # @return [String]
3136
+ attr_accessor :priority
3137
+
3138
+ def initialize(**args)
3139
+ update!(**args)
3140
+ end
3141
+
3142
+ # Update properties of this object
3143
+ def update!(**args)
3144
+ @enable_schema_validation = args[:enable_schema_validation] if args.key?(:enable_schema_validation)
3145
+ @inline_document = args[:inline_document] if args.key?(:inline_document)
3146
+ @priority = args[:priority] if args.key?(:priority)
3147
+ end
3148
+ end
3149
+
3150
+ # Response message for review document method.
3151
+ class GoogleCloudDocumentaiV1ReviewDocumentResponse
3152
+ include Google::Apis::Core::Hashable
3153
+
3154
+ # The Cloud Storage uri for the human reviewed document.
3155
+ # Corresponds to the JSON property `gcsDestination`
3156
+ # @return [String]
3157
+ attr_accessor :gcs_destination
3158
+
3159
+ def initialize(**args)
3160
+ update!(**args)
3161
+ end
3162
+
3163
+ # Update properties of this object
3164
+ def update!(**args)
3165
+ @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
3166
+ end
3167
+ end
3168
+
3169
+ # The schema defines the output of the processed document by a processor.
3170
+ class GoogleCloudDocumentaiV1Schema
3171
+ include Google::Apis::Core::Hashable
3172
+
3173
+ # Description of the schema.
3174
+ # Corresponds to the JSON property `description`
3175
+ # @return [String]
3176
+ attr_accessor :description
3177
+
3178
+ # Display name to show to users.
3179
+ # Corresponds to the JSON property `displayName`
3180
+ # @return [String]
3181
+ attr_accessor :display_name
3182
+
3183
+ # Entity types of the schema.
3184
+ # Corresponds to the JSON property `entityTypes`
3185
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SchemaEntityType>]
3186
+ attr_accessor :entity_types
2305
3187
 
2306
3188
  def initialize(**args)
2307
3189
  update!(**args)
@@ -2309,34 +3191,63 @@ module Google
2309
3191
 
2310
3192
  # Update properties of this object
2311
3193
  def update!(**args)
2312
- @x = args[:x] if args.key?(:x)
2313
- @y = args[:y] if args.key?(:y)
3194
+ @description = args[:description] if args.key?(:description)
3195
+ @display_name = args[:display_name] if args.key?(:display_name)
3196
+ @entity_types = args[:entity_types] if args.key?(:entity_types)
2314
3197
  end
2315
3198
  end
2316
3199
 
2317
- # Request message for the process document method.
2318
- class GoogleCloudDocumentaiV1ProcessRequest
3200
+ # EntityType is the wrapper of a label of the corresponding model with detailed
3201
+ # attributes and limitations for entity-based processors. Multiple types can
3202
+ # also compose a dependency tree to represent nested types.
3203
+ class GoogleCloudDocumentaiV1SchemaEntityType
2319
3204
  include Google::Apis::Core::Hashable
2320
3205
 
2321
- # Document represents the canonical document resource in Document Understanding
2322
- # AI. It is an interchange format that provides insights into documents and
2323
- # allows for collaboration between users and Document Understanding AI to
2324
- # iterate and optimize for quality.
2325
- # Corresponds to the JSON property `inlineDocument`
2326
- # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Document]
2327
- attr_accessor :inline_document
3206
+ # Type of the entity. It must be one of the following: `document` - the entity
3207
+ # represents a classification of a logical document. `object` - if the entity
3208
+ # has properties it is likely an object (or or a document.) `datetime` - the
3209
+ # entity is a date or time value. `money` - the entity represents a money value
3210
+ # amount. `number` - the entity is a number - integer or floating point. `string`
3211
+ # - the entity is a string value. `boolean` - the entity is a boolean value. `
3212
+ # address` - the entity is a location address.
3213
+ # Corresponds to the JSON property `baseType`
3214
+ # @return [String]
3215
+ attr_accessor :base_type
2328
3216
 
2329
- # Payload message of raw document content (bytes).
2330
- # Corresponds to the JSON property `rawDocument`
2331
- # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1RawDocument]
2332
- attr_accessor :raw_document
3217
+ # Description of the entity type.
3218
+ # Corresponds to the JSON property `description`
3219
+ # @return [String]
3220
+ attr_accessor :description
2333
3221
 
2334
- # Whether Human Review feature should be skipped for this request. Default to
2335
- # false.
2336
- # Corresponds to the JSON property `skipHumanReview`
2337
- # @return [Boolean]
2338
- attr_accessor :skip_human_review
2339
- alias_method :skip_human_review?, :skip_human_review
3222
+ # If specified, lists all the possible values for this entity.
3223
+ # Corresponds to the JSON property `enumValues`
3224
+ # @return [Array<String>]
3225
+ attr_accessor :enum_values
3226
+
3227
+ # Occurrence type limits the number of times an entity type appears in the
3228
+ # document.
3229
+ # Corresponds to the JSON property `occurrenceType`
3230
+ # @return [String]
3231
+ attr_accessor :occurrence_type
3232
+
3233
+ # Describing the nested structure of an entity. An EntityType may consist of
3234
+ # several other EntityTypes. For example, in a document there can be an
3235
+ # EntityType 'ID', which consists of EntityType 'name' and 'address', with
3236
+ # corresponding attributes, such as TEXT for both types and ONCE for occurrence
3237
+ # types.
3238
+ # Corresponds to the JSON property `properties`
3239
+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1SchemaEntityType>]
3240
+ attr_accessor :properties
3241
+
3242
+ # Source of this entity type.
3243
+ # Corresponds to the JSON property `source`
3244
+ # @return [String]
3245
+ attr_accessor :source
3246
+
3247
+ # Name of the type. It must be unique within the set of same level types.
3248
+ # Corresponds to the JSON property `type`
3249
+ # @return [String]
3250
+ attr_accessor :type
2340
3251
 
2341
3252
  def initialize(**args)
2342
3253
  update!(**args)
@@ -2344,28 +3255,24 @@ module Google
2344
3255
 
2345
3256
  # Update properties of this object
2346
3257
  def update!(**args)
2347
- @inline_document = args[:inline_document] if args.key?(:inline_document)
2348
- @raw_document = args[:raw_document] if args.key?(:raw_document)
2349
- @skip_human_review = args[:skip_human_review] if args.key?(:skip_human_review)
3258
+ @base_type = args[:base_type] if args.key?(:base_type)
3259
+ @description = args[:description] if args.key?(:description)
3260
+ @enum_values = args[:enum_values] if args.key?(:enum_values)
3261
+ @occurrence_type = args[:occurrence_type] if args.key?(:occurrence_type)
3262
+ @properties = args[:properties] if args.key?(:properties)
3263
+ @source = args[:source] if args.key?(:source)
3264
+ @type = args[:type] if args.key?(:type)
2350
3265
  end
2351
3266
  end
2352
3267
 
2353
- # Response message for the process document method.
2354
- class GoogleCloudDocumentaiV1ProcessResponse
3268
+ # The long running operation metadata for set default processor version method.
3269
+ class GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata
2355
3270
  include Google::Apis::Core::Hashable
2356
3271
 
2357
- # Document represents the canonical document resource in Document Understanding
2358
- # AI. It is an interchange format that provides insights into documents and
2359
- # allows for collaboration between users and Document Understanding AI to
2360
- # iterate and optimize for quality.
2361
- # Corresponds to the JSON property `document`
2362
- # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Document]
2363
- attr_accessor :document
2364
-
2365
- # The status of human review on a processed document.
2366
- # Corresponds to the JSON property `humanReviewStatus`
2367
- # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1HumanReviewStatus]
2368
- attr_accessor :human_review_status
3272
+ # The common metadata for long running operations.
3273
+ # Corresponds to the JSON property `commonMetadata`
3274
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1CommonOperationMetadata]
3275
+ attr_accessor :common_metadata
2369
3276
 
2370
3277
  def initialize(**args)
2371
3278
  update!(**args)
@@ -2373,25 +3280,32 @@ module Google
2373
3280
 
2374
3281
  # Update properties of this object
2375
3282
  def update!(**args)
2376
- @document = args[:document] if args.key?(:document)
2377
- @human_review_status = args[:human_review_status] if args.key?(:human_review_status)
3283
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
2378
3284
  end
2379
3285
  end
2380
3286
 
2381
- # Payload message of raw document content (bytes).
2382
- class GoogleCloudDocumentaiV1RawDocument
3287
+ # Request message for the set default processor version method.
3288
+ class GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest
2383
3289
  include Google::Apis::Core::Hashable
2384
3290
 
2385
- # Inline document content.
2386
- # Corresponds to the JSON property `content`
2387
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
3291
+ # Required. The resource name of child ProcessorVersion to use as default.
3292
+ # Corresponds to the JSON property `defaultProcessorVersion`
2388
3293
  # @return [String]
2389
- attr_accessor :content
3294
+ attr_accessor :default_processor_version
2390
3295
 
2391
- # An IANA MIME type (RFC6838) indicating the nature and format of the [content].
2392
- # Corresponds to the JSON property `mimeType`
2393
- # @return [String]
2394
- attr_accessor :mime_type
3296
+ def initialize(**args)
3297
+ update!(**args)
3298
+ end
3299
+
3300
+ # Update properties of this object
3301
+ def update!(**args)
3302
+ @default_processor_version = args[:default_processor_version] if args.key?(:default_processor_version)
3303
+ end
3304
+ end
3305
+
3306
+ # Response message for set default processor version method.
3307
+ class GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse
3308
+ include Google::Apis::Core::Hashable
2395
3309
 
2396
3310
  def initialize(**args)
2397
3311
  update!(**args)
@@ -2399,13 +3313,11 @@ module Google
2399
3313
 
2400
3314
  # Update properties of this object
2401
3315
  def update!(**args)
2402
- @content = args[:content] if args.key?(:content)
2403
- @mime_type = args[:mime_type] if args.key?(:mime_type)
2404
3316
  end
2405
3317
  end
2406
3318
 
2407
- # The long running operation metadata for review document method.
2408
- class GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata
3319
+ # The long running operation metadata for the undeploy processor version method.
3320
+ class GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata
2409
3321
  include Google::Apis::Core::Hashable
2410
3322
 
2411
3323
  # The common metadata for long running operations.
@@ -2423,57 +3335,29 @@ module Google
2423
3335
  end
2424
3336
  end
2425
3337
 
2426
- # Request message for review document method. Next Id: 6.
2427
- class GoogleCloudDocumentaiV1ReviewDocumentRequest
3338
+ # Request message for the undeploy processor version method.
3339
+ class GoogleCloudDocumentaiV1UndeployProcessorVersionRequest
2428
3340
  include Google::Apis::Core::Hashable
2429
3341
 
2430
- # Whether the validation should be performed on the ad-hoc review request.
2431
- # Corresponds to the JSON property `enableSchemaValidation`
2432
- # @return [Boolean]
2433
- attr_accessor :enable_schema_validation
2434
- alias_method :enable_schema_validation?, :enable_schema_validation
2435
-
2436
- # Document represents the canonical document resource in Document Understanding
2437
- # AI. It is an interchange format that provides insights into documents and
2438
- # allows for collaboration between users and Document Understanding AI to
2439
- # iterate and optimize for quality.
2440
- # Corresponds to the JSON property `inlineDocument`
2441
- # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1Document]
2442
- attr_accessor :inline_document
2443
-
2444
- # The priority of the human review task.
2445
- # Corresponds to the JSON property `priority`
2446
- # @return [String]
2447
- attr_accessor :priority
2448
-
2449
3342
  def initialize(**args)
2450
3343
  update!(**args)
2451
3344
  end
2452
3345
 
2453
3346
  # Update properties of this object
2454
3347
  def update!(**args)
2455
- @enable_schema_validation = args[:enable_schema_validation] if args.key?(:enable_schema_validation)
2456
- @inline_document = args[:inline_document] if args.key?(:inline_document)
2457
- @priority = args[:priority] if args.key?(:priority)
2458
3348
  end
2459
3349
  end
2460
3350
 
2461
- # Response message for review document method.
2462
- class GoogleCloudDocumentaiV1ReviewDocumentResponse
3351
+ # Response message for the undeploy processor version method.
3352
+ class GoogleCloudDocumentaiV1UndeployProcessorVersionResponse
2463
3353
  include Google::Apis::Core::Hashable
2464
3354
 
2465
- # The Cloud Storage uri for the human reviewed document.
2466
- # Corresponds to the JSON property `gcsDestination`
2467
- # @return [String]
2468
- attr_accessor :gcs_destination
2469
-
2470
3355
  def initialize(**args)
2471
3356
  update!(**args)
2472
3357
  end
2473
3358
 
2474
3359
  # Update properties of this object
2475
3360
  def update!(**args)
2476
- @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
2477
3361
  end
2478
3362
  end
2479
3363
 
@@ -2653,8 +3537,9 @@ module Google
2653
3537
  end
2654
3538
  end
2655
3539
 
2656
- # A phrase in the text that is a known entity type, such as a person, an
2657
- # organization, or location.
3540
+ # An entity that could be a phrase in the text or a property belongs to the
3541
+ # document. It is a known entity type, such as a person, an organization, or
3542
+ # location.
2658
3543
  class GoogleCloudDocumentaiV1beta1DocumentEntity
2659
3544
  include Google::Apis::Core::Hashable
2660
3545
 
@@ -2674,7 +3559,8 @@ module Google
2674
3559
  # @return [String]
2675
3560
  attr_accessor :mention_id
2676
3561
 
2677
- # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
3562
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the
3563
+ # entity is not present in the document, this field will be empty.
2678
3564
  # Corresponds to the JSON property `mentionText`
2679
3565
  # @return [String]
2680
3566
  attr_accessor :mention_text
@@ -2793,17 +3679,29 @@ module Google
2793
3679
  # @return [Google::Apis::DocumentaiV1::GoogleTypeDateTime]
2794
3680
  attr_accessor :datetime_value
2795
3681
 
3682
+ # Float value.
3683
+ # Corresponds to the JSON property `floatValue`
3684
+ # @return [Float]
3685
+ attr_accessor :float_value
3686
+
3687
+ # Integer value.
3688
+ # Corresponds to the JSON property `integerValue`
3689
+ # @return [Fixnum]
3690
+ attr_accessor :integer_value
3691
+
2796
3692
  # Represents an amount of money with its currency type.
2797
3693
  # Corresponds to the JSON property `moneyValue`
2798
3694
  # @return [Google::Apis::DocumentaiV1::GoogleTypeMoney]
2799
3695
  attr_accessor :money_value
2800
3696
 
2801
- # Required. Normalized entity value stored as a string. This field is populated
2802
- # for supported document type (e.g. Invoice). For some entity types, one of
2803
- # respective 'structured_value' fields may also be populated. - Money/Currency
2804
- # type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`)
2805
- # is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the
2806
- # ISO 8601 text format.
3697
+ # Optional. An optional field to store a normalized string. For some entity
3698
+ # types, one of respective 'structured_value' fields may also be populated. Also
3699
+ # not all the types of 'structured_value' will be normalized. For example, some
3700
+ # processors may not generate float or int normalized text by default. Below are
3701
+ # sample formats mapped to structured values. - Money/Currency type (`
3702
+ # money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in
3703
+ # the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO
3704
+ # 8601 text format.
2807
3705
  # Corresponds to the JSON property `text`
2808
3706
  # @return [String]
2809
3707
  attr_accessor :text
@@ -2818,6 +3716,8 @@ module Google
2818
3716
  @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
2819
3717
  @date_value = args[:date_value] if args.key?(:date_value)
2820
3718
  @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
3719
+ @float_value = args[:float_value] if args.key?(:float_value)
3720
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
2821
3721
  @money_value = args[:money_value] if args.key?(:money_value)
2822
3722
  @text = args[:text] if args.key?(:text)
2823
3723
  end
@@ -3120,6 +4020,20 @@ module Google
3120
4020
  class GoogleCloudDocumentaiV1beta1DocumentPageFormField
3121
4021
  include Google::Apis::Core::Hashable
3122
4022
 
4023
+ # Created for Labeling UI to export key text. If corrections were made to the
4024
+ # text identified by the `field_name.text_anchor`, this field will contain the
4025
+ # correction.
4026
+ # Corresponds to the JSON property `correctedKeyText`
4027
+ # @return [String]
4028
+ attr_accessor :corrected_key_text
4029
+
4030
+ # Created for Labeling UI to export value text. If corrections were made to the
4031
+ # text identified by the `field_value.text_anchor`, this field will contain the
4032
+ # correction.
4033
+ # Corresponds to the JSON property `correctedValueText`
4034
+ # @return [String]
4035
+ attr_accessor :corrected_value_text
4036
+
3123
4037
  # Visual element describing a layout unit on a page.
3124
4038
  # Corresponds to the JSON property `fieldName`
3125
4039
  # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
@@ -3159,6 +4073,8 @@ module Google
3159
4073
 
3160
4074
  # Update properties of this object
3161
4075
  def update!(**args)
4076
+ @corrected_key_text = args[:corrected_key_text] if args.key?(:corrected_key_text)
4077
+ @corrected_value_text = args[:corrected_value_text] if args.key?(:corrected_value_text)
3162
4078
  @field_name = args[:field_name] if args.key?(:field_name)
3163
4079
  @field_value = args[:field_value] if args.key?(:field_value)
3164
4080
  @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages)
@@ -4340,8 +5256,9 @@ module Google
4340
5256
  end
4341
5257
  end
4342
5258
 
4343
- # A phrase in the text that is a known entity type, such as a person, an
4344
- # organization, or location.
5259
+ # An entity that could be a phrase in the text or a property belongs to the
5260
+ # document. It is a known entity type, such as a person, an organization, or
5261
+ # location.
4345
5262
  class GoogleCloudDocumentaiV1beta2DocumentEntity
4346
5263
  include Google::Apis::Core::Hashable
4347
5264
 
@@ -4361,7 +5278,8 @@ module Google
4361
5278
  # @return [String]
4362
5279
  attr_accessor :mention_id
4363
5280
 
4364
- # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.
5281
+ # Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the
5282
+ # entity is not present in the document, this field will be empty.
4365
5283
  # Corresponds to the JSON property `mentionText`
4366
5284
  # @return [String]
4367
5285
  attr_accessor :mention_text
@@ -4480,17 +5398,29 @@ module Google
4480
5398
  # @return [Google::Apis::DocumentaiV1::GoogleTypeDateTime]
4481
5399
  attr_accessor :datetime_value
4482
5400
 
5401
+ # Float value.
5402
+ # Corresponds to the JSON property `floatValue`
5403
+ # @return [Float]
5404
+ attr_accessor :float_value
5405
+
5406
+ # Integer value.
5407
+ # Corresponds to the JSON property `integerValue`
5408
+ # @return [Fixnum]
5409
+ attr_accessor :integer_value
5410
+
4483
5411
  # Represents an amount of money with its currency type.
4484
5412
  # Corresponds to the JSON property `moneyValue`
4485
5413
  # @return [Google::Apis::DocumentaiV1::GoogleTypeMoney]
4486
5414
  attr_accessor :money_value
4487
5415
 
4488
- # Required. Normalized entity value stored as a string. This field is populated
4489
- # for supported document type (e.g. Invoice). For some entity types, one of
4490
- # respective 'structured_value' fields may also be populated. - Money/Currency
4491
- # type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`)
4492
- # is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the
4493
- # ISO 8601 text format.
5416
+ # Optional. An optional field to store a normalized string. For some entity
5417
+ # types, one of respective 'structured_value' fields may also be populated. Also
5418
+ # not all the types of 'structured_value' will be normalized. For example, some
5419
+ # processors may not generate float or int normalized text by default. Below are
5420
+ # sample formats mapped to structured values. - Money/Currency type (`
5421
+ # money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in
5422
+ # the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO
5423
+ # 8601 text format.
4494
5424
  # Corresponds to the JSON property `text`
4495
5425
  # @return [String]
4496
5426
  attr_accessor :text
@@ -4505,6 +5435,8 @@ module Google
4505
5435
  @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
4506
5436
  @date_value = args[:date_value] if args.key?(:date_value)
4507
5437
  @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
5438
+ @float_value = args[:float_value] if args.key?(:float_value)
5439
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
4508
5440
  @money_value = args[:money_value] if args.key?(:money_value)
4509
5441
  @text = args[:text] if args.key?(:text)
4510
5442
  end
@@ -4844,6 +5776,20 @@ module Google
4844
5776
  class GoogleCloudDocumentaiV1beta2DocumentPageFormField
4845
5777
  include Google::Apis::Core::Hashable
4846
5778
 
5779
+ # Created for Labeling UI to export key text. If corrections were made to the
5780
+ # text identified by the `field_name.text_anchor`, this field will contain the
5781
+ # correction.
5782
+ # Corresponds to the JSON property `correctedKeyText`
5783
+ # @return [String]
5784
+ attr_accessor :corrected_key_text
5785
+
5786
+ # Created for Labeling UI to export value text. If corrections were made to the
5787
+ # text identified by the `field_value.text_anchor`, this field will contain the
5788
+ # correction.
5789
+ # Corresponds to the JSON property `correctedValueText`
5790
+ # @return [String]
5791
+ attr_accessor :corrected_value_text
5792
+
4847
5793
  # Visual element describing a layout unit on a page.
4848
5794
  # Corresponds to the JSON property `fieldName`
4849
5795
  # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta2DocumentPageLayout]
@@ -4883,6 +5829,8 @@ module Google
4883
5829
 
4884
5830
  # Update properties of this object
4885
5831
  def update!(**args)
5832
+ @corrected_key_text = args[:corrected_key_text] if args.key?(:corrected_key_text)
5833
+ @corrected_value_text = args[:corrected_value_text] if args.key?(:corrected_value_text)
4886
5834
  @field_name = args[:field_name] if args.key?(:field_name)
4887
5835
  @field_value = args[:field_value] if args.key?(:field_value)
4888
5836
  @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages)
@@ -6086,6 +7034,57 @@ module Google
6086
7034
  end
6087
7035
  end
6088
7036
 
7037
+ # The long running operation metadata for delete processor version method.
7038
+ class GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata
7039
+ include Google::Apis::Core::Hashable
7040
+
7041
+ # The common metadata for long running operations.
7042
+ # Corresponds to the JSON property `commonMetadata`
7043
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
7044
+ attr_accessor :common_metadata
7045
+
7046
+ def initialize(**args)
7047
+ update!(**args)
7048
+ end
7049
+
7050
+ # Update properties of this object
7051
+ def update!(**args)
7052
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
7053
+ end
7054
+ end
7055
+
7056
+ # The long running operation metadata for deploy processor version method.
7057
+ class GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata
7058
+ include Google::Apis::Core::Hashable
7059
+
7060
+ # The common metadata for long running operations.
7061
+ # Corresponds to the JSON property `commonMetadata`
7062
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
7063
+ attr_accessor :common_metadata
7064
+
7065
+ def initialize(**args)
7066
+ update!(**args)
7067
+ end
7068
+
7069
+ # Update properties of this object
7070
+ def update!(**args)
7071
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
7072
+ end
7073
+ end
7074
+
7075
+ # Response message for the deploy processor version method.
7076
+ class GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse
7077
+ include Google::Apis::Core::Hashable
7078
+
7079
+ def initialize(**args)
7080
+ update!(**args)
7081
+ end
7082
+
7083
+ # Update properties of this object
7084
+ def update!(**args)
7085
+ end
7086
+ end
7087
+
6089
7088
  # The long running operation metadata for disable processor method.
6090
7089
  class GoogleCloudDocumentaiV1beta3DisableProcessorMetadata
6091
7090
  include Google::Apis::Core::Hashable
@@ -6249,6 +7248,70 @@ module Google
6249
7248
  end
6250
7249
  end
6251
7250
 
7251
+ # The long running operation metadata for set default processor version method.
7252
+ class GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata
7253
+ include Google::Apis::Core::Hashable
7254
+
7255
+ # The common metadata for long running operations.
7256
+ # Corresponds to the JSON property `commonMetadata`
7257
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
7258
+ attr_accessor :common_metadata
7259
+
7260
+ def initialize(**args)
7261
+ update!(**args)
7262
+ end
7263
+
7264
+ # Update properties of this object
7265
+ def update!(**args)
7266
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
7267
+ end
7268
+ end
7269
+
7270
+ # Response message for set default processor version method.
7271
+ class GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse
7272
+ include Google::Apis::Core::Hashable
7273
+
7274
+ def initialize(**args)
7275
+ update!(**args)
7276
+ end
7277
+
7278
+ # Update properties of this object
7279
+ def update!(**args)
7280
+ end
7281
+ end
7282
+
7283
+ # The long running operation metadata for the undeploy processor version method.
7284
+ class GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata
7285
+ include Google::Apis::Core::Hashable
7286
+
7287
+ # The common metadata for long running operations.
7288
+ # Corresponds to the JSON property `commonMetadata`
7289
+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1beta3CommonOperationMetadata]
7290
+ attr_accessor :common_metadata
7291
+
7292
+ def initialize(**args)
7293
+ update!(**args)
7294
+ end
7295
+
7296
+ # Update properties of this object
7297
+ def update!(**args)
7298
+ @common_metadata = args[:common_metadata] if args.key?(:common_metadata)
7299
+ end
7300
+ end
7301
+
7302
+ # Response message for the undeploy processor version method.
7303
+ class GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse
7304
+ include Google::Apis::Core::Hashable
7305
+
7306
+ def initialize(**args)
7307
+ update!(**args)
7308
+ end
7309
+
7310
+ # Update properties of this object
7311
+ def update!(**args)
7312
+ end
7313
+ end
7314
+
6252
7315
  # The response message for Locations.ListLocations.
6253
7316
  class GoogleCloudLocationListLocationsResponse
6254
7317
  include Google::Apis::Core::Hashable