google-cloud-bigquery-migration-v2 0.10.0 → 0.11.1

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 (22) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb +7 -1
  3. data/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb +17 -7
  4. data/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb +981 -0
  5. data/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb +486 -0
  6. data/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb +54 -0
  7. data/lib/google/cloud/bigquery/migration/v2/migration_service.rb +6 -0
  8. data/lib/google/cloud/bigquery/migration/v2/rest.rb +39 -0
  9. data/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb +6 -1
  10. data/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb +51 -0
  11. data/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb +48 -0
  12. data/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb +47 -0
  13. data/lib/google/cloud/bigquery/migration/v2/version.rb +1 -1
  14. data/lib/google/cloud/bigquery/migration/v2.rb +5 -0
  15. data/proto_docs/google/api/client.rb +35 -10
  16. data/proto_docs/google/api/resource.rb +7 -2
  17. data/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +51 -4
  18. data/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb +41 -0
  19. data/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb +130 -0
  20. data/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb +67 -0
  21. data/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb +69 -0
  22. metadata +12 -2
@@ -0,0 +1,486 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/bigquery/migration/v2/migration_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Bigquery
24
+ module Migration
25
+ module V2
26
+ module MigrationService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the MigrationService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: false,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the create_migration_workflow REST call
67
+ #
68
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow]
78
+ # A result object deserialized from the server's reply
79
+ def create_migration_workflow request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # Baseline implementation for the get_migration_workflow REST call
105
+ #
106
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest]
107
+ # A request object representing the call parameters. Required.
108
+ # @param options [::Gapic::CallOptions]
109
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
110
+ #
111
+ # @yield [result, operation] Access the result along with the TransportOperation object
112
+ # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow]
113
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
114
+ #
115
+ # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow]
116
+ # A result object deserialized from the server's reply
117
+ def get_migration_workflow request_pb, options = nil
118
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
119
+
120
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_request request_pb
121
+ query_string_params = if query_string_params.any?
122
+ query_string_params.to_h { |p| p.split "=", 2 }
123
+ else
124
+ {}
125
+ end
126
+
127
+ response = @client_stub.make_http_request(
128
+ verb,
129
+ uri: uri,
130
+ body: body || "",
131
+ params: query_string_params,
132
+ options: options
133
+ )
134
+ operation = ::Gapic::Rest::TransportOperation.new response
135
+ result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true
136
+
137
+ yield result, operation if block_given?
138
+ result
139
+ end
140
+
141
+ ##
142
+ # Baseline implementation for the list_migration_workflows REST call
143
+ #
144
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest]
145
+ # A request object representing the call parameters. Required.
146
+ # @param options [::Gapic::CallOptions]
147
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
148
+ #
149
+ # @yield [result, operation] Access the result along with the TransportOperation object
150
+ # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse]
151
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
152
+ #
153
+ # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse]
154
+ # A result object deserialized from the server's reply
155
+ def list_migration_workflows request_pb, options = nil
156
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
157
+
158
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_request request_pb
159
+ query_string_params = if query_string_params.any?
160
+ query_string_params.to_h { |p| p.split "=", 2 }
161
+ else
162
+ {}
163
+ end
164
+
165
+ response = @client_stub.make_http_request(
166
+ verb,
167
+ uri: uri,
168
+ body: body || "",
169
+ params: query_string_params,
170
+ options: options
171
+ )
172
+ operation = ::Gapic::Rest::TransportOperation.new response
173
+ result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true
174
+
175
+ yield result, operation if block_given?
176
+ result
177
+ end
178
+
179
+ ##
180
+ # Baseline implementation for the delete_migration_workflow REST call
181
+ #
182
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest]
183
+ # A request object representing the call parameters. Required.
184
+ # @param options [::Gapic::CallOptions]
185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
186
+ #
187
+ # @yield [result, operation] Access the result along with the TransportOperation object
188
+ # @yieldparam result [::Google::Protobuf::Empty]
189
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
190
+ #
191
+ # @return [::Google::Protobuf::Empty]
192
+ # A result object deserialized from the server's reply
193
+ def delete_migration_workflow request_pb, options = nil
194
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
195
+
196
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_request request_pb
197
+ query_string_params = if query_string_params.any?
198
+ query_string_params.to_h { |p| p.split "=", 2 }
199
+ else
200
+ {}
201
+ end
202
+
203
+ response = @client_stub.make_http_request(
204
+ verb,
205
+ uri: uri,
206
+ body: body || "",
207
+ params: query_string_params,
208
+ options: options
209
+ )
210
+ operation = ::Gapic::Rest::TransportOperation.new response
211
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
212
+
213
+ yield result, operation if block_given?
214
+ result
215
+ end
216
+
217
+ ##
218
+ # Baseline implementation for the start_migration_workflow REST call
219
+ #
220
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest]
221
+ # A request object representing the call parameters. Required.
222
+ # @param options [::Gapic::CallOptions]
223
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
224
+ #
225
+ # @yield [result, operation] Access the result along with the TransportOperation object
226
+ # @yieldparam result [::Google::Protobuf::Empty]
227
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
228
+ #
229
+ # @return [::Google::Protobuf::Empty]
230
+ # A result object deserialized from the server's reply
231
+ def start_migration_workflow request_pb, options = nil
232
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
233
+
234
+ verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_request request_pb
235
+ query_string_params = if query_string_params.any?
236
+ query_string_params.to_h { |p| p.split "=", 2 }
237
+ else
238
+ {}
239
+ end
240
+
241
+ response = @client_stub.make_http_request(
242
+ verb,
243
+ uri: uri,
244
+ body: body || "",
245
+ params: query_string_params,
246
+ options: options
247
+ )
248
+ operation = ::Gapic::Rest::TransportOperation.new response
249
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
250
+
251
+ yield result, operation if block_given?
252
+ result
253
+ end
254
+
255
+ ##
256
+ # Baseline implementation for the get_migration_subtask REST call
257
+ #
258
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest]
259
+ # A request object representing the call parameters. Required.
260
+ # @param options [::Gapic::CallOptions]
261
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
262
+ #
263
+ # @yield [result, operation] Access the result along with the TransportOperation object
264
+ # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask]
265
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
266
+ #
267
+ # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask]
268
+ # A result object deserialized from the server's reply
269
+ def get_migration_subtask request_pb, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
271
+
272
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_request request_pb
273
+ query_string_params = if query_string_params.any?
274
+ query_string_params.to_h { |p| p.split "=", 2 }
275
+ else
276
+ {}
277
+ end
278
+
279
+ response = @client_stub.make_http_request(
280
+ verb,
281
+ uri: uri,
282
+ body: body || "",
283
+ params: query_string_params,
284
+ options: options
285
+ )
286
+ operation = ::Gapic::Rest::TransportOperation.new response
287
+ result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.decode_json response.body, ignore_unknown_fields: true
288
+
289
+ yield result, operation if block_given?
290
+ result
291
+ end
292
+
293
+ ##
294
+ # Baseline implementation for the list_migration_subtasks REST call
295
+ #
296
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest]
297
+ # A request object representing the call parameters. Required.
298
+ # @param options [::Gapic::CallOptions]
299
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
300
+ #
301
+ # @yield [result, operation] Access the result along with the TransportOperation object
302
+ # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse]
303
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
304
+ #
305
+ # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse]
306
+ # A result object deserialized from the server's reply
307
+ def list_migration_subtasks request_pb, options = nil
308
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
309
+
310
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_request request_pb
311
+ query_string_params = if query_string_params.any?
312
+ query_string_params.to_h { |p| p.split "=", 2 }
313
+ else
314
+ {}
315
+ end
316
+
317
+ response = @client_stub.make_http_request(
318
+ verb,
319
+ uri: uri,
320
+ body: body || "",
321
+ params: query_string_params,
322
+ options: options
323
+ )
324
+ operation = ::Gapic::Rest::TransportOperation.new response
325
+ result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.decode_json response.body, ignore_unknown_fields: true
326
+
327
+ yield result, operation if block_given?
328
+ result
329
+ end
330
+
331
+ ##
332
+ # @private
333
+ #
334
+ # GRPC transcoding helper method for the create_migration_workflow REST call
335
+ #
336
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest]
337
+ # A request object representing the call parameters. Required.
338
+ # @return [Array(String, [String, nil], Hash{String => String})]
339
+ # Uri, Body, Query string parameters
340
+ def self.transcode_create_migration_workflow_request request_pb
341
+ transcoder = Gapic::Rest::GrpcTranscoder.new
342
+ .with_bindings(
343
+ uri_method: :post,
344
+ uri_template: "/v2/{parent}/workflows",
345
+ body: "migration_workflow",
346
+ matches: [
347
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
348
+ ]
349
+ )
350
+ transcoder.transcode request_pb
351
+ end
352
+
353
+ ##
354
+ # @private
355
+ #
356
+ # GRPC transcoding helper method for the get_migration_workflow REST call
357
+ #
358
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest]
359
+ # A request object representing the call parameters. Required.
360
+ # @return [Array(String, [String, nil], Hash{String => String})]
361
+ # Uri, Body, Query string parameters
362
+ def self.transcode_get_migration_workflow_request request_pb
363
+ transcoder = Gapic::Rest::GrpcTranscoder.new
364
+ .with_bindings(
365
+ uri_method: :get,
366
+ uri_template: "/v2/{name}",
367
+ matches: [
368
+ ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
369
+ ]
370
+ )
371
+ transcoder.transcode request_pb
372
+ end
373
+
374
+ ##
375
+ # @private
376
+ #
377
+ # GRPC transcoding helper method for the list_migration_workflows REST call
378
+ #
379
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest]
380
+ # A request object representing the call parameters. Required.
381
+ # @return [Array(String, [String, nil], Hash{String => String})]
382
+ # Uri, Body, Query string parameters
383
+ def self.transcode_list_migration_workflows_request request_pb
384
+ transcoder = Gapic::Rest::GrpcTranscoder.new
385
+ .with_bindings(
386
+ uri_method: :get,
387
+ uri_template: "/v2/{parent}/workflows",
388
+ matches: [
389
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
390
+ ]
391
+ )
392
+ transcoder.transcode request_pb
393
+ end
394
+
395
+ ##
396
+ # @private
397
+ #
398
+ # GRPC transcoding helper method for the delete_migration_workflow REST call
399
+ #
400
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest]
401
+ # A request object representing the call parameters. Required.
402
+ # @return [Array(String, [String, nil], Hash{String => String})]
403
+ # Uri, Body, Query string parameters
404
+ def self.transcode_delete_migration_workflow_request request_pb
405
+ transcoder = Gapic::Rest::GrpcTranscoder.new
406
+ .with_bindings(
407
+ uri_method: :delete,
408
+ uri_template: "/v2/{name}",
409
+ matches: [
410
+ ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
411
+ ]
412
+ )
413
+ transcoder.transcode request_pb
414
+ end
415
+
416
+ ##
417
+ # @private
418
+ #
419
+ # GRPC transcoding helper method for the start_migration_workflow REST call
420
+ #
421
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest]
422
+ # A request object representing the call parameters. Required.
423
+ # @return [Array(String, [String, nil], Hash{String => String})]
424
+ # Uri, Body, Query string parameters
425
+ def self.transcode_start_migration_workflow_request request_pb
426
+ transcoder = Gapic::Rest::GrpcTranscoder.new
427
+ .with_bindings(
428
+ uri_method: :post,
429
+ uri_template: "/v2/{name}:start",
430
+ body: "*",
431
+ matches: [
432
+ ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
433
+ ]
434
+ )
435
+ transcoder.transcode request_pb
436
+ end
437
+
438
+ ##
439
+ # @private
440
+ #
441
+ # GRPC transcoding helper method for the get_migration_subtask REST call
442
+ #
443
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest]
444
+ # A request object representing the call parameters. Required.
445
+ # @return [Array(String, [String, nil], Hash{String => String})]
446
+ # Uri, Body, Query string parameters
447
+ def self.transcode_get_migration_subtask_request request_pb
448
+ transcoder = Gapic::Rest::GrpcTranscoder.new
449
+ .with_bindings(
450
+ uri_method: :get,
451
+ uri_template: "/v2/{name}",
452
+ matches: [
453
+ ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false]
454
+ ]
455
+ )
456
+ transcoder.transcode request_pb
457
+ end
458
+
459
+ ##
460
+ # @private
461
+ #
462
+ # GRPC transcoding helper method for the list_migration_subtasks REST call
463
+ #
464
+ # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest]
465
+ # A request object representing the call parameters. Required.
466
+ # @return [Array(String, [String, nil], Hash{String => String})]
467
+ # Uri, Body, Query string parameters
468
+ def self.transcode_list_migration_subtasks_request request_pb
469
+ transcoder = Gapic::Rest::GrpcTranscoder.new
470
+ .with_bindings(
471
+ uri_method: :get,
472
+ uri_template: "/v2/{parent}/subtasks",
473
+ matches: [
474
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
475
+ ]
476
+ )
477
+ transcoder.transcode request_pb
478
+ end
479
+ end
480
+ end
481
+ end
482
+ end
483
+ end
484
+ end
485
+ end
486
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/bigquery/migration/v2/version"
24
+
25
+ require "google/cloud/bigquery/migration/v2/migration_service/credentials"
26
+ require "google/cloud/bigquery/migration/v2/migration_service/paths"
27
+ require "google/cloud/bigquery/migration/v2/migration_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Bigquery
32
+ module Migration
33
+ module V2
34
+ ##
35
+ # Service to handle EDW migrations.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/cloud/bigquery/migration/v2/migration_service/rest"
40
+ # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new
41
+ #
42
+ module MigrationService
43
+ # Client for the REST transport
44
+ module Rest
45
+ end
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/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/bigquery/migration/v2/version"
25
25
  require "google/cloud/bigquery/migration/v2/migration_service/credentials"
26
26
  require "google/cloud/bigquery/migration/v2/migration_service/paths"
27
27
  require "google/cloud/bigquery/migration/v2/migration_service/client"
28
+ require "google/cloud/bigquery/migration/v2/migration_service/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -39,6 +40,11 @@ module Google
39
40
  # require "google/cloud/bigquery/migration/v2/migration_service"
40
41
  # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new
41
42
  #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/cloud/bigquery/migration/v2/migration_service/rest"
46
+ # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new
47
+ #
42
48
  module MigrationService
43
49
  end
44
50
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/bigquery/migration/v2/migration_service/rest"
20
+ require "google/cloud/bigquery/migration/v2/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Bigquery
25
+ module Migration
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/bigquery/migration/v2/rest"
32
+ # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new
33
+ #
34
+ module V2
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -4,8 +4,10 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/field_behavior_pb'
7
8
 
8
- descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\"\xca\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\x84\t\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"A\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\tB\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3"
9
+
10
+ descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3"
9
11
 
10
12
  pool = Google::Protobuf::DescriptorPool.generated_pool
11
13
 
@@ -53,6 +55,9 @@ module Google
53
55
  PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass
54
56
  PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass
55
57
  MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass
58
+ DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass
59
+ SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass
60
+ GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass
56
61
  ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass
57
62
  ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass
58
63
  NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass