google-cloud-document_ai-v1beta3 0.23.0 → 0.25.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 +57 -40
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +57 -40
  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 +932 -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 +761 -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 +406 -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 +62 -0
  19. data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +1 -1
  20. data/lib/google/cloud/documentai/v1beta3/document_pb.rb +4 -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 +78 -0
  25. data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +55 -0
  26. data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +1 -1
  27. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +187 -0
  28. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +120 -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 +261 -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 +275 -0
  33. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +12 -10
  34. data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -2
  35. metadata +16 -2
@@ -0,0 +1,406 @@
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
+ require "google/cloud/documentai/v1beta3/document_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module DocumentAI
24
+ module V1beta3
25
+ module DocumentService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the DocumentService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the update_dataset REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Longrunning::Operation]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Longrunning::Operation]
56
+ # A result object deserialized from the server's reply
57
+ def update_dataset request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the import_documents REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::ImportDocumentsRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Longrunning::Operation]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Longrunning::Operation]
94
+ # A result object deserialized from the server's reply
95
+ def import_documents request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_import_documents_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the get_document REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::GetDocumentRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::DocumentAI::V1beta3::GetDocumentResponse]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::DocumentAI::V1beta3::GetDocumentResponse]
132
+ # A result object deserialized from the server's reply
133
+ def get_document request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_document_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::DocumentAI::V1beta3::GetDocumentResponse.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the batch_delete_documents REST call
159
+ #
160
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::BatchDeleteDocumentsRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Longrunning::Operation]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Longrunning::Operation]
170
+ # A result object deserialized from the server's reply
171
+ def batch_delete_documents request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_documents_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
190
+
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+
195
+ ##
196
+ # Baseline implementation for the get_dataset_schema REST call
197
+ #
198
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::GetDatasetSchemaRequest]
199
+ # A request object representing the call parameters. Required.
200
+ # @param options [::Gapic::CallOptions]
201
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
202
+ #
203
+ # @yield [result, operation] Access the result along with the TransportOperation object
204
+ # @yieldparam result [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
206
+ #
207
+ # @return [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
208
+ # A result object deserialized from the server's reply
209
+ def get_dataset_schema request_pb, options = nil
210
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
211
+
212
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_schema_request request_pb
213
+ query_string_params = if query_string_params.any?
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
+ else
216
+ {}
217
+ end
218
+
219
+ response = @client_stub.make_http_request(
220
+ verb,
221
+ uri: uri,
222
+ body: body || "",
223
+ params: query_string_params,
224
+ options: options
225
+ )
226
+ operation = ::Gapic::Rest::TransportOperation.new response
227
+ result = ::Google::Cloud::DocumentAI::V1beta3::DatasetSchema.decode_json response.body, ignore_unknown_fields: true
228
+
229
+ yield result, operation if block_given?
230
+ result
231
+ end
232
+
233
+ ##
234
+ # Baseline implementation for the update_dataset_schema REST call
235
+ #
236
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetSchemaRequest]
237
+ # A request object representing the call parameters. Required.
238
+ # @param options [::Gapic::CallOptions]
239
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
240
+ #
241
+ # @yield [result, operation] Access the result along with the TransportOperation object
242
+ # @yieldparam result [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
243
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
244
+ #
245
+ # @return [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
246
+ # A result object deserialized from the server's reply
247
+ def update_dataset_schema request_pb, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
249
+
250
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_schema_request request_pb
251
+ query_string_params = if query_string_params.any?
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
+ else
254
+ {}
255
+ end
256
+
257
+ response = @client_stub.make_http_request(
258
+ verb,
259
+ uri: uri,
260
+ body: body || "",
261
+ params: query_string_params,
262
+ options: options
263
+ )
264
+ operation = ::Gapic::Rest::TransportOperation.new response
265
+ result = ::Google::Cloud::DocumentAI::V1beta3::DatasetSchema.decode_json response.body, ignore_unknown_fields: true
266
+
267
+ yield result, operation if block_given?
268
+ result
269
+ end
270
+
271
+ ##
272
+ # @private
273
+ #
274
+ # GRPC transcoding helper method for the update_dataset REST call
275
+ #
276
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetRequest]
277
+ # A request object representing the call parameters. Required.
278
+ # @return [Array(String, [String, nil], Hash{String => String})]
279
+ # Uri, Body, Query string parameters
280
+ def self.transcode_update_dataset_request request_pb
281
+ transcoder = Gapic::Rest::GrpcTranscoder.new
282
+ .with_bindings(
283
+ uri_method: :patch,
284
+ uri_template: "/v1beta3/{dataset.name}",
285
+ body: "dataset",
286
+ matches: [
287
+ ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/?$}, false]
288
+ ]
289
+ )
290
+ transcoder.transcode request_pb
291
+ end
292
+
293
+ ##
294
+ # @private
295
+ #
296
+ # GRPC transcoding helper method for the import_documents REST call
297
+ #
298
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::ImportDocumentsRequest]
299
+ # A request object representing the call parameters. Required.
300
+ # @return [Array(String, [String, nil], Hash{String => String})]
301
+ # Uri, Body, Query string parameters
302
+ def self.transcode_import_documents_request request_pb
303
+ transcoder = Gapic::Rest::GrpcTranscoder.new
304
+ .with_bindings(
305
+ uri_method: :post,
306
+ uri_template: "/v1beta3/{dataset}:importDocuments",
307
+ body: "*",
308
+ matches: [
309
+ ["dataset", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/?$}, false]
310
+ ]
311
+ )
312
+ transcoder.transcode request_pb
313
+ end
314
+
315
+ ##
316
+ # @private
317
+ #
318
+ # GRPC transcoding helper method for the get_document REST call
319
+ #
320
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::GetDocumentRequest]
321
+ # A request object representing the call parameters. Required.
322
+ # @return [Array(String, [String, nil], Hash{String => String})]
323
+ # Uri, Body, Query string parameters
324
+ def self.transcode_get_document_request request_pb
325
+ transcoder = Gapic::Rest::GrpcTranscoder.new
326
+ .with_bindings(
327
+ uri_method: :get,
328
+ uri_template: "/v1beta3/{dataset}:getDocument",
329
+ matches: [
330
+ ["dataset", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/?$}, false]
331
+ ]
332
+ )
333
+ transcoder.transcode request_pb
334
+ end
335
+
336
+ ##
337
+ # @private
338
+ #
339
+ # GRPC transcoding helper method for the batch_delete_documents REST call
340
+ #
341
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::BatchDeleteDocumentsRequest]
342
+ # A request object representing the call parameters. Required.
343
+ # @return [Array(String, [String, nil], Hash{String => String})]
344
+ # Uri, Body, Query string parameters
345
+ def self.transcode_batch_delete_documents_request request_pb
346
+ transcoder = Gapic::Rest::GrpcTranscoder.new
347
+ .with_bindings(
348
+ uri_method: :post,
349
+ uri_template: "/v1beta3/{dataset}:batchDeleteDocuments",
350
+ body: "*",
351
+ matches: [
352
+ ["dataset", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/?$}, false]
353
+ ]
354
+ )
355
+ transcoder.transcode request_pb
356
+ end
357
+
358
+ ##
359
+ # @private
360
+ #
361
+ # GRPC transcoding helper method for the get_dataset_schema REST call
362
+ #
363
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::GetDatasetSchemaRequest]
364
+ # A request object representing the call parameters. Required.
365
+ # @return [Array(String, [String, nil], Hash{String => String})]
366
+ # Uri, Body, Query string parameters
367
+ def self.transcode_get_dataset_schema_request request_pb
368
+ transcoder = Gapic::Rest::GrpcTranscoder.new
369
+ .with_bindings(
370
+ uri_method: :get,
371
+ uri_template: "/v1beta3/{name}",
372
+ matches: [
373
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema/?$}, false]
374
+ ]
375
+ )
376
+ transcoder.transcode request_pb
377
+ end
378
+
379
+ ##
380
+ # @private
381
+ #
382
+ # GRPC transcoding helper method for the update_dataset_schema REST call
383
+ #
384
+ # @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetSchemaRequest]
385
+ # A request object representing the call parameters. Required.
386
+ # @return [Array(String, [String, nil], Hash{String => String})]
387
+ # Uri, Body, Query string parameters
388
+ def self.transcode_update_dataset_schema_request request_pb
389
+ transcoder = Gapic::Rest::GrpcTranscoder.new
390
+ .with_bindings(
391
+ uri_method: :patch,
392
+ uri_template: "/v1beta3/{dataset_schema.name}",
393
+ body: "dataset_schema",
394
+ matches: [
395
+ ["dataset_schema.name", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema/?$}, false]
396
+ ]
397
+ )
398
+ transcoder.transcode request_pb
399
+ end
400
+ end
401
+ end
402
+ end
403
+ end
404
+ end
405
+ end
406
+ end
@@ -0,0 +1,54 @@
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
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/document_ai/v1beta3/version"
24
+ require "google/cloud/document_ai/v1beta3/bindings_override"
25
+
26
+ require "google/cloud/document_ai/v1beta3/document_service/credentials"
27
+ require "google/cloud/document_ai/v1beta3/document_service/paths"
28
+ require "google/cloud/document_ai/v1beta3/document_service/rest/operations"
29
+ require "google/cloud/document_ai/v1beta3/document_service/rest/client"
30
+
31
+ module Google
32
+ module Cloud
33
+ module DocumentAI
34
+ module V1beta3
35
+ ##
36
+ # Service to call Cloud DocumentAI to manage document collection (dataset).
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/document_ai/v1beta3/document_service/rest"
41
+ # client = ::Google::Cloud::DocumentAI::V1beta3::DocumentService::Rest::Client.new
42
+ #
43
+ module DocumentService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/cloud/document_ai/v1beta3/document_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,56 @@
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
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/document_ai/v1beta3/version"
24
+
25
+ require "google/cloud/document_ai/v1beta3/document_service/credentials"
26
+ require "google/cloud/document_ai/v1beta3/document_service/paths"
27
+ require "google/cloud/document_ai/v1beta3/document_service/operations"
28
+ require "google/cloud/document_ai/v1beta3/document_service/client"
29
+ require "google/cloud/document_ai/v1beta3/document_service/rest"
30
+
31
+ module Google
32
+ module Cloud
33
+ module DocumentAI
34
+ module V1beta3
35
+ ##
36
+ # Service to call Cloud DocumentAI to manage document collection (dataset).
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/cloud/document_ai/v1beta3/document_service"
41
+ # client = ::Google::Cloud::DocumentAI::V1beta3::DocumentService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/cloud/document_ai/v1beta3/document_service/rest"
46
+ # client = ::Google::Cloud::DocumentAI::V1beta3::DocumentService::Rest::Client.new
47
+ #
48
+ module DocumentService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "document_service", "helpers.rb"
56
+ require "google/cloud/document_ai/v1beta3/document_service/helpers" if ::File.file? helper_path
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/document_ai/v1beta3/document_processor_service/rest"
20
+ require "google/cloud/document_ai/v1beta3/document_service/rest"
20
21
  require "google/cloud/document_ai/v1beta3/bindings_override"
21
22
  require "google/cloud/document_ai/v1beta3/version"
22
23
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DocumentAI
23
23
  module V1beta3
24
- VERSION = "0.23.0"
24
+ VERSION = "0.25.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/document_ai/v1beta3/document_processor_service"
20
+ require "google/cloud/document_ai/v1beta3/document_service"
20
21
  require "google/cloud/document_ai/v1beta3/version"
21
22
 
22
23
  module Google
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/documentai/v1beta3/dataset.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/api/resource_pb'
9
+ require 'google/cloud/documentai/v1beta3/document_pb'
10
+ require 'google/cloud/documentai/v1beta3/document_io_pb'
11
+ require 'google/cloud/documentai/v1beta3/document_schema_pb'
12
+
13
+
14
+ descriptor_data = "\n-google/cloud/documentai/v1beta3/dataset.proto\x12\x1fgoogle.cloud.documentai.v1beta3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/documentai/v1beta3/document.proto\x1a\x31google/cloud/documentai/v1beta3/document_io.proto\x1a\x35google/cloud/documentai/v1beta3/document_schema.proto\"\xe2\x07\n\x07\x44\x61taset\x12\\\n\x12gcs_managed_config\x18\x03 \x01(\x0b\x32\x39.google.cloud.documentai.v1beta3.Dataset.GCSManagedConfigB\x03\xe0\x41\x01H\x00\x12j\n\x19\x64ocument_warehouse_config\x18\x05 \x01(\x0b\x32@.google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfigB\x03\xe0\x41\x01H\x00\x12h\n\x18unmanaged_dataset_config\x18\x06 \x01(\x0b\x32?.google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfigB\x03\xe0\x41\x01H\x00\x12\x66\n\x17spanner_indexing_config\x18\x04 \x01(\x0b\x32>.google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfigB\x03\xe0\x41\x01H\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x42\n\x05state\x18\x02 \x01(\x0e\x32..google.cloud.documentai.v1beta3.Dataset.StateB\x03\xe0\x41\x02\x1aW\n\x10GCSManagedConfig\x12\x43\n\ngcs_prefix\x18\x01 \x01(\x0b\x32*.google.cloud.documentai.v1beta3.GcsPrefixB\x03\xe0\x41\x02\x1ar\n\x17\x44ocumentWarehouseConfig\x12\x17\n\ncollection\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12>\n\x06schema\x18\x02 \x01(\tB.\xe0\x41\x03\xfa\x41(\n&contentwarehouse.googleapis.com/Schema\x1a\x18\n\x16UnmanagedDatasetConfig\x1a\x17\n\x15SpannerIndexingConfig\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rUNINITIALIZED\x10\x01\x12\x10\n\x0cINITIALIZING\x10\x02\x12\x0f\n\x0bINITIALIZED\x10\x03:n\xea\x41k\n!documentai.googleapis.com/Dataset\x12\x46projects/{project}/locations/{location}/processors/{processor}/datasetB\x10\n\x0estorage_sourceB\x11\n\x0findexing_source\"\x86\x03\n\nDocumentId\x12^\n\x12gcs_managed_doc_id\x18\x01 \x01(\x0b\x32@.google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentIdH\x00\x12[\n\x10unmanaged_doc_id\x18\x04 \x01(\x0b\x32?.google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentIdH\x00\x12\x42\n\x0crevision_ref\x18\x03 \x01(\x0b\x32,.google.cloud.documentai.v1beta3.RevisionRef\x1a\x43\n\x14GCSManagedDocumentId\x12\x14\n\x07gcs_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\tcw_doc_id\x18\x02 \x01(\tB\x02\x18\x01\x1a*\n\x13UnmanagedDocumentId\x12\x13\n\x06\x64oc_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04type\"\xf1\x01\n\rDatasetSchema\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x0f\x64ocument_schema\x18\x03 \x01(\x0b\x32/.google.cloud.documentai.v1beta3.DocumentSchemaB\x03\xe0\x41\x01:\x82\x01\xea\x41\x7f\n\'documentai.googleapis.com/DatasetSchema\x12Tprojects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema\"\x87\x02\n\x15\x42\x61tchDatasetDocuments\x12o\n\x17individual_document_ids\x18\x01 \x01(\x0b\x32L.google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIdsH\x00\x12\x10\n\x06\x66ilter\x18\x02 \x01(\tH\x00\x1a_\n\x15IndividualDocumentIds\x12\x46\n\x0c\x64ocument_ids\x18\x01 \x03(\x0b\x32+.google.cloud.documentai.v1beta3.DocumentIdB\x03\xe0\x41\x02\x42\n\n\x08\x63riteriaB\xc8\x02\n#com.google.cloud.documentai.v1beta3B\x0c\x44\x61tasetProtoP\x01ZCcloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb\xaa\x02\x1fGoogle.Cloud.DocumentAI.V1Beta3\xca\x02\x1fGoogle\\Cloud\\DocumentAI\\V1beta3\xea\x02\"Google::Cloud::DocumentAI::V1beta3\xea\x41\x62\n&contentwarehouse.googleapis.com/Schema\x12\x38projects/{project}/locations/{location}/schemas/{schema}b\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.cloud.documentai.v1beta3.GcsPrefix", "google/cloud/documentai/v1beta3/document_io.proto"],
30
+ ["google.cloud.documentai.v1beta3.RevisionRef", "google/cloud/documentai/v1beta3/document.proto"],
31
+ ["google.cloud.documentai.v1beta3.DocumentSchema", "google/cloud/documentai/v1beta3/document_schema.proto"],
32
+ ]
33
+ imports.each do |type_name, expected_filename|
34
+ import_file = pool.lookup(type_name).file_descriptor
35
+ if import_file.name != expected_filename
36
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
37
+ end
38
+ end
39
+ warn "Each proto file must use a consistent fully-qualified name."
40
+ warn "This will become an error in the next major version."
41
+ end
42
+
43
+ module Google
44
+ module Cloud
45
+ module DocumentAI
46
+ module V1beta3
47
+ Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset").msgclass
48
+ Dataset::GCSManagedConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig").msgclass
49
+ Dataset::DocumentWarehouseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig").msgclass
50
+ Dataset::UnmanagedDatasetConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig").msgclass
51
+ Dataset::SpannerIndexingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig").msgclass
52
+ Dataset::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.State").enummodule
53
+ DocumentId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentId").msgclass
54
+ DocumentId::GCSManagedDocumentId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentId.GCSManagedDocumentId").msgclass
55
+ DocumentId::UnmanagedDocumentId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DocumentId.UnmanagedDocumentId").msgclass
56
+ DatasetSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DatasetSchema").msgclass
57
+ BatchDatasetDocuments = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.BatchDatasetDocuments").msgclass
58
+ BatchDatasetDocuments::IndividualDocumentIds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.BatchDatasetDocuments.IndividualDocumentIds").msgclass
59
+ end
60
+ end
61
+ end
62
+ end
@@ -7,7 +7,7 @@ require 'google/protobuf'
7
7
  require 'google/protobuf/field_mask_pb'
8
8
 
9
9
 
10
- descriptor_data = "\n1google/cloud/documentai/v1beta3/document_io.proto\x12\x1fgoogle.cloud.documentai.v1beta3\x1a google/protobuf/field_mask.proto\"1\n\x0bRawDocument\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\"1\n\x0bGcsDocument\x12\x0f\n\x07gcs_uri\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\"O\n\x0cGcsDocuments\x12?\n\tdocuments\x18\x01 \x03(\x0b\x32,.google.cloud.documentai.v1beta3.GcsDocument\"#\n\tGcsPrefix\x12\x16\n\x0egcs_uri_prefix\x18\x01 \x01(\t\"\xaf\x01\n\x19\x42\x61tchDocumentsInputConfig\x12@\n\ngcs_prefix\x18\x01 \x01(\x0b\x32*.google.cloud.documentai.v1beta3.GcsPrefixH\x00\x12\x46\n\rgcs_documents\x18\x02 \x01(\x0b\x32-.google.cloud.documentai.v1beta3.GcsDocumentsH\x00\x42\x08\n\x06source\"\x8f\x03\n\x14\x44ocumentOutputConfig\x12\x62\n\x11gcs_output_config\x18\x01 \x01(\x0b\x32\x45.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfigH\x00\x1a\x83\x02\n\x0fGcsOutputConfig\x12\x0f\n\x07gcs_uri\x18\x01 \x01(\t\x12.\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12m\n\x0fsharding_config\x18\x03 \x01(\x0b\x32T.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig\x1a@\n\x0eShardingConfig\x12\x17\n\x0fpages_per_shard\x18\x01 \x01(\x05\x12\x15\n\rpages_overlap\x18\x02 \x01(\x05\x42\r\n\x0b\x64\x65stination\"\xea\x01\n\tOcrConfig\x12?\n\x05hints\x18\x02 \x01(\x0b\x32\x30.google.cloud.documentai.v1beta3.OcrConfig.Hints\x12!\n\x19\x65nable_native_pdf_parsing\x18\x03 \x01(\x08\x12#\n\x1b\x65nable_image_quality_scores\x18\x04 \x01(\x08\x12\x1c\n\x14\x61\x64vanced_ocr_options\x18\x05 \x03(\t\x12\x15\n\renable_symbol\x18\x06 \x01(\x08\x1a\x1f\n\x05Hints\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\tB\xe6\x01\n#com.google.cloud.documentai.v1beta3B\x0f\x44ocumentIoProtoP\x01ZCcloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb\xaa\x02\x1fGoogle.Cloud.DocumentAI.V1Beta3\xca\x02\x1fGoogle\\Cloud\\DocumentAI\\V1beta3\xea\x02\"Google::Cloud::DocumentAI::V1beta3b\x06proto3"
10
+ descriptor_data = "\n1google/cloud/documentai/v1beta3/document_io.proto\x12\x1fgoogle.cloud.documentai.v1beta3\x1a google/protobuf/field_mask.proto\"1\n\x0bRawDocument\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\"1\n\x0bGcsDocument\x12\x0f\n\x07gcs_uri\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\"O\n\x0cGcsDocuments\x12?\n\tdocuments\x18\x01 \x03(\x0b\x32,.google.cloud.documentai.v1beta3.GcsDocument\"#\n\tGcsPrefix\x12\x16\n\x0egcs_uri_prefix\x18\x01 \x01(\t\"\xaf\x01\n\x19\x42\x61tchDocumentsInputConfig\x12@\n\ngcs_prefix\x18\x01 \x01(\x0b\x32*.google.cloud.documentai.v1beta3.GcsPrefixH\x00\x12\x46\n\rgcs_documents\x18\x02 \x01(\x0b\x32-.google.cloud.documentai.v1beta3.GcsDocumentsH\x00\x42\x08\n\x06source\"\x8f\x03\n\x14\x44ocumentOutputConfig\x12\x62\n\x11gcs_output_config\x18\x01 \x01(\x0b\x32\x45.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfigH\x00\x1a\x83\x02\n\x0fGcsOutputConfig\x12\x0f\n\x07gcs_uri\x18\x01 \x01(\t\x12.\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12m\n\x0fsharding_config\x18\x03 \x01(\x0b\x32T.google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig\x1a@\n\x0eShardingConfig\x12\x17\n\x0fpages_per_shard\x18\x01 \x01(\x05\x12\x15\n\rpages_overlap\x18\x02 \x01(\x05\x42\r\n\x0b\x64\x65stination\"\x86\x02\n\tOcrConfig\x12?\n\x05hints\x18\x02 \x01(\x0b\x32\x30.google.cloud.documentai.v1beta3.OcrConfig.Hints\x12!\n\x19\x65nable_native_pdf_parsing\x18\x03 \x01(\x08\x12#\n\x1b\x65nable_image_quality_scores\x18\x04 \x01(\x08\x12\x1c\n\x14\x61\x64vanced_ocr_options\x18\x05 \x03(\t\x12\x15\n\renable_symbol\x18\x06 \x01(\x08\x12\x1a\n\x12\x63ompute_style_info\x18\x08 \x01(\x08\x1a\x1f\n\x05Hints\x12\x16\n\x0elanguage_hints\x18\x01 \x03(\tB\xe6\x01\n#com.google.cloud.documentai.v1beta3B\x0f\x44ocumentIoProtoP\x01ZCcloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb\xaa\x02\x1fGoogle.Cloud.DocumentAI.V1Beta3\xca\x02\x1fGoogle\\Cloud\\DocumentAI\\V1beta3\xea\x02\"Google::Cloud::DocumentAI::V1beta3b\x06proto3"
11
11
 
12
12
  pool = Google::Protobuf::DescriptorPool.generated_pool
13
13