google-cloud-dataproc-v1 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +120 -120
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/paths.rb +10 -10
- data/lib/google/cloud/dataproc/v1/cluster_controller.rb +1 -1
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +170 -170
- data/lib/google/cloud/dataproc/v1/cluster_controller/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +100 -100
- data/lib/google/cloud/dataproc/v1/job_controller.rb +1 -1
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +177 -177
- data/lib/google/cloud/dataproc/v1/job_controller/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +100 -100
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +170 -170
- data/lib/google/cloud/dataproc/v1/workflow_template_service/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +100 -100
- data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +10 -10
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +45 -45
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +186 -186
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +223 -223
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +20 -20
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +143 -143
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- metadata +2 -2
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V1
|
25
25
|
module AutoscalingPolicyService
|
26
26
|
# Credentials for the AutoscalingPolicyService API.
|
27
|
-
class Credentials < Google::Auth::Credentials
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-platform"
|
30
30
|
]
|
@@ -45,25 +45,25 @@ module Google
|
|
45
45
|
# @param region [String]
|
46
46
|
# @param autoscaling_policy [String]
|
47
47
|
#
|
48
|
-
# @return [String]
|
48
|
+
# @return [::String]
|
49
49
|
def autoscaling_policy_path **args
|
50
50
|
resources = {
|
51
51
|
"autoscaling_policy:location:project" => (proc do |project:, location:, autoscaling_policy:|
|
52
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
-
raise ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
54
54
|
|
55
55
|
"projects/#{project}/locations/#{location}/autoscalingPolicies/#{autoscaling_policy}"
|
56
56
|
end),
|
57
57
|
"autoscaling_policy:project:region" => (proc do |project:, region:, autoscaling_policy:|
|
58
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
-
raise ArgumentError, "region cannot contain /" if region.to_s.include? "/"
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
|
60
60
|
|
61
61
|
"projects/#{project}/regions/#{region}/autoscalingPolicies/#{autoscaling_policy}"
|
62
62
|
end)
|
63
63
|
}
|
64
64
|
|
65
65
|
resource = resources[args.keys.sort.join(":")]
|
66
|
-
raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
66
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
67
67
|
resource.call(**args)
|
68
68
|
end
|
69
69
|
|
@@ -77,9 +77,9 @@ module Google
|
|
77
77
|
# @param project [String]
|
78
78
|
# @param location [String]
|
79
79
|
#
|
80
|
-
# @return [String]
|
80
|
+
# @return [::String]
|
81
81
|
def location_path project:, location:
|
82
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
82
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
83
83
|
|
84
84
|
"projects/#{project}/locations/#{location}"
|
85
85
|
end
|
@@ -94,9 +94,9 @@ module Google
|
|
94
94
|
# @param project [String]
|
95
95
|
# @param region [String]
|
96
96
|
#
|
97
|
-
# @return [String]
|
97
|
+
# @return [::String]
|
98
98
|
def region_path project:, region:
|
99
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
99
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
100
100
|
|
101
101
|
"projects/#{project}/regions/#{region}"
|
102
102
|
end
|
@@ -37,7 +37,7 @@ module Google
|
|
37
37
|
# To load this service and instantiate a client:
|
38
38
|
#
|
39
39
|
# require "google/cloud/dataproc/v1/cluster_controller"
|
40
|
-
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
40
|
+
# client = ::Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
41
41
|
#
|
42
42
|
module ClusterController
|
43
43
|
end
|
@@ -37,15 +37,15 @@ module Google
|
|
37
37
|
##
|
38
38
|
# Configure the ClusterController Client class.
|
39
39
|
#
|
40
|
-
# See {Google::Cloud::Dataproc::V1::ClusterController::Client::Configuration}
|
40
|
+
# See {::Google::Cloud::Dataproc::V1::ClusterController::Client::Configuration}
|
41
41
|
# for a description of the configuration fields.
|
42
42
|
#
|
43
43
|
# ## Example
|
44
44
|
#
|
45
45
|
# To modify the configuration for all ClusterController clients:
|
46
46
|
#
|
47
|
-
# Google::Cloud::Dataproc::V1::ClusterController::Client.configure do |config|
|
48
|
-
# config.timeout =
|
47
|
+
# ::Google::Cloud::Dataproc::V1::ClusterController::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
49
|
# end
|
50
50
|
#
|
51
51
|
# @yield [config] Configure the Client client.
|
@@ -125,7 +125,7 @@ module Google
|
|
125
125
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
126
126
|
# should be made on {Client.configure}.
|
127
127
|
#
|
128
|
-
# See {Google::Cloud::Dataproc::V1::ClusterController::Client::Configuration}
|
128
|
+
# See {::Google::Cloud::Dataproc::V1::ClusterController::Client::Configuration}
|
129
129
|
# for a description of the configuration fields.
|
130
130
|
#
|
131
131
|
# @yield [config] Configure the Client client.
|
@@ -146,13 +146,13 @@ module Google
|
|
146
146
|
# To create a new ClusterController client with the default
|
147
147
|
# configuration:
|
148
148
|
#
|
149
|
-
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
149
|
+
# client = ::Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
150
150
|
#
|
151
151
|
# To create a new ClusterController client with a custom
|
152
152
|
# configuration:
|
153
153
|
#
|
154
|
-
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new do |config|
|
155
|
-
# config.timeout =
|
154
|
+
# client = ::Google::Cloud::Dataproc::V1::ClusterController::Client.new do |config|
|
155
|
+
# config.timeout = 10.0
|
156
156
|
# end
|
157
157
|
#
|
158
158
|
# @yield [config] Configure the ClusterController client.
|
@@ -184,8 +184,8 @@ module Google
|
|
184
184
|
config.endpoint = @config.endpoint
|
185
185
|
end
|
186
186
|
|
187
|
-
@cluster_controller_stub = Gapic::ServiceStub.new(
|
188
|
-
Google::Cloud::Dataproc::V1::ClusterController::Stub,
|
187
|
+
@cluster_controller_stub = ::Gapic::ServiceStub.new(
|
188
|
+
::Google::Cloud::Dataproc::V1::ClusterController::Stub,
|
189
189
|
credentials: credentials,
|
190
190
|
endpoint: @config.endpoint,
|
191
191
|
channel_args: @config.channel_args,
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
##
|
197
197
|
# Get the associated client for long-running operations.
|
198
198
|
#
|
199
|
-
# @return [Google::Cloud::Dataproc::V1::ClusterController::Operations]
|
199
|
+
# @return [::Google::Cloud::Dataproc::V1::ClusterController::Operations]
|
200
200
|
#
|
201
201
|
attr_reader :operations_client
|
202
202
|
|
@@ -204,17 +204,17 @@ module Google
|
|
204
204
|
|
205
205
|
##
|
206
206
|
# Creates a cluster in a project. The returned
|
207
|
-
# {Google::Longrunning::Operation#metadata Operation.metadata} will be
|
207
|
+
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
208
208
|
# [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
|
209
209
|
#
|
210
210
|
# @overload create_cluster(request, options = nil)
|
211
211
|
# Pass arguments to `create_cluster` via a request object, either of type
|
212
|
-
# {Google::Cloud::Dataproc::V1::CreateClusterRequest} or an equivalent Hash.
|
212
|
+
# {::Google::Cloud::Dataproc::V1::CreateClusterRequest} or an equivalent Hash.
|
213
213
|
#
|
214
|
-
# @param request [Google::Cloud::Dataproc::V1::CreateClusterRequest, Hash]
|
214
|
+
# @param request [::Google::Cloud::Dataproc::V1::CreateClusterRequest, ::Hash]
|
215
215
|
# A request object representing the call parameters. Required. To specify no
|
216
216
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
217
|
-
# @param options [Gapic::CallOptions, Hash]
|
217
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
218
218
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
219
219
|
#
|
220
220
|
# @overload create_cluster(project_id: nil, region: nil, cluster: nil, request_id: nil)
|
@@ -222,18 +222,18 @@ module Google
|
|
222
222
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
223
223
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
224
224
|
#
|
225
|
-
# @param project_id [String]
|
225
|
+
# @param project_id [::String]
|
226
226
|
# Required. The ID of the Google Cloud Platform project that the cluster
|
227
227
|
# belongs to.
|
228
|
-
# @param region [String]
|
228
|
+
# @param region [::String]
|
229
229
|
# Required. The Dataproc region in which to handle the request.
|
230
|
-
# @param cluster [Google::Cloud::Dataproc::V1::Cluster, Hash]
|
230
|
+
# @param cluster [::Google::Cloud::Dataproc::V1::Cluster, ::Hash]
|
231
231
|
# Required. The cluster to create.
|
232
|
-
# @param request_id [String]
|
232
|
+
# @param request_id [::String]
|
233
233
|
# Optional. A unique id used to identify the request. If the server
|
234
|
-
# receives two {Google::Cloud::Dataproc::V1::CreateClusterRequest CreateClusterRequest} requests with the same
|
234
|
+
# receives two {::Google::Cloud::Dataproc::V1::CreateClusterRequest CreateClusterRequest} requests with the same
|
235
235
|
# id, then the second request will be ignored and the
|
236
|
-
# first {Google::Longrunning::Operation google.longrunning.Operation} created and stored in the backend
|
236
|
+
# first {::Google::Longrunning::Operation google.longrunning.Operation} created and stored in the backend
|
237
237
|
# is returned.
|
238
238
|
#
|
239
239
|
# It is recommended to always set this value to a
|
@@ -243,26 +243,26 @@ module Google
|
|
243
243
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
244
244
|
#
|
245
245
|
# @yield [response, operation] Access the result along with the RPC operation
|
246
|
-
# @yieldparam response [Gapic::Operation]
|
247
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
246
|
+
# @yieldparam response [::Gapic::Operation]
|
247
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
248
248
|
#
|
249
|
-
# @return [Gapic::Operation]
|
249
|
+
# @return [::Gapic::Operation]
|
250
250
|
#
|
251
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
251
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
252
252
|
#
|
253
253
|
def create_cluster request, options = nil
|
254
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
254
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
255
255
|
|
256
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::CreateClusterRequest
|
256
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::CreateClusterRequest
|
257
257
|
|
258
258
|
# Converts hash and nil to an options object
|
259
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
259
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
260
260
|
|
261
261
|
# Customize the options with defaults
|
262
262
|
metadata = @config.rpcs.create_cluster.metadata.to_h
|
263
263
|
|
264
264
|
# Set x-goog-api-client and x-goog-user-project headers
|
265
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
265
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
266
266
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
267
267
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
268
268
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -281,27 +281,27 @@ module Google
|
|
281
281
|
retry_policy: @config.retry_policy
|
282
282
|
|
283
283
|
@cluster_controller_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
284
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
284
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
285
285
|
yield response, operation if block_given?
|
286
286
|
return response
|
287
287
|
end
|
288
|
-
rescue GRPC::BadStatus => e
|
289
|
-
raise Google::Cloud::Error.from_error(e)
|
288
|
+
rescue ::GRPC::BadStatus => e
|
289
|
+
raise ::Google::Cloud::Error.from_error(e)
|
290
290
|
end
|
291
291
|
|
292
292
|
##
|
293
293
|
# Updates a cluster in a project. The returned
|
294
|
-
# {Google::Longrunning::Operation#metadata Operation.metadata} will be
|
294
|
+
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
295
295
|
# [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
|
296
296
|
#
|
297
297
|
# @overload update_cluster(request, options = nil)
|
298
298
|
# Pass arguments to `update_cluster` via a request object, either of type
|
299
|
-
# {Google::Cloud::Dataproc::V1::UpdateClusterRequest} or an equivalent Hash.
|
299
|
+
# {::Google::Cloud::Dataproc::V1::UpdateClusterRequest} or an equivalent Hash.
|
300
300
|
#
|
301
|
-
# @param request [Google::Cloud::Dataproc::V1::UpdateClusterRequest, Hash]
|
301
|
+
# @param request [::Google::Cloud::Dataproc::V1::UpdateClusterRequest, ::Hash]
|
302
302
|
# A request object representing the call parameters. Required. To specify no
|
303
303
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
304
|
-
# @param options [Gapic::CallOptions, Hash]
|
304
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
305
305
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
306
306
|
#
|
307
307
|
# @overload update_cluster(project_id: nil, region: nil, cluster_name: nil, cluster: nil, graceful_decommission_timeout: nil, update_mask: nil, request_id: nil)
|
@@ -309,16 +309,16 @@ module Google
|
|
309
309
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
310
310
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
311
311
|
#
|
312
|
-
# @param project_id [String]
|
312
|
+
# @param project_id [::String]
|
313
313
|
# Required. The ID of the Google Cloud Platform project the
|
314
314
|
# cluster belongs to.
|
315
|
-
# @param region [String]
|
315
|
+
# @param region [::String]
|
316
316
|
# Required. The Dataproc region in which to handle the request.
|
317
|
-
# @param cluster_name [String]
|
317
|
+
# @param cluster_name [::String]
|
318
318
|
# Required. The cluster name.
|
319
|
-
# @param cluster [Google::Cloud::Dataproc::V1::Cluster, Hash]
|
319
|
+
# @param cluster [::Google::Cloud::Dataproc::V1::Cluster, ::Hash]
|
320
320
|
# Required. The changes to the cluster.
|
321
|
-
# @param graceful_decommission_timeout [Google::Protobuf::Duration, Hash]
|
321
|
+
# @param graceful_decommission_timeout [::Google::Protobuf::Duration, ::Hash]
|
322
322
|
# Optional. Timeout for graceful YARN decomissioning. Graceful
|
323
323
|
# decommissioning allows removing nodes from the cluster without
|
324
324
|
# interrupting jobs in progress. Timeout specifies how long to wait for jobs
|
@@ -328,7 +328,7 @@ module Google
|
|
328
328
|
# [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
|
329
329
|
#
|
330
330
|
# Only supported on Dataproc image versions 1.2 and higher.
|
331
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
331
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
332
332
|
# Required. Specifies the path, relative to `Cluster`, of
|
333
333
|
# the field to update. For example, to change the number of workers
|
334
334
|
# in a cluster to 5, the `update_mask` parameter would be
|
@@ -380,11 +380,11 @@ module Google
|
|
380
380
|
# </tr>
|
381
381
|
# </tbody>
|
382
382
|
# </table>
|
383
|
-
# @param request_id [String]
|
383
|
+
# @param request_id [::String]
|
384
384
|
# Optional. A unique id used to identify the request. If the server
|
385
|
-
# receives two {Google::Cloud::Dataproc::V1::UpdateClusterRequest UpdateClusterRequest} requests with the same
|
385
|
+
# receives two {::Google::Cloud::Dataproc::V1::UpdateClusterRequest UpdateClusterRequest} requests with the same
|
386
386
|
# id, then the second request will be ignored and the
|
387
|
-
# first {Google::Longrunning::Operation google.longrunning.Operation} created and stored in the
|
387
|
+
# first {::Google::Longrunning::Operation google.longrunning.Operation} created and stored in the
|
388
388
|
# backend is returned.
|
389
389
|
#
|
390
390
|
# It is recommended to always set this value to a
|
@@ -394,26 +394,26 @@ module Google
|
|
394
394
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
395
395
|
#
|
396
396
|
# @yield [response, operation] Access the result along with the RPC operation
|
397
|
-
# @yieldparam response [Gapic::Operation]
|
398
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
397
|
+
# @yieldparam response [::Gapic::Operation]
|
398
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
399
399
|
#
|
400
|
-
# @return [Gapic::Operation]
|
400
|
+
# @return [::Gapic::Operation]
|
401
401
|
#
|
402
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
402
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
403
403
|
#
|
404
404
|
def update_cluster request, options = nil
|
405
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
405
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
406
406
|
|
407
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::UpdateClusterRequest
|
407
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::UpdateClusterRequest
|
408
408
|
|
409
409
|
# Converts hash and nil to an options object
|
410
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
410
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
411
411
|
|
412
412
|
# Customize the options with defaults
|
413
413
|
metadata = @config.rpcs.update_cluster.metadata.to_h
|
414
414
|
|
415
415
|
# Set x-goog-api-client and x-goog-user-project headers
|
416
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
416
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
417
417
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
418
418
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
419
419
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -433,27 +433,27 @@ module Google
|
|
433
433
|
retry_policy: @config.retry_policy
|
434
434
|
|
435
435
|
@cluster_controller_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
436
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
436
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
437
437
|
yield response, operation if block_given?
|
438
438
|
return response
|
439
439
|
end
|
440
|
-
rescue GRPC::BadStatus => e
|
441
|
-
raise Google::Cloud::Error.from_error(e)
|
440
|
+
rescue ::GRPC::BadStatus => e
|
441
|
+
raise ::Google::Cloud::Error.from_error(e)
|
442
442
|
end
|
443
443
|
|
444
444
|
##
|
445
445
|
# Deletes a cluster in a project. The returned
|
446
|
-
# {Google::Longrunning::Operation#metadata Operation.metadata} will be
|
446
|
+
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
447
447
|
# [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
|
448
448
|
#
|
449
449
|
# @overload delete_cluster(request, options = nil)
|
450
450
|
# Pass arguments to `delete_cluster` via a request object, either of type
|
451
|
-
# {Google::Cloud::Dataproc::V1::DeleteClusterRequest} or an equivalent Hash.
|
451
|
+
# {::Google::Cloud::Dataproc::V1::DeleteClusterRequest} or an equivalent Hash.
|
452
452
|
#
|
453
|
-
# @param request [Google::Cloud::Dataproc::V1::DeleteClusterRequest, Hash]
|
453
|
+
# @param request [::Google::Cloud::Dataproc::V1::DeleteClusterRequest, ::Hash]
|
454
454
|
# A request object representing the call parameters. Required. To specify no
|
455
455
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
456
|
-
# @param options [Gapic::CallOptions, Hash]
|
456
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
457
457
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
458
458
|
#
|
459
459
|
# @overload delete_cluster(project_id: nil, region: nil, cluster_name: nil, cluster_uuid: nil, request_id: nil)
|
@@ -461,21 +461,21 @@ module Google
|
|
461
461
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
462
462
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
463
463
|
#
|
464
|
-
# @param project_id [String]
|
464
|
+
# @param project_id [::String]
|
465
465
|
# Required. The ID of the Google Cloud Platform project that the cluster
|
466
466
|
# belongs to.
|
467
|
-
# @param region [String]
|
467
|
+
# @param region [::String]
|
468
468
|
# Required. The Dataproc region in which to handle the request.
|
469
|
-
# @param cluster_name [String]
|
469
|
+
# @param cluster_name [::String]
|
470
470
|
# Required. The cluster name.
|
471
|
-
# @param cluster_uuid [String]
|
471
|
+
# @param cluster_uuid [::String]
|
472
472
|
# Optional. Specifying the `cluster_uuid` means the RPC should fail
|
473
473
|
# (with error NOT_FOUND) if cluster with specified UUID does not exist.
|
474
|
-
# @param request_id [String]
|
474
|
+
# @param request_id [::String]
|
475
475
|
# Optional. A unique id used to identify the request. If the server
|
476
|
-
# receives two {Google::Cloud::Dataproc::V1::DeleteClusterRequest DeleteClusterRequest} requests with the same
|
476
|
+
# receives two {::Google::Cloud::Dataproc::V1::DeleteClusterRequest DeleteClusterRequest} requests with the same
|
477
477
|
# id, then the second request will be ignored and the
|
478
|
-
# first {Google::Longrunning::Operation google.longrunning.Operation} created and stored in the
|
478
|
+
# first {::Google::Longrunning::Operation google.longrunning.Operation} created and stored in the
|
479
479
|
# backend is returned.
|
480
480
|
#
|
481
481
|
# It is recommended to always set this value to a
|
@@ -485,26 +485,26 @@ module Google
|
|
485
485
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
486
486
|
#
|
487
487
|
# @yield [response, operation] Access the result along with the RPC operation
|
488
|
-
# @yieldparam response [Gapic::Operation]
|
489
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
488
|
+
# @yieldparam response [::Gapic::Operation]
|
489
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
490
490
|
#
|
491
|
-
# @return [Gapic::Operation]
|
491
|
+
# @return [::Gapic::Operation]
|
492
492
|
#
|
493
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
493
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
494
494
|
#
|
495
495
|
def delete_cluster request, options = nil
|
496
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
496
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
497
497
|
|
498
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::DeleteClusterRequest
|
498
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::DeleteClusterRequest
|
499
499
|
|
500
500
|
# Converts hash and nil to an options object
|
501
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
501
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
502
502
|
|
503
503
|
# Customize the options with defaults
|
504
504
|
metadata = @config.rpcs.delete_cluster.metadata.to_h
|
505
505
|
|
506
506
|
# Set x-goog-api-client and x-goog-user-project headers
|
507
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
507
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
508
508
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
509
509
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
510
510
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -524,12 +524,12 @@ module Google
|
|
524
524
|
retry_policy: @config.retry_policy
|
525
525
|
|
526
526
|
@cluster_controller_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
527
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
527
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
528
528
|
yield response, operation if block_given?
|
529
529
|
return response
|
530
530
|
end
|
531
|
-
rescue GRPC::BadStatus => e
|
532
|
-
raise Google::Cloud::Error.from_error(e)
|
531
|
+
rescue ::GRPC::BadStatus => e
|
532
|
+
raise ::Google::Cloud::Error.from_error(e)
|
533
533
|
end
|
534
534
|
|
535
535
|
##
|
@@ -537,12 +537,12 @@ module Google
|
|
537
537
|
#
|
538
538
|
# @overload get_cluster(request, options = nil)
|
539
539
|
# Pass arguments to `get_cluster` via a request object, either of type
|
540
|
-
# {Google::Cloud::Dataproc::V1::GetClusterRequest} or an equivalent Hash.
|
540
|
+
# {::Google::Cloud::Dataproc::V1::GetClusterRequest} or an equivalent Hash.
|
541
541
|
#
|
542
|
-
# @param request [Google::Cloud::Dataproc::V1::GetClusterRequest, Hash]
|
542
|
+
# @param request [::Google::Cloud::Dataproc::V1::GetClusterRequest, ::Hash]
|
543
543
|
# A request object representing the call parameters. Required. To specify no
|
544
544
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
545
|
-
# @param options [Gapic::CallOptions, Hash]
|
545
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
546
546
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
547
547
|
#
|
548
548
|
# @overload get_cluster(project_id: nil, region: nil, cluster_name: nil)
|
@@ -550,35 +550,35 @@ module Google
|
|
550
550
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
551
551
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
552
552
|
#
|
553
|
-
# @param project_id [String]
|
553
|
+
# @param project_id [::String]
|
554
554
|
# Required. The ID of the Google Cloud Platform project that the cluster
|
555
555
|
# belongs to.
|
556
|
-
# @param region [String]
|
556
|
+
# @param region [::String]
|
557
557
|
# Required. The Dataproc region in which to handle the request.
|
558
|
-
# @param cluster_name [String]
|
558
|
+
# @param cluster_name [::String]
|
559
559
|
# Required. The cluster name.
|
560
560
|
#
|
561
561
|
# @yield [response, operation] Access the result along with the RPC operation
|
562
|
-
# @yieldparam response [Google::Cloud::Dataproc::V1::Cluster]
|
563
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
562
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1::Cluster]
|
563
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
564
564
|
#
|
565
|
-
# @return [Google::Cloud::Dataproc::V1::Cluster]
|
565
|
+
# @return [::Google::Cloud::Dataproc::V1::Cluster]
|
566
566
|
#
|
567
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
567
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
568
568
|
#
|
569
569
|
def get_cluster request, options = nil
|
570
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
570
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
571
571
|
|
572
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::GetClusterRequest
|
572
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::GetClusterRequest
|
573
573
|
|
574
574
|
# Converts hash and nil to an options object
|
575
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
575
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
576
576
|
|
577
577
|
# Customize the options with defaults
|
578
578
|
metadata = @config.rpcs.get_cluster.metadata.to_h
|
579
579
|
|
580
580
|
# Set x-goog-api-client and x-goog-user-project headers
|
581
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
581
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
582
582
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
583
583
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
584
584
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -601,8 +601,8 @@ module Google
|
|
601
601
|
yield response, operation if block_given?
|
602
602
|
return response
|
603
603
|
end
|
604
|
-
rescue GRPC::BadStatus => e
|
605
|
-
raise Google::Cloud::Error.from_error(e)
|
604
|
+
rescue ::GRPC::BadStatus => e
|
605
|
+
raise ::Google::Cloud::Error.from_error(e)
|
606
606
|
end
|
607
607
|
|
608
608
|
##
|
@@ -610,12 +610,12 @@ module Google
|
|
610
610
|
#
|
611
611
|
# @overload list_clusters(request, options = nil)
|
612
612
|
# Pass arguments to `list_clusters` via a request object, either of type
|
613
|
-
# {Google::Cloud::Dataproc::V1::ListClustersRequest} or an equivalent Hash.
|
613
|
+
# {::Google::Cloud::Dataproc::V1::ListClustersRequest} or an equivalent Hash.
|
614
614
|
#
|
615
|
-
# @param request [Google::Cloud::Dataproc::V1::ListClustersRequest, Hash]
|
615
|
+
# @param request [::Google::Cloud::Dataproc::V1::ListClustersRequest, ::Hash]
|
616
616
|
# A request object representing the call parameters. Required. To specify no
|
617
617
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
618
|
-
# @param options [Gapic::CallOptions, Hash]
|
618
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
619
619
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
620
620
|
#
|
621
621
|
# @overload list_clusters(project_id: nil, region: nil, filter: nil, page_size: nil, page_token: nil)
|
@@ -623,12 +623,12 @@ module Google
|
|
623
623
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
624
624
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
625
625
|
#
|
626
|
-
# @param project_id [String]
|
626
|
+
# @param project_id [::String]
|
627
627
|
# Required. The ID of the Google Cloud Platform project that the cluster
|
628
628
|
# belongs to.
|
629
|
-
# @param region [String]
|
629
|
+
# @param region [::String]
|
630
630
|
# Required. The Dataproc region in which to handle the request.
|
631
|
-
# @param filter [String]
|
631
|
+
# @param filter [::String]
|
632
632
|
# Optional. A filter constraining the clusters to list. Filters are
|
633
633
|
# case-sensitive and have the following syntax:
|
634
634
|
#
|
@@ -648,32 +648,32 @@ module Google
|
|
648
648
|
#
|
649
649
|
# status.state = ACTIVE AND clusterName = mycluster
|
650
650
|
# AND labels.env = staging AND labels.starred = *
|
651
|
-
# @param page_size [Integer]
|
651
|
+
# @param page_size [::Integer]
|
652
652
|
# Optional. The standard List page size.
|
653
|
-
# @param page_token [String]
|
653
|
+
# @param page_token [::String]
|
654
654
|
# Optional. The standard List page token.
|
655
655
|
#
|
656
656
|
# @yield [response, operation] Access the result along with the RPC operation
|
657
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
658
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
657
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1::Cluster>]
|
658
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
659
659
|
#
|
660
|
-
# @return [Gapic::PagedEnumerable
|
660
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1::Cluster>]
|
661
661
|
#
|
662
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
662
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
663
663
|
#
|
664
664
|
def list_clusters request, options = nil
|
665
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
665
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
666
666
|
|
667
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::ListClustersRequest
|
667
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::ListClustersRequest
|
668
668
|
|
669
669
|
# Converts hash and nil to an options object
|
670
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
670
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
671
671
|
|
672
672
|
# Customize the options with defaults
|
673
673
|
metadata = @config.rpcs.list_clusters.metadata.to_h
|
674
674
|
|
675
675
|
# Set x-goog-api-client and x-goog-user-project headers
|
676
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
676
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
677
677
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
678
678
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
679
679
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -692,31 +692,31 @@ module Google
|
|
692
692
|
retry_policy: @config.retry_policy
|
693
693
|
|
694
694
|
@cluster_controller_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
695
|
-
response = Gapic::PagedEnumerable.new @cluster_controller_stub, :list_clusters, request, response, operation, options
|
695
|
+
response = ::Gapic::PagedEnumerable.new @cluster_controller_stub, :list_clusters, request, response, operation, options
|
696
696
|
yield response, operation if block_given?
|
697
697
|
return response
|
698
698
|
end
|
699
|
-
rescue GRPC::BadStatus => e
|
700
|
-
raise Google::Cloud::Error.from_error(e)
|
699
|
+
rescue ::GRPC::BadStatus => e
|
700
|
+
raise ::Google::Cloud::Error.from_error(e)
|
701
701
|
end
|
702
702
|
|
703
703
|
##
|
704
704
|
# Gets cluster diagnostic information. The returned
|
705
|
-
# {Google::Longrunning::Operation#metadata Operation.metadata} will be
|
705
|
+
# {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
706
706
|
# [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
|
707
707
|
# After the operation completes,
|
708
|
-
# {Google::Longrunning::Operation#response Operation.response}
|
708
|
+
# {::Google::Longrunning::Operation#response Operation.response}
|
709
709
|
# contains
|
710
710
|
# [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
|
711
711
|
#
|
712
712
|
# @overload diagnose_cluster(request, options = nil)
|
713
713
|
# Pass arguments to `diagnose_cluster` via a request object, either of type
|
714
|
-
# {Google::Cloud::Dataproc::V1::DiagnoseClusterRequest} or an equivalent Hash.
|
714
|
+
# {::Google::Cloud::Dataproc::V1::DiagnoseClusterRequest} or an equivalent Hash.
|
715
715
|
#
|
716
|
-
# @param request [Google::Cloud::Dataproc::V1::DiagnoseClusterRequest, Hash]
|
716
|
+
# @param request [::Google::Cloud::Dataproc::V1::DiagnoseClusterRequest, ::Hash]
|
717
717
|
# A request object representing the call parameters. Required. To specify no
|
718
718
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
719
|
-
# @param options [Gapic::CallOptions, Hash]
|
719
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
720
720
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
721
721
|
#
|
722
722
|
# @overload diagnose_cluster(project_id: nil, region: nil, cluster_name: nil)
|
@@ -724,35 +724,35 @@ module Google
|
|
724
724
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
725
725
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
726
726
|
#
|
727
|
-
# @param project_id [String]
|
727
|
+
# @param project_id [::String]
|
728
728
|
# Required. The ID of the Google Cloud Platform project that the cluster
|
729
729
|
# belongs to.
|
730
|
-
# @param region [String]
|
730
|
+
# @param region [::String]
|
731
731
|
# Required. The Dataproc region in which to handle the request.
|
732
|
-
# @param cluster_name [String]
|
732
|
+
# @param cluster_name [::String]
|
733
733
|
# Required. The cluster name.
|
734
734
|
#
|
735
735
|
# @yield [response, operation] Access the result along with the RPC operation
|
736
|
-
# @yieldparam response [Gapic::Operation]
|
737
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
736
|
+
# @yieldparam response [::Gapic::Operation]
|
737
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
738
738
|
#
|
739
|
-
# @return [Gapic::Operation]
|
739
|
+
# @return [::Gapic::Operation]
|
740
740
|
#
|
741
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
741
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
742
742
|
#
|
743
743
|
def diagnose_cluster request, options = nil
|
744
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
744
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
745
745
|
|
746
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::DiagnoseClusterRequest
|
746
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::DiagnoseClusterRequest
|
747
747
|
|
748
748
|
# Converts hash and nil to an options object
|
749
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
749
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
750
750
|
|
751
751
|
# Customize the options with defaults
|
752
752
|
metadata = @config.rpcs.diagnose_cluster.metadata.to_h
|
753
753
|
|
754
754
|
# Set x-goog-api-client and x-goog-user-project headers
|
755
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
755
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
756
756
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
757
757
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
758
758
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -772,12 +772,12 @@ module Google
|
|
772
772
|
retry_policy: @config.retry_policy
|
773
773
|
|
774
774
|
@cluster_controller_stub.call_rpc :diagnose_cluster, request, options: options do |response, operation|
|
775
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
775
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
776
776
|
yield response, operation if block_given?
|
777
777
|
return response
|
778
778
|
end
|
779
|
-
rescue GRPC::BadStatus => e
|
780
|
-
raise Google::Cloud::Error.from_error(e)
|
779
|
+
rescue ::GRPC::BadStatus => e
|
780
|
+
raise ::Google::Cloud::Error.from_error(e)
|
781
781
|
end
|
782
782
|
|
783
783
|
##
|
@@ -787,7 +787,7 @@ module Google
|
|
787
787
|
# providing control over timeouts, retry behavior, logging, transport
|
788
788
|
# parameters, and other low-level controls. Certain parameters can also be
|
789
789
|
# applied individually to specific RPCs. See
|
790
|
-
# {Google::Cloud::Dataproc::V1::ClusterController::Client::Configuration::Rpcs}
|
790
|
+
# {::Google::Cloud::Dataproc::V1::ClusterController::Client::Configuration::Rpcs}
|
791
791
|
# for a list of RPCs that can be configured independently.
|
792
792
|
#
|
793
793
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -798,22 +798,22 @@ module Google
|
|
798
798
|
# To modify the global config, setting the timeout for create_cluster
|
799
799
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
800
800
|
#
|
801
|
-
# Google::Cloud::Dataproc::V1::ClusterController::Client.configure do |config|
|
802
|
-
# config.timeout =
|
803
|
-
# config.rpcs.create_cluster.timeout =
|
801
|
+
# ::Google::Cloud::Dataproc::V1::ClusterController::Client.configure do |config|
|
802
|
+
# config.timeout = 10.0
|
803
|
+
# config.rpcs.create_cluster.timeout = 20.0
|
804
804
|
# end
|
805
805
|
#
|
806
806
|
# To apply the above configuration only to a new client:
|
807
807
|
#
|
808
|
-
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new do |config|
|
809
|
-
# config.timeout =
|
810
|
-
# config.rpcs.create_cluster.timeout =
|
808
|
+
# client = ::Google::Cloud::Dataproc::V1::ClusterController::Client.new do |config|
|
809
|
+
# config.timeout = 10.0
|
810
|
+
# config.rpcs.create_cluster.timeout = 20.0
|
811
811
|
# end
|
812
812
|
#
|
813
813
|
# @!attribute [rw] endpoint
|
814
814
|
# The hostname or hostname:port of the service endpoint.
|
815
815
|
# Defaults to `"dataproc.googleapis.com"`.
|
816
|
-
# @return [String]
|
816
|
+
# @return [::String]
|
817
817
|
# @!attribute [rw] credentials
|
818
818
|
# Credentials to send with calls. You may provide any of the following types:
|
819
819
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -825,29 +825,29 @@ module Google
|
|
825
825
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
826
826
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
827
827
|
# * (`nil`) indicating no credentials
|
828
|
-
# @return [Object]
|
828
|
+
# @return [::Object]
|
829
829
|
# @!attribute [rw] scope
|
830
830
|
# The OAuth scopes
|
831
|
-
# @return [Array
|
831
|
+
# @return [::Array<::String>]
|
832
832
|
# @!attribute [rw] lib_name
|
833
833
|
# The library name as recorded in instrumentation and logging
|
834
|
-
# @return [String]
|
834
|
+
# @return [::String]
|
835
835
|
# @!attribute [rw] lib_version
|
836
836
|
# The library version as recorded in instrumentation and logging
|
837
|
-
# @return [String]
|
837
|
+
# @return [::String]
|
838
838
|
# @!attribute [rw] channel_args
|
839
839
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
840
840
|
# `GRPC::Core::Channel` object is provided as the credential.
|
841
|
-
# @return [Hash]
|
841
|
+
# @return [::Hash]
|
842
842
|
# @!attribute [rw] interceptors
|
843
843
|
# An array of interceptors that are run before calls are executed.
|
844
|
-
# @return [Array
|
844
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
845
845
|
# @!attribute [rw] timeout
|
846
|
-
# The call timeout in
|
847
|
-
# @return [Numeric]
|
846
|
+
# The call timeout in seconds.
|
847
|
+
# @return [::Numeric]
|
848
848
|
# @!attribute [rw] metadata
|
849
849
|
# Additional gRPC headers to be sent with the call.
|
850
|
-
# @return [Hash{Symbol
|
850
|
+
# @return [::Hash{::Symbol=>::String}]
|
851
851
|
# @!attribute [rw] retry_policy
|
852
852
|
# The retry policy. The value is a hash with the following keys:
|
853
853
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -855,10 +855,10 @@ module Google
|
|
855
855
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
856
856
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
857
857
|
# trigger a retry.
|
858
|
-
# @return [Hash]
|
858
|
+
# @return [::Hash]
|
859
859
|
#
|
860
860
|
class Configuration
|
861
|
-
extend Gapic::Config
|
861
|
+
extend ::Gapic::Config
|
862
862
|
|
863
863
|
config_attr :endpoint, "dataproc.googleapis.com", String
|
864
864
|
config_attr :credentials, nil do |value|
|
@@ -866,14 +866,14 @@ module Google
|
|
866
866
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
867
867
|
allowed.any? { |klass| klass === value }
|
868
868
|
end
|
869
|
-
config_attr :scope, nil, String, Array, nil
|
870
|
-
config_attr :lib_name, nil, String, nil
|
871
|
-
config_attr :lib_version, nil, String, nil
|
872
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
873
|
-
config_attr :interceptors, nil, Array, nil
|
874
|
-
config_attr :timeout, nil, Numeric, nil
|
875
|
-
config_attr :metadata, nil, Hash, nil
|
876
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
869
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
870
|
+
config_attr :lib_name, nil, ::String, nil
|
871
|
+
config_attr :lib_version, nil, ::String, nil
|
872
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
873
|
+
config_attr :interceptors, nil, ::Array, nil
|
874
|
+
config_attr :timeout, nil, ::Numeric, nil
|
875
|
+
config_attr :metadata, nil, ::Hash, nil
|
876
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
877
877
|
|
878
878
|
# @private
|
879
879
|
def initialize parent_config = nil
|
@@ -914,49 +914,49 @@ module Google
|
|
914
914
|
class Rpcs
|
915
915
|
##
|
916
916
|
# RPC-specific configuration for `create_cluster`
|
917
|
-
# @return [Gapic::Config::Method]
|
917
|
+
# @return [::Gapic::Config::Method]
|
918
918
|
#
|
919
919
|
attr_reader :create_cluster
|
920
920
|
##
|
921
921
|
# RPC-specific configuration for `update_cluster`
|
922
|
-
# @return [Gapic::Config::Method]
|
922
|
+
# @return [::Gapic::Config::Method]
|
923
923
|
#
|
924
924
|
attr_reader :update_cluster
|
925
925
|
##
|
926
926
|
# RPC-specific configuration for `delete_cluster`
|
927
|
-
# @return [Gapic::Config::Method]
|
927
|
+
# @return [::Gapic::Config::Method]
|
928
928
|
#
|
929
929
|
attr_reader :delete_cluster
|
930
930
|
##
|
931
931
|
# RPC-specific configuration for `get_cluster`
|
932
|
-
# @return [Gapic::Config::Method]
|
932
|
+
# @return [::Gapic::Config::Method]
|
933
933
|
#
|
934
934
|
attr_reader :get_cluster
|
935
935
|
##
|
936
936
|
# RPC-specific configuration for `list_clusters`
|
937
|
-
# @return [Gapic::Config::Method]
|
937
|
+
# @return [::Gapic::Config::Method]
|
938
938
|
#
|
939
939
|
attr_reader :list_clusters
|
940
940
|
##
|
941
941
|
# RPC-specific configuration for `diagnose_cluster`
|
942
|
-
# @return [Gapic::Config::Method]
|
942
|
+
# @return [::Gapic::Config::Method]
|
943
943
|
#
|
944
944
|
attr_reader :diagnose_cluster
|
945
945
|
|
946
946
|
# @private
|
947
947
|
def initialize parent_rpcs = nil
|
948
948
|
create_cluster_config = parent_rpcs&.create_cluster if parent_rpcs&.respond_to? :create_cluster
|
949
|
-
@create_cluster = Gapic::Config::Method.new create_cluster_config
|
949
|
+
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
950
950
|
update_cluster_config = parent_rpcs&.update_cluster if parent_rpcs&.respond_to? :update_cluster
|
951
|
-
@update_cluster = Gapic::Config::Method.new update_cluster_config
|
951
|
+
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
952
952
|
delete_cluster_config = parent_rpcs&.delete_cluster if parent_rpcs&.respond_to? :delete_cluster
|
953
|
-
@delete_cluster = Gapic::Config::Method.new delete_cluster_config
|
953
|
+
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
954
954
|
get_cluster_config = parent_rpcs&.get_cluster if parent_rpcs&.respond_to? :get_cluster
|
955
|
-
@get_cluster = Gapic::Config::Method.new get_cluster_config
|
955
|
+
@get_cluster = ::Gapic::Config::Method.new get_cluster_config
|
956
956
|
list_clusters_config = parent_rpcs&.list_clusters if parent_rpcs&.respond_to? :list_clusters
|
957
|
-
@list_clusters = Gapic::Config::Method.new list_clusters_config
|
957
|
+
@list_clusters = ::Gapic::Config::Method.new list_clusters_config
|
958
958
|
diagnose_cluster_config = parent_rpcs&.diagnose_cluster if parent_rpcs&.respond_to? :diagnose_cluster
|
959
|
-
@diagnose_cluster = Gapic::Config::Method.new diagnose_cluster_config
|
959
|
+
@diagnose_cluster = ::Gapic::Config::Method.new diagnose_cluster_config
|
960
960
|
|
961
961
|
yield self if block_given?
|
962
962
|
end
|