google-cloud-bigquery-migration-v2 0.9.2 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb +7 -1
- data/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb +1 -1
- data/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb +1 -1
- data/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb +17 -7
- data/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb +981 -0
- data/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb +486 -0
- data/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb +54 -0
- data/lib/google/cloud/bigquery/migration/v2/migration_service.rb +6 -0
- data/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb +1 -1
- data/lib/google/cloud/bigquery/migration/v2/rest.rb +39 -0
- data/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb +6 -1
- data/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb +51 -0
- data/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb +48 -0
- data/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb +47 -0
- data/lib/google/cloud/bigquery/migration/v2/version.rb +1 -1
- data/lib/google/cloud/bigquery/migration/v2.rb +5 -0
- data/proto_docs/google/api/client.rb +18 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +51 -4
- data/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb +41 -0
- data/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb +130 -0
- data/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb +67 -0
- data/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb +69 -0
- metadata +14 -116
@@ -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
|
@@ -13,7 +13,7 @@ require 'google/protobuf/empty_pb'
|
|
13
13
|
require 'google/protobuf/field_mask_pb'
|
14
14
|
|
15
15
|
|
16
|
-
descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/bigquery/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\
|
16
|
+
descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/bigquery/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3"
|
17
17
|
|
18
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
19
|
|
@@ -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
|