google-cloud-document_ai-v1beta3 0.22.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +58 -41
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +3 -1
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +58 -41
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb +7 -5
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/service_stub.rb +23 -23
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_processor_service.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +618 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/credentials.rb +51 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +770 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/paths.rb +90 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +530 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +815 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb +227 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service/rest.rb +54 -0
- data/lib/google/cloud/document_ai/v1beta3/document_service.rb +56 -0
- data/lib/google/cloud/document_ai/v1beta3/rest.rb +1 -0
- data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
- data/lib/google/cloud/document_ai/v1beta3.rb +1 -0
- data/lib/google/cloud/documentai/v1beta3/barcode_pb.rb +24 -6
- data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +55 -0
- data/lib/google/cloud/documentai/v1beta3/document_io_pb.rb +25 -45
- data/lib/google/cloud/documentai/v1beta3/document_pb.rb +34 -265
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_pb.rb +37 -271
- data/lib/google/cloud/documentai/v1beta3/document_processor_service_services_pb.rb +8 -6
- data/lib/google/cloud/documentai/v1beta3/document_schema_pb.rb +26 -37
- data/lib/google/cloud/documentai/v1beta3/document_service_pb.rb +57 -0
- data/lib/google/cloud/documentai/v1beta3/document_service_services_pb.rb +49 -0
- data/lib/google/cloud/documentai/v1beta3/evaluation_pb.rb +25 -52
- data/lib/google/cloud/documentai/v1beta3/geometry_pb.rb +24 -13
- data/lib/google/cloud/documentai/v1beta3/operation_metadata_pb.rb +25 -16
- data/lib/google/cloud/documentai/v1beta3/processor_pb.rb +27 -47
- data/lib/google/cloud/documentai/v1beta3/processor_type_pb.rb +24 -13
- data/proto_docs/google/api/client.rb +58 -1
- data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +125 -0
- data/proto_docs/google/cloud/documentai/v1beta3/document.rb +88 -27
- data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +10 -1
- data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +258 -123
- data/proto_docs/google/cloud/documentai/v1beta3/document_schema.rb +44 -13
- data/proto_docs/google/cloud/documentai/v1beta3/document_service.rb +73 -0
- data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +11 -9
- data/proto_docs/google/cloud/documentai/v1beta3/processor_type.rb +3 -2
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +18 -4
@@ -0,0 +1,227 @@
|
|
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 get_dataset_schema REST call
|
83
|
+
#
|
84
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::GetDatasetSchemaRequest]
|
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::Cloud::DocumentAI::V1beta3::DatasetSchema]
|
91
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
92
|
+
#
|
93
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
|
94
|
+
# A result object deserialized from the server's reply
|
95
|
+
def get_dataset_schema 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_get_dataset_schema_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::Cloud::DocumentAI::V1beta3::DatasetSchema.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 update_dataset_schema REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetSchemaRequest]
|
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::DatasetSchema]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Cloud::DocumentAI::V1beta3::DatasetSchema]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def update_dataset_schema 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_update_dataset_schema_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::DatasetSchema.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# @private
|
159
|
+
#
|
160
|
+
# GRPC transcoding helper method for the update_dataset REST call
|
161
|
+
#
|
162
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetRequest]
|
163
|
+
# A request object representing the call parameters. Required.
|
164
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
165
|
+
# Uri, Body, Query string parameters
|
166
|
+
def self.transcode_update_dataset_request request_pb
|
167
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
168
|
+
.with_bindings(
|
169
|
+
uri_method: :patch,
|
170
|
+
uri_template: "/v1beta3/{dataset.name}",
|
171
|
+
body: "dataset",
|
172
|
+
matches: [
|
173
|
+
["dataset.name", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/?$}, false]
|
174
|
+
]
|
175
|
+
)
|
176
|
+
transcoder.transcode request_pb
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# @private
|
181
|
+
#
|
182
|
+
# GRPC transcoding helper method for the get_dataset_schema REST call
|
183
|
+
#
|
184
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::GetDatasetSchemaRequest]
|
185
|
+
# A request object representing the call parameters. Required.
|
186
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
187
|
+
# Uri, Body, Query string parameters
|
188
|
+
def self.transcode_get_dataset_schema_request request_pb
|
189
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
190
|
+
.with_bindings(
|
191
|
+
uri_method: :get,
|
192
|
+
uri_template: "/v1beta3/{name}",
|
193
|
+
matches: [
|
194
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema/?$}, false]
|
195
|
+
]
|
196
|
+
)
|
197
|
+
transcoder.transcode request_pb
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# @private
|
202
|
+
#
|
203
|
+
# GRPC transcoding helper method for the update_dataset_schema REST call
|
204
|
+
#
|
205
|
+
# @param request_pb [::Google::Cloud::DocumentAI::V1beta3::UpdateDatasetSchemaRequest]
|
206
|
+
# A request object representing the call parameters. Required.
|
207
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
208
|
+
# Uri, Body, Query string parameters
|
209
|
+
def self.transcode_update_dataset_schema_request request_pb
|
210
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
211
|
+
.with_bindings(
|
212
|
+
uri_method: :patch,
|
213
|
+
uri_template: "/v1beta3/{dataset_schema.name}",
|
214
|
+
body: "dataset_schema",
|
215
|
+
matches: [
|
216
|
+
["dataset_schema.name", %r{^projects/[^/]+/locations/[^/]+/processors/[^/]+/dataset/datasetSchema/?$}, false]
|
217
|
+
]
|
218
|
+
)
|
219
|
+
transcoder.transcode request_pb
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
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
|
|
@@ -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
|
@@ -1,16 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/documentai/v1beta3/barcode.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n-google/cloud/documentai/v1beta3/barcode.proto\x12\x1fgoogle.cloud.documentai.v1beta3\"B\n\x07\x42\x61rcode\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x14\n\x0cvalue_format\x18\x02 \x01(\t\x12\x11\n\traw_value\x18\x03 \x01(\tB\xe3\x01\n#com.google.cloud.documentai.v1beta3B\x0c\x42\x61rcodeProtoP\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"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
12
28
|
end
|
13
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
14
32
|
end
|
15
33
|
|
16
34
|
module Google
|
@@ -0,0 +1,55 @@
|
|
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_io_pb'
|
10
|
+
require 'google/cloud/documentai/v1beta3/document_schema_pb'
|
11
|
+
|
12
|
+
|
13
|
+
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\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\"\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/datasetSchemaB\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"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError => e
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.cloud.documentai.v1beta3.GcsPrefix", "google/cloud/documentai/v1beta3/document_io.proto"],
|
29
|
+
["google.cloud.documentai.v1beta3.DocumentSchema", "google/cloud/documentai/v1beta3/document_schema.proto"],
|
30
|
+
]
|
31
|
+
imports.each do |type_name, expected_filename|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
33
|
+
if import_file.name != expected_filename
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
38
|
+
warn "This will become an error in the next major version."
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Cloud
|
43
|
+
module DocumentAI
|
44
|
+
module V1beta3
|
45
|
+
Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset").msgclass
|
46
|
+
Dataset::GCSManagedConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.GCSManagedConfig").msgclass
|
47
|
+
Dataset::DocumentWarehouseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.DocumentWarehouseConfig").msgclass
|
48
|
+
Dataset::UnmanagedDatasetConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.UnmanagedDatasetConfig").msgclass
|
49
|
+
Dataset::SpannerIndexingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.SpannerIndexingConfig").msgclass
|
50
|
+
Dataset::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.Dataset.State").enummodule
|
51
|
+
DatasetSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.documentai.v1beta3.DatasetSchema").msgclass
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/documentai/v1beta3/document_io.proto
|
3
4
|
|
@@ -5,53 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/protobuf/field_mask_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
add_message "google.cloud.documentai.v1beta3.DocumentOutputConfig" do
|
31
|
-
oneof :destination do
|
32
|
-
optional :gcs_output_config, :message, 1, "google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
add_message "google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig" do
|
36
|
-
optional :gcs_uri, :string, 1
|
37
|
-
optional :field_mask, :message, 2, "google.protobuf.FieldMask"
|
38
|
-
optional :sharding_config, :message, 3, "google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig"
|
39
|
-
end
|
40
|
-
add_message "google.cloud.documentai.v1beta3.DocumentOutputConfig.GcsOutputConfig.ShardingConfig" do
|
41
|
-
optional :pages_per_shard, :int32, 1
|
42
|
-
optional :pages_overlap, :int32, 2
|
43
|
-
end
|
44
|
-
add_message "google.cloud.documentai.v1beta3.OcrConfig" do
|
45
|
-
optional :hints, :message, 2, "google.cloud.documentai.v1beta3.OcrConfig.Hints"
|
46
|
-
optional :enable_native_pdf_parsing, :bool, 3
|
47
|
-
optional :enable_image_quality_scores, :bool, 4
|
48
|
-
repeated :advanced_ocr_options, :string, 5
|
49
|
-
optional :enable_symbol, :bool, 6
|
50
|
-
end
|
51
|
-
add_message "google.cloud.documentai.v1beta3.OcrConfig.Hints" do
|
52
|
-
repeated :language_hints, :string, 1
|
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\"\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
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
53
31
|
end
|
54
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
55
35
|
end
|
56
36
|
|
57
37
|
module Google
|