google-cloud-document_ai-v1 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/document_ai/v1/document_processor_service/client.rb +60 -23
- data/lib/google/cloud/document_ai/v1/document_processor_service/operations.rb +19 -15
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/client.rb +60 -23
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/operations.rb +50 -38
- data/lib/google/cloud/document_ai/v1/document_processor_service/rest/service_stub.rb +190 -134
- data/lib/google/cloud/document_ai/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/documentai/v1/document.rb +28 -0
- data/proto_docs/google/cloud/documentai/v1/document_io.rb +4 -0
- data/proto_docs/google/cloud/documentai/v1/document_processor_service.rb +16 -0
- data/proto_docs/google/cloud/documentai/v1/processor.rb +4 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/type/datetime.rb +4 -0
- metadata +6 -9
@@ -31,11 +31,15 @@ module Google
|
|
31
31
|
# `gs://bucket_name/object_name`. Object versioning is not supported.
|
32
32
|
# For more information, refer to [Google Cloud Storage Request
|
33
33
|
# URIs](https://cloud.google.com/storage/docs/reference-uris).
|
34
|
+
#
|
35
|
+
# Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
34
36
|
# @!attribute [rw] content
|
35
37
|
# @return [::String]
|
36
38
|
# Optional. Inline document content, represented as a stream of bytes.
|
37
39
|
# Note: As with all `bytes` fields, protobuffers use a pure binary
|
38
40
|
# representation, whereas JSON representations use base64.
|
41
|
+
#
|
42
|
+
# Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
39
43
|
# @!attribute [rw] mime_type
|
40
44
|
# @return [::String]
|
41
45
|
# An IANA published [media type (MIME
|
@@ -726,28 +730,42 @@ module Google
|
|
726
730
|
# @return [::Google::Type::Money]
|
727
731
|
# Money value. See also:
|
728
732
|
# https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
|
733
|
+
#
|
734
|
+
# Note: The following fields are mutually exclusive: `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
729
735
|
# @!attribute [rw] date_value
|
730
736
|
# @return [::Google::Type::Date]
|
731
737
|
# Date value. Includes year, month, day. See also:
|
732
738
|
# https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
|
739
|
+
#
|
740
|
+
# Note: The following fields are mutually exclusive: `date_value`, `money_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
733
741
|
# @!attribute [rw] datetime_value
|
734
742
|
# @return [::Google::Type::DateTime]
|
735
743
|
# DateTime value. Includes date, time, and timezone. See also:
|
736
744
|
# https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
|
745
|
+
#
|
746
|
+
# Note: The following fields are mutually exclusive: `datetime_value`, `money_value`, `date_value`, `address_value`, `boolean_value`, `integer_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
737
747
|
# @!attribute [rw] address_value
|
738
748
|
# @return [::Google::Type::PostalAddress]
|
739
749
|
# Postal address. See also:
|
740
750
|
# https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
|
751
|
+
#
|
752
|
+
# Note: The following fields are mutually exclusive: `address_value`, `money_value`, `date_value`, `datetime_value`, `boolean_value`, `integer_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
741
753
|
# @!attribute [rw] boolean_value
|
742
754
|
# @return [::Boolean]
|
743
755
|
# Boolean value. Can be used for entities with binary values, or for
|
744
756
|
# checkboxes.
|
757
|
+
#
|
758
|
+
# Note: The following fields are mutually exclusive: `boolean_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `integer_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
745
759
|
# @!attribute [rw] integer_value
|
746
760
|
# @return [::Integer]
|
747
761
|
# Integer value.
|
762
|
+
#
|
763
|
+
# Note: The following fields are mutually exclusive: `integer_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `float_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
748
764
|
# @!attribute [rw] float_value
|
749
765
|
# @return [::Float]
|
750
766
|
# Float value.
|
767
|
+
#
|
768
|
+
# Note: The following fields are mutually exclusive: `float_value`, `money_value`, `date_value`, `datetime_value`, `address_value`, `boolean_value`, `integer_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
751
769
|
# @!attribute [rw] text
|
752
770
|
# @return [::String]
|
753
771
|
# Optional. An optional field to store a normalized string.
|
@@ -982,10 +1000,14 @@ module Google
|
|
982
1000
|
# @return [::String]
|
983
1001
|
# If the change was made by a person specify the name or id of that
|
984
1002
|
# person.
|
1003
|
+
#
|
1004
|
+
# Note: The following fields are mutually exclusive: `agent`, `processor`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
985
1005
|
# @!attribute [rw] processor
|
986
1006
|
# @return [::String]
|
987
1007
|
# If the annotation was made by processor identify the processor by its
|
988
1008
|
# resource name.
|
1009
|
+
#
|
1010
|
+
# Note: The following fields are mutually exclusive: `processor`, `agent`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
989
1011
|
# @!attribute [rw] id
|
990
1012
|
# @return [::String]
|
991
1013
|
# Id of the revision, internally generated by doc proto storage.
|
@@ -1061,12 +1083,18 @@ module Google
|
|
1061
1083
|
# @!attribute [rw] text_block
|
1062
1084
|
# @return [::Google::Cloud::DocumentAI::V1::Document::DocumentLayout::DocumentLayoutBlock::LayoutTextBlock]
|
1063
1085
|
# Block consisting of text content.
|
1086
|
+
#
|
1087
|
+
# Note: The following fields are mutually exclusive: `text_block`, `table_block`, `list_block`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1064
1088
|
# @!attribute [rw] table_block
|
1065
1089
|
# @return [::Google::Cloud::DocumentAI::V1::Document::DocumentLayout::DocumentLayoutBlock::LayoutTableBlock]
|
1066
1090
|
# Block consisting of table content/structure.
|
1091
|
+
#
|
1092
|
+
# Note: The following fields are mutually exclusive: `table_block`, `text_block`, `list_block`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1067
1093
|
# @!attribute [rw] list_block
|
1068
1094
|
# @return [::Google::Cloud::DocumentAI::V1::Document::DocumentLayout::DocumentLayoutBlock::LayoutListBlock]
|
1069
1095
|
# Block consisting of list content/structure.
|
1096
|
+
#
|
1097
|
+
# Note: The following fields are mutually exclusive: `list_block`, `text_block`, `table_block`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1070
1098
|
# @!attribute [rw] block_id
|
1071
1099
|
# @return [::String]
|
1072
1100
|
# ID of the block.
|
@@ -75,9 +75,13 @@ module Google
|
|
75
75
|
# @!attribute [rw] gcs_prefix
|
76
76
|
# @return [::Google::Cloud::DocumentAI::V1::GcsPrefix]
|
77
77
|
# The set of documents that match the specified Cloud Storage `gcs_prefix`.
|
78
|
+
#
|
79
|
+
# Note: The following fields are mutually exclusive: `gcs_prefix`, `gcs_documents`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
78
80
|
# @!attribute [rw] gcs_documents
|
79
81
|
# @return [::Google::Cloud::DocumentAI::V1::GcsDocuments]
|
80
82
|
# The set of documents individually specified on Cloud Storage.
|
83
|
+
#
|
84
|
+
# Note: The following fields are mutually exclusive: `gcs_documents`, `gcs_prefix`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
81
85
|
class BatchDocumentsInputConfig
|
82
86
|
include ::Google::Protobuf::MessageExts
|
83
87
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -25,13 +25,19 @@ module Google
|
|
25
25
|
# @!attribute [rw] individual_page_selector
|
26
26
|
# @return [::Google::Cloud::DocumentAI::V1::ProcessOptions::IndividualPageSelector]
|
27
27
|
# Which pages to process (1-indexed).
|
28
|
+
#
|
29
|
+
# Note: The following fields are mutually exclusive: `individual_page_selector`, `from_start`, `from_end`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
28
30
|
# @!attribute [rw] from_start
|
29
31
|
# @return [::Integer]
|
30
32
|
# Only process certain pages from the start. Process all if the document
|
31
33
|
# has fewer pages.
|
34
|
+
#
|
35
|
+
# Note: The following fields are mutually exclusive: `from_start`, `individual_page_selector`, `from_end`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
32
36
|
# @!attribute [rw] from_end
|
33
37
|
# @return [::Integer]
|
34
38
|
# Only process certain pages from the end, same as above.
|
39
|
+
#
|
40
|
+
# Note: The following fields are mutually exclusive: `from_end`, `individual_page_selector`, `from_start`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
35
41
|
# @!attribute [rw] ocr_config
|
36
42
|
# @return [::Google::Cloud::DocumentAI::V1::OcrConfig]
|
37
43
|
# Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`.
|
@@ -89,12 +95,18 @@ module Google
|
|
89
95
|
# @!attribute [rw] inline_document
|
90
96
|
# @return [::Google::Cloud::DocumentAI::V1::Document]
|
91
97
|
# An inline document proto.
|
98
|
+
#
|
99
|
+
# Note: The following fields are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
92
100
|
# @!attribute [rw] raw_document
|
93
101
|
# @return [::Google::Cloud::DocumentAI::V1::RawDocument]
|
94
102
|
# A raw document content (bytes).
|
103
|
+
#
|
104
|
+
# Note: The following fields are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
95
105
|
# @!attribute [rw] gcs_document
|
96
106
|
# @return [::Google::Cloud::DocumentAI::V1::GcsDocument]
|
97
107
|
# A raw document on Google Cloud Storage.
|
108
|
+
#
|
109
|
+
# Note: The following fields are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
98
110
|
# @!attribute [rw] name
|
99
111
|
# @return [::String]
|
100
112
|
# Required. The resource name of the
|
@@ -716,9 +728,13 @@ module Google
|
|
716
728
|
# @!attribute [rw] custom_document_extraction_options
|
717
729
|
# @return [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::CustomDocumentExtractionOptions]
|
718
730
|
# Options to control Custom Document Extraction (CDE) Processor.
|
731
|
+
#
|
732
|
+
# Note: The following fields are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
719
733
|
# @!attribute [rw] foundation_model_tuning_options
|
720
734
|
# @return [::Google::Cloud::DocumentAI::V1::TrainProcessorVersionRequest::FoundationModelTuningOptions]
|
721
735
|
# Options to control foundation model tuning of a processor.
|
736
|
+
#
|
737
|
+
# Note: The following fields are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
722
738
|
# @!attribute [rw] parent
|
723
739
|
# @return [::String]
|
724
740
|
# Required. The parent (project, location and processor) to create the new
|
@@ -90,9 +90,13 @@ module Google
|
|
90
90
|
# @!attribute [rw] foundation_gen_ai_model_info
|
91
91
|
# @return [::Google::Cloud::DocumentAI::V1::ProcessorVersion::GenAiModelInfo::FoundationGenAiModelInfo]
|
92
92
|
# Information for a pretrained Google-managed foundation model.
|
93
|
+
#
|
94
|
+
# Note: The following fields are mutually exclusive: `foundation_gen_ai_model_info`, `custom_gen_ai_model_info`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
93
95
|
# @!attribute [rw] custom_gen_ai_model_info
|
94
96
|
# @return [::Google::Cloud::DocumentAI::V1::ProcessorVersion::GenAiModelInfo::CustomGenAiModelInfo]
|
95
97
|
# Information for a custom Generative AI model created by the user.
|
98
|
+
#
|
99
|
+
# Note: The following fields are mutually exclusive: `custom_gen_ai_model_info`, `foundation_gen_ai_model_info`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
96
100
|
class GenAiModelInfo
|
97
101
|
include ::Google::Protobuf::MessageExts
|
98
102
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -40,9 +40,11 @@ module Google
|
|
40
40
|
# @!attribute [rw] error
|
41
41
|
# @return [::Google::Rpc::Status]
|
42
42
|
# The error result of the operation in case of failure or cancellation.
|
43
|
+
#
|
44
|
+
# Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
43
45
|
# @!attribute [rw] response
|
44
46
|
# @return [::Google::Protobuf::Any]
|
45
|
-
# The normal response of the operation
|
47
|
+
# The normal, successful response of the operation. If the original
|
46
48
|
# method returns no data on success, such as `Delete`, the response is
|
47
49
|
# `google.protobuf.Empty`. If the original method is standard
|
48
50
|
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
@@ -50,12 +52,15 @@ module Google
|
|
50
52
|
# is the original method name. For example, if the original method name
|
51
53
|
# is `TakeSnapshot()`, the inferred response type is
|
52
54
|
# `TakeSnapshotResponse`.
|
55
|
+
#
|
56
|
+
# Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
53
57
|
class Operation
|
54
58
|
include ::Google::Protobuf::MessageExts
|
55
59
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
60
|
end
|
57
61
|
|
58
|
-
# The request message for
|
62
|
+
# The request message for
|
63
|
+
# Operations.GetOperation.
|
59
64
|
# @!attribute [rw] name
|
60
65
|
# @return [::String]
|
61
66
|
# The name of the operation resource.
|
@@ -64,7 +69,8 @@ module Google
|
|
64
69
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
65
70
|
end
|
66
71
|
|
67
|
-
# The request message for
|
72
|
+
# The request message for
|
73
|
+
# Operations.ListOperations.
|
68
74
|
# @!attribute [rw] name
|
69
75
|
# @return [::String]
|
70
76
|
# The name of the operation's parent resource.
|
@@ -82,7 +88,8 @@ module Google
|
|
82
88
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
89
|
end
|
84
90
|
|
85
|
-
# The response message for
|
91
|
+
# The response message for
|
92
|
+
# Operations.ListOperations.
|
86
93
|
# @!attribute [rw] operations
|
87
94
|
# @return [::Array<::Google::Longrunning::Operation>]
|
88
95
|
# A list of operations that matches the specified filter in the request.
|
@@ -94,7 +101,8 @@ module Google
|
|
94
101
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
95
102
|
end
|
96
103
|
|
97
|
-
# The request message for
|
104
|
+
# The request message for
|
105
|
+
# Operations.CancelOperation.
|
98
106
|
# @!attribute [rw] name
|
99
107
|
# @return [::String]
|
100
108
|
# The name of the operation resource to be cancelled.
|
@@ -103,7 +111,8 @@ module Google
|
|
103
111
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
104
112
|
end
|
105
113
|
|
106
|
-
# The request message for
|
114
|
+
# The request message for
|
115
|
+
# Operations.DeleteOperation.
|
107
116
|
# @!attribute [rw] name
|
108
117
|
# @return [::String]
|
109
118
|
# The name of the operation resource to be deleted.
|
@@ -112,7 +121,8 @@ module Google
|
|
112
121
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
122
|
end
|
114
123
|
|
115
|
-
# The request message for
|
124
|
+
# The request message for
|
125
|
+
# Operations.WaitOperation.
|
116
126
|
# @!attribute [rw] name
|
117
127
|
# @return [::String]
|
118
128
|
# The name of the operation resource to wait on.
|
@@ -130,13 +140,12 @@ module Google
|
|
130
140
|
#
|
131
141
|
# Example:
|
132
142
|
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# }
|
139
|
-
# }
|
143
|
+
# rpc Export(ExportRequest) returns (google.longrunning.Operation) {
|
144
|
+
# option (google.longrunning.operation_info) = {
|
145
|
+
# response_type: "ExportResponse"
|
146
|
+
# metadata_type: "ExportMetadata"
|
147
|
+
# };
|
148
|
+
# }
|
140
149
|
# @!attribute [rw] response_type
|
141
150
|
# @return [::String]
|
142
151
|
# Required. The message name of the primary return type for this
|
@@ -75,9 +75,13 @@ module Google
|
|
75
75
|
# UTC offset. Must be whole seconds, between -18 hours and +18 hours.
|
76
76
|
# For example, a UTC offset of -4:00 would be represented as
|
77
77
|
# { seconds: -14400 }.
|
78
|
+
#
|
79
|
+
# Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
78
80
|
# @!attribute [rw] time_zone
|
79
81
|
# @return [::Google::Type::TimeZone]
|
80
82
|
# Time zone.
|
83
|
+
#
|
84
|
+
# Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
81
85
|
class DateTime
|
82
86
|
include ::Google::Protobuf::MessageExts
|
83
87
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-document_ai-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gapic-common
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.a
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -135,7 +134,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
135
134
|
licenses:
|
136
135
|
- Apache-2.0
|
137
136
|
metadata: {}
|
138
|
-
post_install_message:
|
139
137
|
rdoc_options: []
|
140
138
|
require_paths:
|
141
139
|
- lib
|
@@ -143,15 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
141
|
requirements:
|
144
142
|
- - ">="
|
145
143
|
- !ruby/object:Gem::Version
|
146
|
-
version: '
|
144
|
+
version: '3.0'
|
147
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
146
|
requirements:
|
149
147
|
- - ">="
|
150
148
|
- !ruby/object:Gem::Version
|
151
149
|
version: '0'
|
152
150
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
154
|
-
signing_key:
|
151
|
+
rubygems_version: 3.6.2
|
155
152
|
specification_version: 4
|
156
153
|
summary: Service to parse structured information from unstructured or semi-structured
|
157
154
|
documents using state-of-the-art Google AI such as natural language, computer vision,
|