google-cloud-bigquery-data_transfer-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-bigquery-data_transfer-v1.rb +21 -0
- data/lib/google/cloud/bigquery/data_transfer/v1.rb +37 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb +54 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb +1567 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb +53 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb +193 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/version.rb +30 -0
- data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +217 -0
- data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +92 -0
- data/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +104 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +646 -0
- data/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb +276 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +183 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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/data_transfer/v1/data_transfer_service"
|
20
|
+
require "google/cloud/bigquery/data_transfer/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Bigquery
|
25
|
+
module DataTransfer
|
26
|
+
##
|
27
|
+
# To load this package, including all its services, and instantiate a client:
|
28
|
+
#
|
29
|
+
# require "google/cloud/bigquery/data_transfer/v1"
|
30
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
31
|
+
#
|
32
|
+
module V1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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/bigquery/data_transfer/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials"
|
26
|
+
require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths"
|
27
|
+
require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Bigquery
|
32
|
+
module DataTransfer
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# The Google BigQuery Data Transfer Service API enables BigQuery users to
|
36
|
+
# configure the transfer of their data from other Google Products into
|
37
|
+
# BigQuery. This service contains methods that are end user exposed. It backs
|
38
|
+
# up the frontend.
|
39
|
+
#
|
40
|
+
# To load this service and instantiate a client:
|
41
|
+
#
|
42
|
+
# require "google/cloud/bigquery/data_transfer/v1/data_transfer_service"
|
43
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
44
|
+
#
|
45
|
+
module DataTransferService
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
helper_path = ::File.join __dir__, "data_transfer_service", "helpers.rb"
|
54
|
+
require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,1567 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 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/errors"
|
20
|
+
require "google/cloud/bigquery/datatransfer/v1/datatransfer_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Bigquery
|
25
|
+
module DataTransfer
|
26
|
+
module V1
|
27
|
+
module DataTransferService
|
28
|
+
##
|
29
|
+
# Client for the DataTransferService service.
|
30
|
+
#
|
31
|
+
# The Google BigQuery Data Transfer Service API enables BigQuery users to
|
32
|
+
# configure the transfer of their data from other Google Products into
|
33
|
+
# BigQuery. This service contains methods that are end user exposed. It backs
|
34
|
+
# up the frontend.
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
include Paths
|
38
|
+
|
39
|
+
# @private
|
40
|
+
attr_reader :data_transfer_service_stub
|
41
|
+
|
42
|
+
##
|
43
|
+
# Configure the DataTransferService Client class.
|
44
|
+
#
|
45
|
+
# See {Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration}
|
46
|
+
# for a description of the configuration fields.
|
47
|
+
#
|
48
|
+
# ## Example
|
49
|
+
#
|
50
|
+
# To modify the configuration for all DataTransferService clients:
|
51
|
+
#
|
52
|
+
# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config|
|
53
|
+
# config.timeout = 10_000
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# @yield [config] Configure the Client client.
|
57
|
+
# @yieldparam config [Client::Configuration]
|
58
|
+
#
|
59
|
+
# @return [Client::Configuration]
|
60
|
+
#
|
61
|
+
def self.configure
|
62
|
+
@configure ||= begin
|
63
|
+
namespace = ["Google", "Cloud", "Bigquery", "DataTransfer", "V1"]
|
64
|
+
parent_config = while namespace.any?
|
65
|
+
parent_name = namespace.join "::"
|
66
|
+
parent_const = const_get parent_name
|
67
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
68
|
+
namespace.pop
|
69
|
+
end
|
70
|
+
default_config = Client::Configuration.new parent_config
|
71
|
+
|
72
|
+
default_config.rpcs.get_data_source.timeout = 20.0
|
73
|
+
default_config.rpcs.get_data_source.retry_policy = {
|
74
|
+
initial_delay: 0.1,
|
75
|
+
max_delay: 60.0,
|
76
|
+
multiplier: 1.3,
|
77
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
78
|
+
}
|
79
|
+
|
80
|
+
default_config.rpcs.list_data_sources.timeout = 20.0
|
81
|
+
default_config.rpcs.list_data_sources.retry_policy = {
|
82
|
+
initial_delay: 0.1,
|
83
|
+
max_delay: 60.0,
|
84
|
+
multiplier: 1.3,
|
85
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.create_transfer_config.timeout = 30.0
|
89
|
+
|
90
|
+
default_config.rpcs.update_transfer_config.timeout = 30.0
|
91
|
+
|
92
|
+
default_config.rpcs.delete_transfer_config.timeout = 20.0
|
93
|
+
default_config.rpcs.delete_transfer_config.retry_policy = {
|
94
|
+
initial_delay: 0.1,
|
95
|
+
max_delay: 60.0,
|
96
|
+
multiplier: 1.3,
|
97
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
98
|
+
}
|
99
|
+
|
100
|
+
default_config.rpcs.get_transfer_config.timeout = 20.0
|
101
|
+
default_config.rpcs.get_transfer_config.retry_policy = {
|
102
|
+
initial_delay: 0.1,
|
103
|
+
max_delay: 60.0,
|
104
|
+
multiplier: 1.3,
|
105
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
106
|
+
}
|
107
|
+
|
108
|
+
default_config.rpcs.list_transfer_configs.timeout = 20.0
|
109
|
+
default_config.rpcs.list_transfer_configs.retry_policy = {
|
110
|
+
initial_delay: 0.1,
|
111
|
+
max_delay: 60.0,
|
112
|
+
multiplier: 1.3,
|
113
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
114
|
+
}
|
115
|
+
|
116
|
+
default_config.rpcs.schedule_transfer_runs.timeout = 30.0
|
117
|
+
|
118
|
+
default_config.rpcs.get_transfer_run.timeout = 20.0
|
119
|
+
default_config.rpcs.get_transfer_run.retry_policy = {
|
120
|
+
initial_delay: 0.1,
|
121
|
+
max_delay: 60.0,
|
122
|
+
multiplier: 1.3,
|
123
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
124
|
+
}
|
125
|
+
|
126
|
+
default_config.rpcs.delete_transfer_run.timeout = 20.0
|
127
|
+
default_config.rpcs.delete_transfer_run.retry_policy = {
|
128
|
+
initial_delay: 0.1,
|
129
|
+
max_delay: 60.0,
|
130
|
+
multiplier: 1.3,
|
131
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
132
|
+
}
|
133
|
+
|
134
|
+
default_config.rpcs.list_transfer_runs.timeout = 20.0
|
135
|
+
default_config.rpcs.list_transfer_runs.retry_policy = {
|
136
|
+
initial_delay: 0.1,
|
137
|
+
max_delay: 60.0,
|
138
|
+
multiplier: 1.3,
|
139
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
140
|
+
}
|
141
|
+
|
142
|
+
default_config.rpcs.list_transfer_logs.timeout = 20.0
|
143
|
+
default_config.rpcs.list_transfer_logs.retry_policy = {
|
144
|
+
initial_delay: 0.1,
|
145
|
+
max_delay: 60.0,
|
146
|
+
multiplier: 1.3,
|
147
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
148
|
+
}
|
149
|
+
|
150
|
+
default_config.rpcs.check_valid_creds.timeout = 20.0
|
151
|
+
default_config.rpcs.check_valid_creds.retry_policy = {
|
152
|
+
initial_delay: 0.1,
|
153
|
+
max_delay: 60.0,
|
154
|
+
multiplier: 1.3,
|
155
|
+
retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
|
156
|
+
}
|
157
|
+
|
158
|
+
default_config
|
159
|
+
end
|
160
|
+
yield @configure if block_given?
|
161
|
+
@configure
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# Configure the DataTransferService Client instance.
|
166
|
+
#
|
167
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
168
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
169
|
+
# should be made on {Client.configure}.
|
170
|
+
#
|
171
|
+
# See {Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration}
|
172
|
+
# for a description of the configuration fields.
|
173
|
+
#
|
174
|
+
# @yield [config] Configure the Client client.
|
175
|
+
# @yieldparam config [Client::Configuration]
|
176
|
+
#
|
177
|
+
# @return [Client::Configuration]
|
178
|
+
#
|
179
|
+
def configure
|
180
|
+
yield @config if block_given?
|
181
|
+
@config
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# Create a new DataTransferService client object.
|
186
|
+
#
|
187
|
+
# ## Examples
|
188
|
+
#
|
189
|
+
# To create a new DataTransferService client with the default
|
190
|
+
# configuration:
|
191
|
+
#
|
192
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new
|
193
|
+
#
|
194
|
+
# To create a new DataTransferService client with a custom
|
195
|
+
# configuration:
|
196
|
+
#
|
197
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config|
|
198
|
+
# config.timeout = 10_000
|
199
|
+
# end
|
200
|
+
#
|
201
|
+
# @yield [config] Configure the DataTransferService client.
|
202
|
+
# @yieldparam config [Client::Configuration]
|
203
|
+
#
|
204
|
+
def initialize
|
205
|
+
# These require statements are intentionally placed here to initialize
|
206
|
+
# the gRPC module only when it's required.
|
207
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
208
|
+
require "gapic/grpc"
|
209
|
+
require "google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb"
|
210
|
+
|
211
|
+
# Create the configuration object
|
212
|
+
@config = Configuration.new Client.configure
|
213
|
+
|
214
|
+
# Yield the configuration if needed
|
215
|
+
yield @config if block_given?
|
216
|
+
|
217
|
+
# Create credentials
|
218
|
+
credentials = @config.credentials
|
219
|
+
credentials ||= Credentials.default scope: @config.scope
|
220
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
221
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
222
|
+
end
|
223
|
+
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
224
|
+
|
225
|
+
@data_transfer_service_stub = Gapic::ServiceStub.new(
|
226
|
+
Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Stub,
|
227
|
+
credentials: credentials,
|
228
|
+
endpoint: @config.endpoint,
|
229
|
+
channel_args: @config.channel_args,
|
230
|
+
interceptors: @config.interceptors
|
231
|
+
)
|
232
|
+
end
|
233
|
+
|
234
|
+
# Service calls
|
235
|
+
|
236
|
+
##
|
237
|
+
# Retrieves a supported data source and returns its settings,
|
238
|
+
# which can be used for UI rendering.
|
239
|
+
#
|
240
|
+
# @overload get_data_source(request, options = nil)
|
241
|
+
# Pass arguments to `get_data_source` via a request object, either of type
|
242
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash.
|
243
|
+
#
|
244
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, Hash]
|
245
|
+
# A request object representing the call parameters. Required. To specify no
|
246
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
247
|
+
# @param options [Gapic::CallOptions, Hash]
|
248
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
249
|
+
#
|
250
|
+
# @overload get_data_source(name: nil)
|
251
|
+
# Pass arguments to `get_data_source` via keyword arguments. Note that at
|
252
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
253
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
254
|
+
#
|
255
|
+
# @param name [String]
|
256
|
+
# Required. The field will contain name of the resource requested, for example:
|
257
|
+
# `projects/{project_id}/dataSources/{data_source_id}` or
|
258
|
+
# `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
|
259
|
+
#
|
260
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
261
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::DataSource]
|
262
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
263
|
+
#
|
264
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSource]
|
265
|
+
#
|
266
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
267
|
+
#
|
268
|
+
def get_data_source request, options = nil
|
269
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
270
|
+
|
271
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest
|
272
|
+
|
273
|
+
# Converts hash and nil to an options object
|
274
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
275
|
+
|
276
|
+
# Customize the options with defaults
|
277
|
+
metadata = @config.rpcs.get_data_source.metadata.to_h
|
278
|
+
|
279
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
280
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
281
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
282
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
283
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
284
|
+
|
285
|
+
header_params = {
|
286
|
+
"name" => request.name
|
287
|
+
}
|
288
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
289
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
290
|
+
|
291
|
+
options.apply_defaults timeout: @config.rpcs.get_data_source.timeout,
|
292
|
+
metadata: metadata,
|
293
|
+
retry_policy: @config.rpcs.get_data_source.retry_policy
|
294
|
+
options.apply_defaults metadata: @config.metadata,
|
295
|
+
retry_policy: @config.retry_policy
|
296
|
+
|
297
|
+
@data_transfer_service_stub.call_rpc :get_data_source, request, options: options do |response, operation|
|
298
|
+
yield response, operation if block_given?
|
299
|
+
return response
|
300
|
+
end
|
301
|
+
rescue GRPC::BadStatus => e
|
302
|
+
raise Google::Cloud::Error.from_error(e)
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# Lists supported data sources and returns their settings,
|
307
|
+
# which can be used for UI rendering.
|
308
|
+
#
|
309
|
+
# @overload list_data_sources(request, options = nil)
|
310
|
+
# Pass arguments to `list_data_sources` via a request object, either of type
|
311
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash.
|
312
|
+
#
|
313
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, Hash]
|
314
|
+
# A request object representing the call parameters. Required. To specify no
|
315
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
316
|
+
# @param options [Gapic::CallOptions, Hash]
|
317
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
318
|
+
#
|
319
|
+
# @overload list_data_sources(parent: nil, page_token: nil, page_size: nil)
|
320
|
+
# Pass arguments to `list_data_sources` via keyword arguments. Note that at
|
321
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
322
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
323
|
+
#
|
324
|
+
# @param parent [String]
|
325
|
+
# Required. The BigQuery project id for which data sources should be returned.
|
326
|
+
# Must be in the form: `projects/{project_id}` or
|
327
|
+
# `projects/{project_id}/locations/{location_id}
|
328
|
+
# @param page_token [String]
|
329
|
+
# Pagination token, which can be used to request a specific page
|
330
|
+
# of `ListDataSourcesRequest` list results. For multiple-page
|
331
|
+
# results, `ListDataSourcesResponse` outputs
|
332
|
+
# a `next_page` token, which can be used as the
|
333
|
+
# `page_token` value to request the next page of list results.
|
334
|
+
# @param page_size [Integer]
|
335
|
+
# Page size. The default page size is the maximum value of 1000 results.
|
336
|
+
#
|
337
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
338
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::DataSource>]
|
339
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
340
|
+
#
|
341
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::DataSource>]
|
342
|
+
#
|
343
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
344
|
+
#
|
345
|
+
def list_data_sources request, options = nil
|
346
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
347
|
+
|
348
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest
|
349
|
+
|
350
|
+
# Converts hash and nil to an options object
|
351
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
352
|
+
|
353
|
+
# Customize the options with defaults
|
354
|
+
metadata = @config.rpcs.list_data_sources.metadata.to_h
|
355
|
+
|
356
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
357
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
358
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
359
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
360
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
|
+
|
362
|
+
header_params = {
|
363
|
+
"parent" => request.parent
|
364
|
+
}
|
365
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
366
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
367
|
+
|
368
|
+
options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout,
|
369
|
+
metadata: metadata,
|
370
|
+
retry_policy: @config.rpcs.list_data_sources.retry_policy
|
371
|
+
options.apply_defaults metadata: @config.metadata,
|
372
|
+
retry_policy: @config.retry_policy
|
373
|
+
|
374
|
+
@data_transfer_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation|
|
375
|
+
response = Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, request, response, operation, options
|
376
|
+
yield response, operation if block_given?
|
377
|
+
return response
|
378
|
+
end
|
379
|
+
rescue GRPC::BadStatus => e
|
380
|
+
raise Google::Cloud::Error.from_error(e)
|
381
|
+
end
|
382
|
+
|
383
|
+
##
|
384
|
+
# Creates a new data transfer configuration.
|
385
|
+
#
|
386
|
+
# @overload create_transfer_config(request, options = nil)
|
387
|
+
# Pass arguments to `create_transfer_config` via a request object, either of type
|
388
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash.
|
389
|
+
#
|
390
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, Hash]
|
391
|
+
# A request object representing the call parameters. Required. To specify no
|
392
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
393
|
+
# @param options [Gapic::CallOptions, Hash]
|
394
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
395
|
+
#
|
396
|
+
# @overload create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil)
|
397
|
+
# Pass arguments to `create_transfer_config` via keyword arguments. Note that at
|
398
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
399
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
400
|
+
#
|
401
|
+
# @param parent [String]
|
402
|
+
# Required. The BigQuery project id where the transfer configuration should be created.
|
403
|
+
# Must be in the format projects/\\{project_id}/locations/\\{location_id} or
|
404
|
+
# projects/\\{project_id}. If specified location and location of the
|
405
|
+
# destination bigquery dataset do not match - the request will fail.
|
406
|
+
# @param transfer_config [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, Hash]
|
407
|
+
# Required. Data transfer configuration to create.
|
408
|
+
# @param authorization_code [String]
|
409
|
+
# Optional OAuth2 authorization code to use with this transfer configuration.
|
410
|
+
# This is required if new credentials are needed, as indicated by
|
411
|
+
# `CheckValidCreds`.
|
412
|
+
# In order to obtain authorization_code, please make a
|
413
|
+
# request to
|
414
|
+
# https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
|
415
|
+
#
|
416
|
+
# * client_id should be OAuth client_id of BigQuery DTS API for the given
|
417
|
+
# data source returned by ListDataSources method.
|
418
|
+
# * data_source_scopes are the scopes returned by ListDataSources method.
|
419
|
+
# * redirect_uri is an optional parameter. If not specified, then
|
420
|
+
# authorization code is posted to the opener of authorization flow window.
|
421
|
+
# Otherwise it will be sent to the redirect uri. A special value of
|
422
|
+
# urn:ietf:wg:oauth:2.0:oob means that authorization code should be
|
423
|
+
# returned in the title bar of the browser, with the page text prompting
|
424
|
+
# the user to copy the code and paste it in the application.
|
425
|
+
# @param version_info [String]
|
426
|
+
# Optional version info. If users want to find a very recent access token,
|
427
|
+
# that is, immediately after approving access, users have to set the
|
428
|
+
# version_info claim in the token request. To obtain the version_info, users
|
429
|
+
# must use the "none+gsession" response type. which be return a
|
430
|
+
# version_info back in the authorization response which be be put in a JWT
|
431
|
+
# claim in the token request.
|
432
|
+
# @param service_account_name [String]
|
433
|
+
# Optional service account name. If this field is set, transfer config will
|
434
|
+
# be created with this service account credentials. It requires that
|
435
|
+
# requesting user calling this API has permissions to act as this service
|
436
|
+
# account.
|
437
|
+
#
|
438
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
439
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
|
440
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
441
|
+
#
|
442
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
|
443
|
+
#
|
444
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
445
|
+
#
|
446
|
+
def create_transfer_config request, options = nil
|
447
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
448
|
+
|
449
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest
|
450
|
+
|
451
|
+
# Converts hash and nil to an options object
|
452
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
453
|
+
|
454
|
+
# Customize the options with defaults
|
455
|
+
metadata = @config.rpcs.create_transfer_config.metadata.to_h
|
456
|
+
|
457
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
458
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
459
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
460
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
461
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
462
|
+
|
463
|
+
header_params = {
|
464
|
+
"parent" => request.parent
|
465
|
+
}
|
466
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
467
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
468
|
+
|
469
|
+
options.apply_defaults timeout: @config.rpcs.create_transfer_config.timeout,
|
470
|
+
metadata: metadata,
|
471
|
+
retry_policy: @config.rpcs.create_transfer_config.retry_policy
|
472
|
+
options.apply_defaults metadata: @config.metadata,
|
473
|
+
retry_policy: @config.retry_policy
|
474
|
+
|
475
|
+
@data_transfer_service_stub.call_rpc :create_transfer_config, request, options: options do |response, operation|
|
476
|
+
yield response, operation if block_given?
|
477
|
+
return response
|
478
|
+
end
|
479
|
+
rescue GRPC::BadStatus => e
|
480
|
+
raise Google::Cloud::Error.from_error(e)
|
481
|
+
end
|
482
|
+
|
483
|
+
##
|
484
|
+
# Updates a data transfer configuration.
|
485
|
+
# All fields must be set, even if they are not updated.
|
486
|
+
#
|
487
|
+
# @overload update_transfer_config(request, options = nil)
|
488
|
+
# Pass arguments to `update_transfer_config` via a request object, either of type
|
489
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash.
|
490
|
+
#
|
491
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, Hash]
|
492
|
+
# A request object representing the call parameters. Required. To specify no
|
493
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
494
|
+
# @param options [Gapic::CallOptions, Hash]
|
495
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
496
|
+
#
|
497
|
+
# @overload update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil)
|
498
|
+
# Pass arguments to `update_transfer_config` via keyword arguments. Note that at
|
499
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
500
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
501
|
+
#
|
502
|
+
# @param transfer_config [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, Hash]
|
503
|
+
# Required. Data transfer configuration to create.
|
504
|
+
# @param authorization_code [String]
|
505
|
+
# Optional OAuth2 authorization code to use with this transfer configuration.
|
506
|
+
# If it is provided, the transfer configuration will be associated with the
|
507
|
+
# authorizing user.
|
508
|
+
# In order to obtain authorization_code, please make a
|
509
|
+
# request to
|
510
|
+
# https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
|
511
|
+
#
|
512
|
+
# * client_id should be OAuth client_id of BigQuery DTS API for the given
|
513
|
+
# data source returned by ListDataSources method.
|
514
|
+
# * data_source_scopes are the scopes returned by ListDataSources method.
|
515
|
+
# * redirect_uri is an optional parameter. If not specified, then
|
516
|
+
# authorization code is posted to the opener of authorization flow window.
|
517
|
+
# Otherwise it will be sent to the redirect uri. A special value of
|
518
|
+
# urn:ietf:wg:oauth:2.0:oob means that authorization code should be
|
519
|
+
# returned in the title bar of the browser, with the page text prompting
|
520
|
+
# the user to copy the code and paste it in the application.
|
521
|
+
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
522
|
+
# Required. Required list of fields to be updated in this request.
|
523
|
+
# @param version_info [String]
|
524
|
+
# Optional version info. If users want to find a very recent access token,
|
525
|
+
# that is, immediately after approving access, users have to set the
|
526
|
+
# version_info claim in the token request. To obtain the version_info, users
|
527
|
+
# must use the "none+gsession" response type. which be return a
|
528
|
+
# version_info back in the authorization response which be be put in a JWT
|
529
|
+
# claim in the token request.
|
530
|
+
# @param service_account_name [String]
|
531
|
+
# Optional service account name. If this field is set and
|
532
|
+
# "service_account_name" is set in update_mask, transfer config will be
|
533
|
+
# updated to use this service account credentials. It requires that
|
534
|
+
# requesting user calling this API has permissions to act as this service
|
535
|
+
# account.
|
536
|
+
#
|
537
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
538
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
|
539
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
540
|
+
#
|
541
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
|
542
|
+
#
|
543
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
544
|
+
#
|
545
|
+
def update_transfer_config request, options = nil
|
546
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
547
|
+
|
548
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest
|
549
|
+
|
550
|
+
# Converts hash and nil to an options object
|
551
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
552
|
+
|
553
|
+
# Customize the options with defaults
|
554
|
+
metadata = @config.rpcs.update_transfer_config.metadata.to_h
|
555
|
+
|
556
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
557
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
558
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
559
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
560
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
561
|
+
|
562
|
+
header_params = {
|
563
|
+
"transfer_config.name" => request.transfer_config.name
|
564
|
+
}
|
565
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
566
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
567
|
+
|
568
|
+
options.apply_defaults timeout: @config.rpcs.update_transfer_config.timeout,
|
569
|
+
metadata: metadata,
|
570
|
+
retry_policy: @config.rpcs.update_transfer_config.retry_policy
|
571
|
+
options.apply_defaults metadata: @config.metadata,
|
572
|
+
retry_policy: @config.retry_policy
|
573
|
+
|
574
|
+
@data_transfer_service_stub.call_rpc :update_transfer_config, request, options: options do |response, operation|
|
575
|
+
yield response, operation if block_given?
|
576
|
+
return response
|
577
|
+
end
|
578
|
+
rescue GRPC::BadStatus => e
|
579
|
+
raise Google::Cloud::Error.from_error(e)
|
580
|
+
end
|
581
|
+
|
582
|
+
##
|
583
|
+
# Deletes a data transfer configuration,
|
584
|
+
# including any associated transfer runs and logs.
|
585
|
+
#
|
586
|
+
# @overload delete_transfer_config(request, options = nil)
|
587
|
+
# Pass arguments to `delete_transfer_config` via a request object, either of type
|
588
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash.
|
589
|
+
#
|
590
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, Hash]
|
591
|
+
# A request object representing the call parameters. Required. To specify no
|
592
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
593
|
+
# @param options [Gapic::CallOptions, Hash]
|
594
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
595
|
+
#
|
596
|
+
# @overload delete_transfer_config(name: nil)
|
597
|
+
# Pass arguments to `delete_transfer_config` via keyword arguments. Note that at
|
598
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
599
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
600
|
+
#
|
601
|
+
# @param name [String]
|
602
|
+
# Required. The field will contain name of the resource requested, for example:
|
603
|
+
# `projects/{project_id}/transferConfigs/{config_id}` or
|
604
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
|
605
|
+
#
|
606
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
607
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
608
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
609
|
+
#
|
610
|
+
# @return [Google::Protobuf::Empty]
|
611
|
+
#
|
612
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
613
|
+
#
|
614
|
+
def delete_transfer_config request, options = nil
|
615
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
616
|
+
|
617
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest
|
618
|
+
|
619
|
+
# Converts hash and nil to an options object
|
620
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
621
|
+
|
622
|
+
# Customize the options with defaults
|
623
|
+
metadata = @config.rpcs.delete_transfer_config.metadata.to_h
|
624
|
+
|
625
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
626
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
627
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
628
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
629
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
630
|
+
|
631
|
+
header_params = {
|
632
|
+
"name" => request.name
|
633
|
+
}
|
634
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
635
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
636
|
+
|
637
|
+
options.apply_defaults timeout: @config.rpcs.delete_transfer_config.timeout,
|
638
|
+
metadata: metadata,
|
639
|
+
retry_policy: @config.rpcs.delete_transfer_config.retry_policy
|
640
|
+
options.apply_defaults metadata: @config.metadata,
|
641
|
+
retry_policy: @config.retry_policy
|
642
|
+
|
643
|
+
@data_transfer_service_stub.call_rpc :delete_transfer_config, request, options: options do |response, operation|
|
644
|
+
yield response, operation if block_given?
|
645
|
+
return response
|
646
|
+
end
|
647
|
+
rescue GRPC::BadStatus => e
|
648
|
+
raise Google::Cloud::Error.from_error(e)
|
649
|
+
end
|
650
|
+
|
651
|
+
##
|
652
|
+
# Returns information about a data transfer config.
|
653
|
+
#
|
654
|
+
# @overload get_transfer_config(request, options = nil)
|
655
|
+
# Pass arguments to `get_transfer_config` via a request object, either of type
|
656
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash.
|
657
|
+
#
|
658
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, Hash]
|
659
|
+
# A request object representing the call parameters. Required. To specify no
|
660
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
661
|
+
# @param options [Gapic::CallOptions, Hash]
|
662
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
663
|
+
#
|
664
|
+
# @overload get_transfer_config(name: nil)
|
665
|
+
# Pass arguments to `get_transfer_config` via keyword arguments. Note that at
|
666
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
667
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
668
|
+
#
|
669
|
+
# @param name [String]
|
670
|
+
# Required. The field will contain name of the resource requested, for example:
|
671
|
+
# `projects/{project_id}/transferConfigs/{config_id}` or
|
672
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
|
673
|
+
#
|
674
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
675
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
|
676
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
677
|
+
#
|
678
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
|
679
|
+
#
|
680
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
681
|
+
#
|
682
|
+
def get_transfer_config request, options = nil
|
683
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
684
|
+
|
685
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest
|
686
|
+
|
687
|
+
# Converts hash and nil to an options object
|
688
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
689
|
+
|
690
|
+
# Customize the options with defaults
|
691
|
+
metadata = @config.rpcs.get_transfer_config.metadata.to_h
|
692
|
+
|
693
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
694
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
695
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
696
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
697
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
698
|
+
|
699
|
+
header_params = {
|
700
|
+
"name" => request.name
|
701
|
+
}
|
702
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
703
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
704
|
+
|
705
|
+
options.apply_defaults timeout: @config.rpcs.get_transfer_config.timeout,
|
706
|
+
metadata: metadata,
|
707
|
+
retry_policy: @config.rpcs.get_transfer_config.retry_policy
|
708
|
+
options.apply_defaults metadata: @config.metadata,
|
709
|
+
retry_policy: @config.retry_policy
|
710
|
+
|
711
|
+
@data_transfer_service_stub.call_rpc :get_transfer_config, request, options: options do |response, operation|
|
712
|
+
yield response, operation if block_given?
|
713
|
+
return response
|
714
|
+
end
|
715
|
+
rescue GRPC::BadStatus => e
|
716
|
+
raise Google::Cloud::Error.from_error(e)
|
717
|
+
end
|
718
|
+
|
719
|
+
##
|
720
|
+
# Returns information about all data transfers in the project.
|
721
|
+
#
|
722
|
+
# @overload list_transfer_configs(request, options = nil)
|
723
|
+
# Pass arguments to `list_transfer_configs` via a request object, either of type
|
724
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash.
|
725
|
+
#
|
726
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, Hash]
|
727
|
+
# A request object representing the call parameters. Required. To specify no
|
728
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
729
|
+
# @param options [Gapic::CallOptions, Hash]
|
730
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
731
|
+
#
|
732
|
+
# @overload list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil)
|
733
|
+
# Pass arguments to `list_transfer_configs` via keyword arguments. Note that at
|
734
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
735
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
736
|
+
#
|
737
|
+
# @param parent [String]
|
738
|
+
# Required. The BigQuery project id for which data sources
|
739
|
+
# should be returned: `projects/{project_id}` or
|
740
|
+
# `projects/{project_id}/locations/{location_id}`
|
741
|
+
# @param data_source_ids [Array<String>]
|
742
|
+
# When specified, only configurations of requested data sources are returned.
|
743
|
+
# @param page_token [String]
|
744
|
+
# Pagination token, which can be used to request a specific page
|
745
|
+
# of `ListTransfersRequest` list results. For multiple-page
|
746
|
+
# results, `ListTransfersResponse` outputs
|
747
|
+
# a `next_page` token, which can be used as the
|
748
|
+
# `page_token` value to request the next page of list results.
|
749
|
+
# @param page_size [Integer]
|
750
|
+
# Page size. The default page size is the maximum value of 1000 results.
|
751
|
+
#
|
752
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
753
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>]
|
754
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
755
|
+
#
|
756
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>]
|
757
|
+
#
|
758
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
759
|
+
#
|
760
|
+
def list_transfer_configs request, options = nil
|
761
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
762
|
+
|
763
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest
|
764
|
+
|
765
|
+
# Converts hash and nil to an options object
|
766
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
767
|
+
|
768
|
+
# Customize the options with defaults
|
769
|
+
metadata = @config.rpcs.list_transfer_configs.metadata.to_h
|
770
|
+
|
771
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
772
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
773
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
774
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
775
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
776
|
+
|
777
|
+
header_params = {
|
778
|
+
"parent" => request.parent
|
779
|
+
}
|
780
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
781
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
782
|
+
|
783
|
+
options.apply_defaults timeout: @config.rpcs.list_transfer_configs.timeout,
|
784
|
+
metadata: metadata,
|
785
|
+
retry_policy: @config.rpcs.list_transfer_configs.retry_policy
|
786
|
+
options.apply_defaults metadata: @config.metadata,
|
787
|
+
retry_policy: @config.retry_policy
|
788
|
+
|
789
|
+
@data_transfer_service_stub.call_rpc :list_transfer_configs, request, options: options do |response, operation|
|
790
|
+
response = Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, request, response, operation, options
|
791
|
+
yield response, operation if block_given?
|
792
|
+
return response
|
793
|
+
end
|
794
|
+
rescue GRPC::BadStatus => e
|
795
|
+
raise Google::Cloud::Error.from_error(e)
|
796
|
+
end
|
797
|
+
|
798
|
+
##
|
799
|
+
# Creates transfer runs for a time range [start_time, end_time].
|
800
|
+
# For each date - or whatever granularity the data source supports - in the
|
801
|
+
# range, one transfer run is created.
|
802
|
+
# Note that runs are created per UTC time in the time range.
|
803
|
+
# DEPRECATED: use StartManualTransferRuns instead.
|
804
|
+
#
|
805
|
+
# @overload schedule_transfer_runs(request, options = nil)
|
806
|
+
# Pass arguments to `schedule_transfer_runs` via a request object, either of type
|
807
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash.
|
808
|
+
#
|
809
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, Hash]
|
810
|
+
# A request object representing the call parameters. Required. To specify no
|
811
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
812
|
+
# @param options [Gapic::CallOptions, Hash]
|
813
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
814
|
+
#
|
815
|
+
# @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil)
|
816
|
+
# Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at
|
817
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
818
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
819
|
+
#
|
820
|
+
# @param parent [String]
|
821
|
+
# Required. Transfer configuration name in the form:
|
822
|
+
# `projects/{project_id}/transferConfigs/{config_id}` or
|
823
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
|
824
|
+
# @param start_time [Google::Protobuf::Timestamp, Hash]
|
825
|
+
# Required. Start time of the range of transfer runs. For example,
|
826
|
+
# `"2017-05-25T00:00:00+00:00"`.
|
827
|
+
# @param end_time [Google::Protobuf::Timestamp, Hash]
|
828
|
+
# Required. End time of the range of transfer runs. For example,
|
829
|
+
# `"2017-05-30T00:00:00+00:00"`.
|
830
|
+
#
|
831
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
832
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse]
|
833
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
834
|
+
#
|
835
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse]
|
836
|
+
#
|
837
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
838
|
+
#
|
839
|
+
def schedule_transfer_runs request, options = nil
|
840
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
841
|
+
|
842
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest
|
843
|
+
|
844
|
+
# Converts hash and nil to an options object
|
845
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
846
|
+
|
847
|
+
# Customize the options with defaults
|
848
|
+
metadata = @config.rpcs.schedule_transfer_runs.metadata.to_h
|
849
|
+
|
850
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
851
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
852
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
853
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
854
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
855
|
+
|
856
|
+
header_params = {
|
857
|
+
"parent" => request.parent
|
858
|
+
}
|
859
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
860
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
861
|
+
|
862
|
+
options.apply_defaults timeout: @config.rpcs.schedule_transfer_runs.timeout,
|
863
|
+
metadata: metadata,
|
864
|
+
retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy
|
865
|
+
options.apply_defaults metadata: @config.metadata,
|
866
|
+
retry_policy: @config.retry_policy
|
867
|
+
|
868
|
+
@data_transfer_service_stub.call_rpc :schedule_transfer_runs, request, options: options do |response, operation|
|
869
|
+
yield response, operation if block_given?
|
870
|
+
return response
|
871
|
+
end
|
872
|
+
rescue GRPC::BadStatus => e
|
873
|
+
raise Google::Cloud::Error.from_error(e)
|
874
|
+
end
|
875
|
+
|
876
|
+
##
|
877
|
+
# Start manual transfer runs to be executed now with schedule_time equal to
|
878
|
+
# current time. The transfer runs can be created for a time range where the
|
879
|
+
# run_time is between start_time (inclusive) and end_time (exclusive), or for
|
880
|
+
# a specific run_time.
|
881
|
+
#
|
882
|
+
# @overload start_manual_transfer_runs(request, options = nil)
|
883
|
+
# Pass arguments to `start_manual_transfer_runs` via a request object, either of type
|
884
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash.
|
885
|
+
#
|
886
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, Hash]
|
887
|
+
# A request object representing the call parameters. Required. To specify no
|
888
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
889
|
+
# @param options [Gapic::CallOptions, Hash]
|
890
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
891
|
+
#
|
892
|
+
# @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil)
|
893
|
+
# Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at
|
894
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
895
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
896
|
+
#
|
897
|
+
# @param parent [String]
|
898
|
+
# Transfer configuration name in the form:
|
899
|
+
# `projects/{project_id}/transferConfigs/{config_id}` or
|
900
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
|
901
|
+
# @param requested_time_range [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, Hash]
|
902
|
+
# Time range for the transfer runs that should be started.
|
903
|
+
# @param requested_run_time [Google::Protobuf::Timestamp, Hash]
|
904
|
+
# Specific run_time for a transfer run to be started. The
|
905
|
+
# requested_run_time must not be in the future.
|
906
|
+
#
|
907
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
908
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse]
|
909
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
910
|
+
#
|
911
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse]
|
912
|
+
#
|
913
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
914
|
+
#
|
915
|
+
def start_manual_transfer_runs request, options = nil
|
916
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
917
|
+
|
918
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest
|
919
|
+
|
920
|
+
# Converts hash and nil to an options object
|
921
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
922
|
+
|
923
|
+
# Customize the options with defaults
|
924
|
+
metadata = @config.rpcs.start_manual_transfer_runs.metadata.to_h
|
925
|
+
|
926
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
927
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
928
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
929
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
930
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
931
|
+
|
932
|
+
header_params = {
|
933
|
+
"parent" => request.parent
|
934
|
+
}
|
935
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
936
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
937
|
+
|
938
|
+
options.apply_defaults timeout: @config.rpcs.start_manual_transfer_runs.timeout,
|
939
|
+
metadata: metadata,
|
940
|
+
retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy
|
941
|
+
options.apply_defaults metadata: @config.metadata,
|
942
|
+
retry_policy: @config.retry_policy
|
943
|
+
|
944
|
+
@data_transfer_service_stub.call_rpc :start_manual_transfer_runs, request, options: options do |response, operation|
|
945
|
+
yield response, operation if block_given?
|
946
|
+
return response
|
947
|
+
end
|
948
|
+
rescue GRPC::BadStatus => e
|
949
|
+
raise Google::Cloud::Error.from_error(e)
|
950
|
+
end
|
951
|
+
|
952
|
+
##
|
953
|
+
# Returns information about the particular transfer run.
|
954
|
+
#
|
955
|
+
# @overload get_transfer_run(request, options = nil)
|
956
|
+
# Pass arguments to `get_transfer_run` via a request object, either of type
|
957
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash.
|
958
|
+
#
|
959
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, Hash]
|
960
|
+
# A request object representing the call parameters. Required. To specify no
|
961
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
962
|
+
# @param options [Gapic::CallOptions, Hash]
|
963
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
964
|
+
#
|
965
|
+
# @overload get_transfer_run(name: nil)
|
966
|
+
# Pass arguments to `get_transfer_run` via keyword arguments. Note that at
|
967
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
968
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
969
|
+
#
|
970
|
+
# @param name [String]
|
971
|
+
# Required. The field will contain name of the resource requested, for example:
|
972
|
+
# `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
|
973
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
|
974
|
+
#
|
975
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
976
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::TransferRun]
|
977
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
978
|
+
#
|
979
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferRun]
|
980
|
+
#
|
981
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
982
|
+
#
|
983
|
+
def get_transfer_run request, options = nil
|
984
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
985
|
+
|
986
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest
|
987
|
+
|
988
|
+
# Converts hash and nil to an options object
|
989
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
990
|
+
|
991
|
+
# Customize the options with defaults
|
992
|
+
metadata = @config.rpcs.get_transfer_run.metadata.to_h
|
993
|
+
|
994
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
995
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
996
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
997
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
998
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
999
|
+
|
1000
|
+
header_params = {
|
1001
|
+
"name" => request.name
|
1002
|
+
}
|
1003
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1004
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1005
|
+
|
1006
|
+
options.apply_defaults timeout: @config.rpcs.get_transfer_run.timeout,
|
1007
|
+
metadata: metadata,
|
1008
|
+
retry_policy: @config.rpcs.get_transfer_run.retry_policy
|
1009
|
+
options.apply_defaults metadata: @config.metadata,
|
1010
|
+
retry_policy: @config.retry_policy
|
1011
|
+
|
1012
|
+
@data_transfer_service_stub.call_rpc :get_transfer_run, request, options: options do |response, operation|
|
1013
|
+
yield response, operation if block_given?
|
1014
|
+
return response
|
1015
|
+
end
|
1016
|
+
rescue GRPC::BadStatus => e
|
1017
|
+
raise Google::Cloud::Error.from_error(e)
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
##
|
1021
|
+
# Deletes the specified transfer run.
|
1022
|
+
#
|
1023
|
+
# @overload delete_transfer_run(request, options = nil)
|
1024
|
+
# Pass arguments to `delete_transfer_run` via a request object, either of type
|
1025
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash.
|
1026
|
+
#
|
1027
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, Hash]
|
1028
|
+
# A request object representing the call parameters. Required. To specify no
|
1029
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1030
|
+
# @param options [Gapic::CallOptions, Hash]
|
1031
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1032
|
+
#
|
1033
|
+
# @overload delete_transfer_run(name: nil)
|
1034
|
+
# Pass arguments to `delete_transfer_run` via keyword arguments. Note that at
|
1035
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1036
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1037
|
+
#
|
1038
|
+
# @param name [String]
|
1039
|
+
# Required. The field will contain name of the resource requested, for example:
|
1040
|
+
# `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
|
1041
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
|
1042
|
+
#
|
1043
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1044
|
+
# @yieldparam response [Google::Protobuf::Empty]
|
1045
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1046
|
+
#
|
1047
|
+
# @return [Google::Protobuf::Empty]
|
1048
|
+
#
|
1049
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1050
|
+
#
|
1051
|
+
def delete_transfer_run request, options = nil
|
1052
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1053
|
+
|
1054
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest
|
1055
|
+
|
1056
|
+
# Converts hash and nil to an options object
|
1057
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1058
|
+
|
1059
|
+
# Customize the options with defaults
|
1060
|
+
metadata = @config.rpcs.delete_transfer_run.metadata.to_h
|
1061
|
+
|
1062
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1063
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1064
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1065
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1066
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1067
|
+
|
1068
|
+
header_params = {
|
1069
|
+
"name" => request.name
|
1070
|
+
}
|
1071
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1072
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1073
|
+
|
1074
|
+
options.apply_defaults timeout: @config.rpcs.delete_transfer_run.timeout,
|
1075
|
+
metadata: metadata,
|
1076
|
+
retry_policy: @config.rpcs.delete_transfer_run.retry_policy
|
1077
|
+
options.apply_defaults metadata: @config.metadata,
|
1078
|
+
retry_policy: @config.retry_policy
|
1079
|
+
|
1080
|
+
@data_transfer_service_stub.call_rpc :delete_transfer_run, request, options: options do |response, operation|
|
1081
|
+
yield response, operation if block_given?
|
1082
|
+
return response
|
1083
|
+
end
|
1084
|
+
rescue GRPC::BadStatus => e
|
1085
|
+
raise Google::Cloud::Error.from_error(e)
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
##
|
1089
|
+
# Returns information about running and completed jobs.
|
1090
|
+
#
|
1091
|
+
# @overload list_transfer_runs(request, options = nil)
|
1092
|
+
# Pass arguments to `list_transfer_runs` via a request object, either of type
|
1093
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash.
|
1094
|
+
#
|
1095
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, Hash]
|
1096
|
+
# A request object representing the call parameters. Required. To specify no
|
1097
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1098
|
+
# @param options [Gapic::CallOptions, Hash]
|
1099
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1100
|
+
#
|
1101
|
+
# @overload list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil)
|
1102
|
+
# Pass arguments to `list_transfer_runs` via keyword arguments. Note that at
|
1103
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1104
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1105
|
+
#
|
1106
|
+
# @param parent [String]
|
1107
|
+
# Required. Name of transfer configuration for which transfer runs should be retrieved.
|
1108
|
+
# Format of transfer configuration resource name is:
|
1109
|
+
# `projects/{project_id}/transferConfigs/{config_id}` or
|
1110
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
|
1111
|
+
# @param states [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferState>]
|
1112
|
+
# When specified, only transfer runs with requested states are returned.
|
1113
|
+
# @param page_token [String]
|
1114
|
+
# Pagination token, which can be used to request a specific page
|
1115
|
+
# of `ListTransferRunsRequest` list results. For multiple-page
|
1116
|
+
# results, `ListTransferRunsResponse` outputs
|
1117
|
+
# a `next_page` token, which can be used as the
|
1118
|
+
# `page_token` value to request the next page of list results.
|
1119
|
+
# @param page_size [Integer]
|
1120
|
+
# Page size. The default page size is the maximum value of 1000 results.
|
1121
|
+
# @param run_attempt [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt]
|
1122
|
+
# Indicates how run attempts are to be pulled.
|
1123
|
+
#
|
1124
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1125
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
|
1126
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1127
|
+
#
|
1128
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
|
1129
|
+
#
|
1130
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1131
|
+
#
|
1132
|
+
def list_transfer_runs request, options = nil
|
1133
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1134
|
+
|
1135
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest
|
1136
|
+
|
1137
|
+
# Converts hash and nil to an options object
|
1138
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1139
|
+
|
1140
|
+
# Customize the options with defaults
|
1141
|
+
metadata = @config.rpcs.list_transfer_runs.metadata.to_h
|
1142
|
+
|
1143
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1144
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1145
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1146
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1147
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1148
|
+
|
1149
|
+
header_params = {
|
1150
|
+
"parent" => request.parent
|
1151
|
+
}
|
1152
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1153
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1154
|
+
|
1155
|
+
options.apply_defaults timeout: @config.rpcs.list_transfer_runs.timeout,
|
1156
|
+
metadata: metadata,
|
1157
|
+
retry_policy: @config.rpcs.list_transfer_runs.retry_policy
|
1158
|
+
options.apply_defaults metadata: @config.metadata,
|
1159
|
+
retry_policy: @config.retry_policy
|
1160
|
+
|
1161
|
+
@data_transfer_service_stub.call_rpc :list_transfer_runs, request, options: options do |response, operation|
|
1162
|
+
response = Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, request, response, operation, options
|
1163
|
+
yield response, operation if block_given?
|
1164
|
+
return response
|
1165
|
+
end
|
1166
|
+
rescue GRPC::BadStatus => e
|
1167
|
+
raise Google::Cloud::Error.from_error(e)
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
##
|
1171
|
+
# Returns user facing log messages for the data transfer run.
|
1172
|
+
#
|
1173
|
+
# @overload list_transfer_logs(request, options = nil)
|
1174
|
+
# Pass arguments to `list_transfer_logs` via a request object, either of type
|
1175
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash.
|
1176
|
+
#
|
1177
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, Hash]
|
1178
|
+
# A request object representing the call parameters. Required. To specify no
|
1179
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1180
|
+
# @param options [Gapic::CallOptions, Hash]
|
1181
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1182
|
+
#
|
1183
|
+
# @overload list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil)
|
1184
|
+
# Pass arguments to `list_transfer_logs` via keyword arguments. Note that at
|
1185
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1186
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1187
|
+
#
|
1188
|
+
# @param parent [String]
|
1189
|
+
# Required. Transfer run name in the form:
|
1190
|
+
# `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
|
1191
|
+
# `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
|
1192
|
+
# @param page_token [String]
|
1193
|
+
# Pagination token, which can be used to request a specific page
|
1194
|
+
# of `ListTransferLogsRequest` list results. For multiple-page
|
1195
|
+
# results, `ListTransferLogsResponse` outputs
|
1196
|
+
# a `next_page` token, which can be used as the
|
1197
|
+
# `page_token` value to request the next page of list results.
|
1198
|
+
# @param page_size [Integer]
|
1199
|
+
# Page size. The default page size is the maximum value of 1000 results.
|
1200
|
+
# @param message_types [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>]
|
1201
|
+
# Message types to return. If not populated - INFO, WARNING and ERROR
|
1202
|
+
# messages are returned.
|
1203
|
+
#
|
1204
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1205
|
+
# @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>]
|
1206
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1207
|
+
#
|
1208
|
+
# @return [Gapic::PagedEnumerable<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>]
|
1209
|
+
#
|
1210
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1211
|
+
#
|
1212
|
+
def list_transfer_logs request, options = nil
|
1213
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1214
|
+
|
1215
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest
|
1216
|
+
|
1217
|
+
# Converts hash and nil to an options object
|
1218
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1219
|
+
|
1220
|
+
# Customize the options with defaults
|
1221
|
+
metadata = @config.rpcs.list_transfer_logs.metadata.to_h
|
1222
|
+
|
1223
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1224
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1225
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1226
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1227
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1228
|
+
|
1229
|
+
header_params = {
|
1230
|
+
"parent" => request.parent
|
1231
|
+
}
|
1232
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1233
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1234
|
+
|
1235
|
+
options.apply_defaults timeout: @config.rpcs.list_transfer_logs.timeout,
|
1236
|
+
metadata: metadata,
|
1237
|
+
retry_policy: @config.rpcs.list_transfer_logs.retry_policy
|
1238
|
+
options.apply_defaults metadata: @config.metadata,
|
1239
|
+
retry_policy: @config.retry_policy
|
1240
|
+
|
1241
|
+
@data_transfer_service_stub.call_rpc :list_transfer_logs, request, options: options do |response, operation|
|
1242
|
+
response = Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, request, response, operation, options
|
1243
|
+
yield response, operation if block_given?
|
1244
|
+
return response
|
1245
|
+
end
|
1246
|
+
rescue GRPC::BadStatus => e
|
1247
|
+
raise Google::Cloud::Error.from_error(e)
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
##
|
1251
|
+
# Returns true if valid credentials exist for the given data source and
|
1252
|
+
# requesting user.
|
1253
|
+
# Some data sources doesn't support service account, so we need to talk to
|
1254
|
+
# them on behalf of the end user. This API just checks whether we have OAuth
|
1255
|
+
# token for the particular user, which is a pre-requisite before user can
|
1256
|
+
# create a transfer config.
|
1257
|
+
#
|
1258
|
+
# @overload check_valid_creds(request, options = nil)
|
1259
|
+
# Pass arguments to `check_valid_creds` via a request object, either of type
|
1260
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash.
|
1261
|
+
#
|
1262
|
+
# @param request [Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, Hash]
|
1263
|
+
# A request object representing the call parameters. Required. To specify no
|
1264
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1265
|
+
# @param options [Gapic::CallOptions, Hash]
|
1266
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1267
|
+
#
|
1268
|
+
# @overload check_valid_creds(name: nil)
|
1269
|
+
# Pass arguments to `check_valid_creds` via keyword arguments. Note that at
|
1270
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1271
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1272
|
+
#
|
1273
|
+
# @param name [String]
|
1274
|
+
# Required. The data source in the form:
|
1275
|
+
# `projects/{project_id}/dataSources/{data_source_id}` or
|
1276
|
+
# `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
|
1277
|
+
#
|
1278
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1279
|
+
# @yieldparam response [Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse]
|
1280
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1281
|
+
#
|
1282
|
+
# @return [Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse]
|
1283
|
+
#
|
1284
|
+
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1285
|
+
#
|
1286
|
+
def check_valid_creds request, options = nil
|
1287
|
+
raise ArgumentError, "request must be provided" if request.nil?
|
1288
|
+
|
1289
|
+
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest
|
1290
|
+
|
1291
|
+
# Converts hash and nil to an options object
|
1292
|
+
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1293
|
+
|
1294
|
+
# Customize the options with defaults
|
1295
|
+
metadata = @config.rpcs.check_valid_creds.metadata.to_h
|
1296
|
+
|
1297
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1298
|
+
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1299
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1300
|
+
gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION
|
1301
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1302
|
+
|
1303
|
+
header_params = {
|
1304
|
+
"name" => request.name
|
1305
|
+
}
|
1306
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1307
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1308
|
+
|
1309
|
+
options.apply_defaults timeout: @config.rpcs.check_valid_creds.timeout,
|
1310
|
+
metadata: metadata,
|
1311
|
+
retry_policy: @config.rpcs.check_valid_creds.retry_policy
|
1312
|
+
options.apply_defaults metadata: @config.metadata,
|
1313
|
+
retry_policy: @config.retry_policy
|
1314
|
+
|
1315
|
+
@data_transfer_service_stub.call_rpc :check_valid_creds, request, options: options do |response, operation|
|
1316
|
+
yield response, operation if block_given?
|
1317
|
+
return response
|
1318
|
+
end
|
1319
|
+
rescue GRPC::BadStatus => e
|
1320
|
+
raise Google::Cloud::Error.from_error(e)
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
##
|
1324
|
+
# Configuration class for the DataTransferService API.
|
1325
|
+
#
|
1326
|
+
# This class represents the configuration for DataTransferService,
|
1327
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1328
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1329
|
+
# applied individually to specific RPCs. See
|
1330
|
+
# {Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration::Rpcs}
|
1331
|
+
# for a list of RPCs that can be configured independently.
|
1332
|
+
#
|
1333
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1334
|
+
# on construction.
|
1335
|
+
#
|
1336
|
+
# # Examples
|
1337
|
+
#
|
1338
|
+
# To modify the global config, setting the timeout for get_data_source
|
1339
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1340
|
+
#
|
1341
|
+
# Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config|
|
1342
|
+
# config.timeout = 10_000
|
1343
|
+
# config.rpcs.get_data_source.timeout = 20_000
|
1344
|
+
# end
|
1345
|
+
#
|
1346
|
+
# To apply the above configuration only to a new client:
|
1347
|
+
#
|
1348
|
+
# client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config|
|
1349
|
+
# config.timeout = 10_000
|
1350
|
+
# config.rpcs.get_data_source.timeout = 20_000
|
1351
|
+
# end
|
1352
|
+
#
|
1353
|
+
# @!attribute [rw] endpoint
|
1354
|
+
# The hostname or hostname:port of the service endpoint.
|
1355
|
+
# Defaults to `"bigquerydatatransfer.googleapis.com"`.
|
1356
|
+
# @return [String]
|
1357
|
+
# @!attribute [rw] credentials
|
1358
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1359
|
+
# * (`String`) The path to a service account key file in JSON format
|
1360
|
+
# * (`Hash`) A service account key as a Hash
|
1361
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1362
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1363
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1364
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1365
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1366
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1367
|
+
# * (`nil`) indicating no credentials
|
1368
|
+
# @return [Object]
|
1369
|
+
# @!attribute [rw] scope
|
1370
|
+
# The OAuth scopes
|
1371
|
+
# @return [Array<String>]
|
1372
|
+
# @!attribute [rw] lib_name
|
1373
|
+
# The library name as recorded in instrumentation and logging
|
1374
|
+
# @return [String]
|
1375
|
+
# @!attribute [rw] lib_version
|
1376
|
+
# The library version as recorded in instrumentation and logging
|
1377
|
+
# @return [String]
|
1378
|
+
# @!attribute [rw] channel_args
|
1379
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1380
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1381
|
+
# @return [Hash]
|
1382
|
+
# @!attribute [rw] interceptors
|
1383
|
+
# An array of interceptors that are run before calls are executed.
|
1384
|
+
# @return [Array<GRPC::ClientInterceptor>]
|
1385
|
+
# @!attribute [rw] timeout
|
1386
|
+
# The call timeout in milliseconds.
|
1387
|
+
# @return [Numeric]
|
1388
|
+
# @!attribute [rw] metadata
|
1389
|
+
# Additional gRPC headers to be sent with the call.
|
1390
|
+
# @return [Hash{Symbol=>String}]
|
1391
|
+
# @!attribute [rw] retry_policy
|
1392
|
+
# The retry policy. The value is a hash with the following keys:
|
1393
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1394
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1395
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1396
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1397
|
+
# trigger a retry.
|
1398
|
+
# @return [Hash]
|
1399
|
+
#
|
1400
|
+
class Configuration
|
1401
|
+
extend Gapic::Config
|
1402
|
+
|
1403
|
+
config_attr :endpoint, "bigquerydatatransfer.googleapis.com", String
|
1404
|
+
config_attr :credentials, nil do |value|
|
1405
|
+
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1406
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1407
|
+
allowed.any? { |klass| klass === value }
|
1408
|
+
end
|
1409
|
+
config_attr :scope, nil, String, Array, nil
|
1410
|
+
config_attr :lib_name, nil, String, nil
|
1411
|
+
config_attr :lib_version, nil, String, nil
|
1412
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
1413
|
+
config_attr :interceptors, nil, Array, nil
|
1414
|
+
config_attr :timeout, nil, Numeric, nil
|
1415
|
+
config_attr :metadata, nil, Hash, nil
|
1416
|
+
config_attr :retry_policy, nil, Hash, Proc, nil
|
1417
|
+
|
1418
|
+
# @private
|
1419
|
+
def initialize parent_config = nil
|
1420
|
+
@parent_config = parent_config unless parent_config.nil?
|
1421
|
+
|
1422
|
+
yield self if block_given?
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
##
|
1426
|
+
# Configurations for individual RPCs
|
1427
|
+
# @return [Rpcs]
|
1428
|
+
#
|
1429
|
+
def rpcs
|
1430
|
+
@rpcs ||= begin
|
1431
|
+
parent_rpcs = nil
|
1432
|
+
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
|
1433
|
+
Rpcs.new parent_rpcs
|
1434
|
+
end
|
1435
|
+
end
|
1436
|
+
|
1437
|
+
##
|
1438
|
+
# Configuration RPC class for the DataTransferService API.
|
1439
|
+
#
|
1440
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1441
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1442
|
+
# the following configuration fields:
|
1443
|
+
#
|
1444
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
1445
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1446
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1447
|
+
# include the following keys:
|
1448
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1449
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1450
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1451
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1452
|
+
# trigger a retry.
|
1453
|
+
#
|
1454
|
+
class Rpcs
|
1455
|
+
##
|
1456
|
+
# RPC-specific configuration for `get_data_source`
|
1457
|
+
# @return [Gapic::Config::Method]
|
1458
|
+
#
|
1459
|
+
attr_reader :get_data_source
|
1460
|
+
##
|
1461
|
+
# RPC-specific configuration for `list_data_sources`
|
1462
|
+
# @return [Gapic::Config::Method]
|
1463
|
+
#
|
1464
|
+
attr_reader :list_data_sources
|
1465
|
+
##
|
1466
|
+
# RPC-specific configuration for `create_transfer_config`
|
1467
|
+
# @return [Gapic::Config::Method]
|
1468
|
+
#
|
1469
|
+
attr_reader :create_transfer_config
|
1470
|
+
##
|
1471
|
+
# RPC-specific configuration for `update_transfer_config`
|
1472
|
+
# @return [Gapic::Config::Method]
|
1473
|
+
#
|
1474
|
+
attr_reader :update_transfer_config
|
1475
|
+
##
|
1476
|
+
# RPC-specific configuration for `delete_transfer_config`
|
1477
|
+
# @return [Gapic::Config::Method]
|
1478
|
+
#
|
1479
|
+
attr_reader :delete_transfer_config
|
1480
|
+
##
|
1481
|
+
# RPC-specific configuration for `get_transfer_config`
|
1482
|
+
# @return [Gapic::Config::Method]
|
1483
|
+
#
|
1484
|
+
attr_reader :get_transfer_config
|
1485
|
+
##
|
1486
|
+
# RPC-specific configuration for `list_transfer_configs`
|
1487
|
+
# @return [Gapic::Config::Method]
|
1488
|
+
#
|
1489
|
+
attr_reader :list_transfer_configs
|
1490
|
+
##
|
1491
|
+
# RPC-specific configuration for `schedule_transfer_runs`
|
1492
|
+
# @return [Gapic::Config::Method]
|
1493
|
+
#
|
1494
|
+
attr_reader :schedule_transfer_runs
|
1495
|
+
##
|
1496
|
+
# RPC-specific configuration for `start_manual_transfer_runs`
|
1497
|
+
# @return [Gapic::Config::Method]
|
1498
|
+
#
|
1499
|
+
attr_reader :start_manual_transfer_runs
|
1500
|
+
##
|
1501
|
+
# RPC-specific configuration for `get_transfer_run`
|
1502
|
+
# @return [Gapic::Config::Method]
|
1503
|
+
#
|
1504
|
+
attr_reader :get_transfer_run
|
1505
|
+
##
|
1506
|
+
# RPC-specific configuration for `delete_transfer_run`
|
1507
|
+
# @return [Gapic::Config::Method]
|
1508
|
+
#
|
1509
|
+
attr_reader :delete_transfer_run
|
1510
|
+
##
|
1511
|
+
# RPC-specific configuration for `list_transfer_runs`
|
1512
|
+
# @return [Gapic::Config::Method]
|
1513
|
+
#
|
1514
|
+
attr_reader :list_transfer_runs
|
1515
|
+
##
|
1516
|
+
# RPC-specific configuration for `list_transfer_logs`
|
1517
|
+
# @return [Gapic::Config::Method]
|
1518
|
+
#
|
1519
|
+
attr_reader :list_transfer_logs
|
1520
|
+
##
|
1521
|
+
# RPC-specific configuration for `check_valid_creds`
|
1522
|
+
# @return [Gapic::Config::Method]
|
1523
|
+
#
|
1524
|
+
attr_reader :check_valid_creds
|
1525
|
+
|
1526
|
+
# @private
|
1527
|
+
def initialize parent_rpcs = nil
|
1528
|
+
get_data_source_config = parent_rpcs&.get_data_source if parent_rpcs&.respond_to? :get_data_source
|
1529
|
+
@get_data_source = Gapic::Config::Method.new get_data_source_config
|
1530
|
+
list_data_sources_config = parent_rpcs&.list_data_sources if parent_rpcs&.respond_to? :list_data_sources
|
1531
|
+
@list_data_sources = Gapic::Config::Method.new list_data_sources_config
|
1532
|
+
create_transfer_config_config = parent_rpcs&.create_transfer_config if parent_rpcs&.respond_to? :create_transfer_config
|
1533
|
+
@create_transfer_config = Gapic::Config::Method.new create_transfer_config_config
|
1534
|
+
update_transfer_config_config = parent_rpcs&.update_transfer_config if parent_rpcs&.respond_to? :update_transfer_config
|
1535
|
+
@update_transfer_config = Gapic::Config::Method.new update_transfer_config_config
|
1536
|
+
delete_transfer_config_config = parent_rpcs&.delete_transfer_config if parent_rpcs&.respond_to? :delete_transfer_config
|
1537
|
+
@delete_transfer_config = Gapic::Config::Method.new delete_transfer_config_config
|
1538
|
+
get_transfer_config_config = parent_rpcs&.get_transfer_config if parent_rpcs&.respond_to? :get_transfer_config
|
1539
|
+
@get_transfer_config = Gapic::Config::Method.new get_transfer_config_config
|
1540
|
+
list_transfer_configs_config = parent_rpcs&.list_transfer_configs if parent_rpcs&.respond_to? :list_transfer_configs
|
1541
|
+
@list_transfer_configs = Gapic::Config::Method.new list_transfer_configs_config
|
1542
|
+
schedule_transfer_runs_config = parent_rpcs&.schedule_transfer_runs if parent_rpcs&.respond_to? :schedule_transfer_runs
|
1543
|
+
@schedule_transfer_runs = Gapic::Config::Method.new schedule_transfer_runs_config
|
1544
|
+
start_manual_transfer_runs_config = parent_rpcs&.start_manual_transfer_runs if parent_rpcs&.respond_to? :start_manual_transfer_runs
|
1545
|
+
@start_manual_transfer_runs = Gapic::Config::Method.new start_manual_transfer_runs_config
|
1546
|
+
get_transfer_run_config = parent_rpcs&.get_transfer_run if parent_rpcs&.respond_to? :get_transfer_run
|
1547
|
+
@get_transfer_run = Gapic::Config::Method.new get_transfer_run_config
|
1548
|
+
delete_transfer_run_config = parent_rpcs&.delete_transfer_run if parent_rpcs&.respond_to? :delete_transfer_run
|
1549
|
+
@delete_transfer_run = Gapic::Config::Method.new delete_transfer_run_config
|
1550
|
+
list_transfer_runs_config = parent_rpcs&.list_transfer_runs if parent_rpcs&.respond_to? :list_transfer_runs
|
1551
|
+
@list_transfer_runs = Gapic::Config::Method.new list_transfer_runs_config
|
1552
|
+
list_transfer_logs_config = parent_rpcs&.list_transfer_logs if parent_rpcs&.respond_to? :list_transfer_logs
|
1553
|
+
@list_transfer_logs = Gapic::Config::Method.new list_transfer_logs_config
|
1554
|
+
check_valid_creds_config = parent_rpcs&.check_valid_creds if parent_rpcs&.respond_to? :check_valid_creds
|
1555
|
+
@check_valid_creds = Gapic::Config::Method.new check_valid_creds_config
|
1556
|
+
|
1557
|
+
yield self if block_given?
|
1558
|
+
end
|
1559
|
+
end
|
1560
|
+
end
|
1561
|
+
end
|
1562
|
+
end
|
1563
|
+
end
|
1564
|
+
end
|
1565
|
+
end
|
1566
|
+
end
|
1567
|
+
end
|