google-cloud-document_ai-v1beta3 0.23.0 → 0.24.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +54 -39
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +54 -39
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb +1 -1
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +1 -1
  6. data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +618 -0
  7. data/lib/google/cloud/document_ai/v1beta3/document_service/credentials.rb +51 -0
  8. data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +770 -0
  9. data/lib/google/cloud/document_ai/v1beta3/document_service/paths.rb +90 -0
  10. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +530 -0
  11. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +815 -0
  12. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb +227 -0
  13. data/lib/google/cloud/document_ai/v1beta3/document_service/rest.rb +54 -0
  14. data/lib/google/cloud/document_ai/v1beta3/document_service.rb +56 -0
  15. data/lib/google/cloud/document_ai/v1beta3/rest.rb +1 -0
  16. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  17. data/lib/google/cloud/document_ai/v1beta3.rb +1 -0
  18. data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +55 -0
  19. data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +1 -1
  20. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +2 -1
  21. data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +4 -1
  22. data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +8 -6
  23. data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +3 -1
  24. data/lib/google/cloud/documentai/v1beta3/document_service_pb.rb +57 -0
  25. data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +49 -0
  26. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +1 -1
  27. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +125 -0
  28. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +88 -27
  29. data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +10 -1
  30. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +258 -123
  31. data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +44 -13
  32. data/proto_docs/google/cloud/documentai/v1beta3/document_service.rb +73 -0
  33. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +11 -9
  34. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -2
  35. metadata +16 -2
@@ -21,6 +21,24 @@ module Google
21
21
  module Cloud
22
22
  module DocumentAI
23
23
  module V1beta3
24
+ # Metadata about a property.
25
+ # @!attribute [rw] inactive
26
+ # @return [::Boolean]
27
+ # Whether the property should be considered as "inactive".
28
+ class PropertyMetadata
29
+ include ::Google::Protobuf::MessageExts
30
+ extend ::Google::Protobuf::MessageExts::ClassMethods
31
+ end
32
+
33
+ # Metadata about an entity type.
34
+ # @!attribute [rw] inactive
35
+ # @return [::Boolean]
36
+ # Whether the entity type should be considered inactive.
37
+ class EntityTypeMetadata
38
+ include ::Google::Protobuf::MessageExts
39
+ extend ::Google::Protobuf::MessageExts::ClassMethods
40
+ end
41
+
24
42
  # The schema defines the output of the processed document by a processor.
25
43
  # @!attribute [rw] display_name
26
44
  # @return [::String]
@@ -54,16 +72,15 @@ module Google
54
72
  # @!attribute [rw] name
55
73
  # @return [::String]
56
74
  # 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:
75
+ # cannot be a "Common Type". The following naming conventions are used:
59
76
  #
60
- # - *use `snake_casing`*
61
- # - name matching is case-sensitive
77
+ # - Use `snake_casing`.
78
+ # - Name matching is case-sensitive.
62
79
  # - Maximum 64 characters.
63
80
  # - Must start with a letter.
64
81
  # - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward
65
82
  # compatibility internal infrastructure and tooling can handle any ascii
66
- # character)
83
+ # character.)
67
84
  # - The `/` is sometimes used to denote a property of a type. For example
68
85
  # `line_item/amount`. This convention is deprecated, but will still be
69
86
  # honored for backward compatibility.
@@ -73,7 +90,10 @@ module Google
73
90
  # one should be set.
74
91
  # @!attribute [rw] properties
75
92
  # @return [::Array<::Google::Cloud::DocumentAI::V1beta3::DocumentSchema::EntityType::Property>]
76
- # Describing the nested structure, or composition of an entity.
93
+ # Description the nested structure, or composition of an entity.
94
+ # @!attribute [rw] entity_type_metadata
95
+ # @return [::Google::Cloud::DocumentAI::V1beta3::EntityTypeMetadata]
96
+ # Metadata for the entity type.
77
97
  class EntityType
78
98
  include ::Google::Protobuf::MessageExts
79
99
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -100,24 +120,35 @@ module Google
100
120
  # @return [::Google::Cloud::DocumentAI::V1beta3::DocumentSchema::EntityType::Property::OccurrenceType]
101
121
  # Occurrence type limits the number of instances an entity type appears
102
122
  # in the document.
123
+ # @!attribute [rw] property_metadata
124
+ # @return [::Google::Cloud::DocumentAI::V1beta3::PropertyMetadata]
125
+ # Any additional metadata about the property can be added here.
103
126
  class Property
104
127
  include ::Google::Protobuf::MessageExts
105
128
  extend ::Google::Protobuf::MessageExts::ClassMethods
106
129
 
107
- # Types of occurrences of the entity type in the document. Note: this
108
- # represents the number of instances of an entity types, not number of
109
- # mentions of a given entity instance.
130
+ # Types of occurrences of the entity type in the document. This
131
+ # represents the number of instances of instances of an entity, not
132
+ # number of mentions of an entity. For example, a bank statement may
133
+ # only have one `account_number`, but this account number may be
134
+ # mentioned in several places on the document. In this case the
135
+ # 'account_number' would be considered a `REQUIRED_ONCE` entity type. If,
136
+ # on the other hand, we expect a bank statement to contain the status of
137
+ # multiple different accounts for the customers, the occurrence type will
138
+ # be set to `REQUIRED_MULTIPLE`.
110
139
  module OccurrenceType
111
140
  # Unspecified occurrence type.
112
141
  OCCURRENCE_TYPE_UNSPECIFIED = 0
113
142
 
114
- # There will be zero or one instance of this entity type.
143
+ # There will be zero or one instance of this entity type. The same
144
+ # entity instance may be mentioned multiple times.
115
145
  OPTIONAL_ONCE = 1
116
146
 
117
147
  # The entity type will appear zero or multiple times.
118
148
  OPTIONAL_MULTIPLE = 2
119
149
 
120
- # The entity type will only appear exactly once.
150
+ # The entity type will only appear exactly once. The same
151
+ # entity instance may be mentioned multiple times.
121
152
  REQUIRED_ONCE = 3
122
153
 
123
154
  # The entity type will appear once or more times.
@@ -129,8 +160,8 @@ module Google
129
160
  # Metadata for global schema behavior.
130
161
  # @!attribute [rw] document_splitter
131
162
  # @return [::Boolean]
132
- # If true, a `document` entity type can be applied to subdocument (
133
- # splitting). Otherwise, it can only be applied to the entire document
163
+ # If true, a `document` entity type can be applied to subdocument
164
+ # (splitting). Otherwise, it can only be applied to the entire document
134
165
  # (classification).
135
166
  # @!attribute [rw] document_allow_multiple_labels
136
167
  # @return [::Boolean]
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DocumentAI
23
+ module V1beta3
24
+ # @!attribute [rw] dataset
25
+ # @return [::Google::Cloud::DocumentAI::V1beta3::Dataset]
26
+ # Required. The `name` field of the `Dataset` is used to identify the
27
+ # resource to be updated.
28
+ # @!attribute [rw] update_mask
29
+ # @return [::Google::Protobuf::FieldMask]
30
+ # The update mask applies to the resource.
31
+ class UpdateDatasetRequest
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+ end
35
+
36
+ # @!attribute [rw] common_metadata
37
+ # @return [::Google::Cloud::DocumentAI::V1beta3::CommonOperationMetadata]
38
+ # The basic metadata of the long running operation.
39
+ class UpdateDatasetOperationMetadata
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+
44
+ # Request for `GetDatasetSchema`.
45
+ # @!attribute [rw] name
46
+ # @return [::String]
47
+ # Required. The dataset schema resource name.
48
+ # Format:
49
+ # projects/\\{project}/locations/\\{location}/processors/\\{processor}/dataset/datasetSchema
50
+ # @!attribute [rw] visible_fields_only
51
+ # @return [::Boolean]
52
+ # If set, only returns the visible fields of the schema.
53
+ class GetDatasetSchemaRequest
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # Request for `UpdateDatasetSchema`.
59
+ # @!attribute [rw] dataset_schema
60
+ # @return [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
61
+ # Required. The name field of the `DatasetSchema` is used to identify the
62
+ # resource to be updated.
63
+ # @!attribute [rw] update_mask
64
+ # @return [::Google::Protobuf::FieldMask]
65
+ # The update mask applies to the resource.
66
+ class UpdateDatasetSchemaRequest
67
+ include ::Google::Protobuf::MessageExts
68
+ extend ::Google::Protobuf::MessageExts::ClassMethods
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -22,10 +22,9 @@ module Google
22
22
  module DocumentAI
23
23
  module V1beta3
24
24
  # A processor version is an implementation of a processor. Each processor
25
- # can have multiple versions, pre-trained by Google internally or up-trained
26
- # by the customer. At a time, a processor can only have one default version
27
- # version. So the processor's behavior (when processing documents) is defined
28
- # by a default version
25
+ # can have multiple versions, pretrained by Google internally or uptrained
26
+ # by the customer. A processor can only have one default version at a time.
27
+ # Its document-processing behavior is defined by that version.
29
28
  # @!attribute [rw] name
30
29
  # @return [::String]
31
30
  # The resource name of the processor version.
@@ -54,7 +53,7 @@ module Google
54
53
  # The KMS key version with which data is encrypted.
55
54
  # @!attribute [rw] google_managed
56
55
  # @return [::Boolean]
57
- # Denotes that this ProcessorVersion is managed by google.
56
+ # Denotes that this `ProcessorVersion` is managed by Google.
58
57
  # @!attribute [rw] deprecation_info
59
58
  # @return [::Google::Cloud::DocumentAI::V1beta3::ProcessorVersion::DeprecationInfo]
60
59
  # If set, information about the eventual deprecation of this version.
@@ -99,6 +98,9 @@ module Google
99
98
 
100
99
  # The processor version failed and is in an indeterminate state.
101
100
  FAILED = 7
101
+
102
+ # The processor version is being imported.
103
+ IMPORTING = 8
102
104
  end
103
105
  end
104
106
 
@@ -110,8 +112,8 @@ module Google
110
112
  # Format: `projects/{project}/locations/{location}/processors/{processor}`
111
113
  # @!attribute [rw] type
112
114
  # @return [::String]
113
- # The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
114
- # To get a list of processors types, see
115
+ # The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
116
+ # To get a list of processor types, see
115
117
  # {::Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Client#fetch_processor_types FetchProcessorTypes}.
116
118
  # @!attribute [rw] display_name
117
119
  # @return [::String]
@@ -131,8 +133,8 @@ module Google
131
133
  # The time the processor was created.
132
134
  # @!attribute [rw] kms_key_name
133
135
  # @return [::String]
134
- # The KMS key used for encryption/decryption in CMEK scenarios.
135
- # See https://cloud.google.com/security-key-management.
136
+ # The [KMS key](https://cloud.google.com/security-key-management) used for
137
+ # encryption and decryption in CMEK scenarios.
136
138
  class Processor
137
139
  include ::Google::Protobuf::MessageExts
138
140
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -29,7 +29,7 @@ module Google
29
29
  # Format: `projects/{project}/processorTypes/{processor_type}`
30
30
  # @!attribute [rw] type
31
31
  # @return [::String]
32
- # The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc.
32
+ # The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`.
33
33
  # @!attribute [rw] category
34
34
  # @return [::String]
35
35
  # The processor category, used by UI to group processor types.
@@ -53,7 +53,8 @@ module Google
53
53
  # The location information about where the processor is available.
54
54
  # @!attribute [rw] location_id
55
55
  # @return [::String]
56
- # The location id, currently must be one of [us, eu].
56
+ # The location ID. For supported locations, refer to [regional and
57
+ # multi-regional support](/document-ai/docs/regions).
57
58
  class LocationInfo
58
59
  include ::Google::Protobuf::MessageExts
59
60
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-document_ai-v1beta3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -202,14 +202,26 @@ files:
202
202
  - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb
203
203
  - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb
204
204
  - lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/service_stub.rb
205
+ - lib/google/cloud/document_ai/v1beta3/document_service.rb
206
+ - lib/google/cloud/document_ai/v1beta3/document_service/client.rb
207
+ - lib/google/cloud/document_ai/v1beta3/document_service/credentials.rb
208
+ - lib/google/cloud/document_ai/v1beta3/document_service/operations.rb
209
+ - lib/google/cloud/document_ai/v1beta3/document_service/paths.rb
210
+ - lib/google/cloud/document_ai/v1beta3/document_service/rest.rb
211
+ - lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb
212
+ - lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb
213
+ - lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb
205
214
  - lib/google/cloud/document_ai/v1beta3/rest.rb
206
215
  - lib/google/cloud/document_ai/v1beta3/version.rb
207
216
  - lib/google/cloud/documentai/v1beta3/barcode_pb.rb
217
+ - lib/google/cloud/documentai/v1beta3/dataset_pb.rb
208
218
  - lib/google/cloud/documentai/v1beta3/document_io_pb.rb
209
219
  - lib/google/cloud/documentai/v1beta3/document_pb.rb
210
220
  - lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb
211
221
  - lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb
212
222
  - lib/google/cloud/documentai/v1beta3/document_schema_pb.rb
223
+ - lib/google/cloud/documentai/v1beta3/document_service_pb.rb
224
+ - lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb
213
225
  - lib/google/cloud/documentai/v1beta3/evaluation_pb.rb
214
226
  - lib/google/cloud/documentai/v1beta3/geometry_pb.rb
215
227
  - lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb
@@ -221,10 +233,12 @@ files:
221
233
  - proto_docs/google/api/launch_stage.rb
222
234
  - proto_docs/google/api/resource.rb
223
235
  - proto_docs/google/cloud/documentai/v1beta3/barcode.rb
236
+ - proto_docs/google/cloud/documentai/v1beta3/dataset.rb
224
237
  - proto_docs/google/cloud/documentai/v1beta3/document.rb
225
238
  - proto_docs/google/cloud/documentai/v1beta3/document_io.rb
226
239
  - proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb
227
240
  - proto_docs/google/cloud/documentai/v1beta3/document_schema.rb
241
+ - proto_docs/google/cloud/documentai/v1beta3/document_service.rb
228
242
  - proto_docs/google/cloud/documentai/v1beta3/evaluation.rb
229
243
  - proto_docs/google/cloud/documentai/v1beta3/geometry.rb
230
244
  - proto_docs/google/cloud/documentai/v1beta3/operation_metadata.rb