google-cloud-dataproc-v1 1.0.2 → 1.2.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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -21
  3. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +36 -6
  4. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest/client.rb +36 -6
  5. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest/service_stub.rb +54 -32
  6. data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +37 -5
  7. data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +19 -15
  8. data/lib/google/cloud/dataproc/v1/batch_controller/rest/client.rb +37 -5
  9. data/lib/google/cloud/dataproc/v1/batch_controller/rest/operations.rb +50 -38
  10. data/lib/google/cloud/dataproc/v1/batch_controller/rest/service_stub.rb +46 -26
  11. data/lib/google/cloud/dataproc/v1/batches_pb.rb +1 -1
  12. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +53 -17
  13. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +19 -15
  14. data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +21 -0
  15. data/lib/google/cloud/dataproc/v1/cluster_controller/rest/client.rb +53 -17
  16. data/lib/google/cloud/dataproc/v1/cluster_controller/rest/operations.rb +50 -38
  17. data/lib/google/cloud/dataproc/v1/cluster_controller/rest/service_stub.rb +78 -50
  18. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +3 -1
  19. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +37 -8
  20. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +19 -15
  21. data/lib/google/cloud/dataproc/v1/job_controller/rest/client.rb +37 -8
  22. data/lib/google/cloud/dataproc/v1/job_controller/rest/operations.rb +50 -38
  23. data/lib/google/cloud/dataproc/v1/job_controller/rest/service_stub.rb +70 -44
  24. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -1
  25. data/lib/google/cloud/dataproc/v1/node_group_controller/client.rb +37 -4
  26. data/lib/google/cloud/dataproc/v1/node_group_controller/operations.rb +19 -15
  27. data/lib/google/cloud/dataproc/v1/node_group_controller/rest/client.rb +37 -4
  28. data/lib/google/cloud/dataproc/v1/node_group_controller/rest/operations.rb +50 -38
  29. data/lib/google/cloud/dataproc/v1/node_group_controller/rest/service_stub.rb +38 -20
  30. data/lib/google/cloud/dataproc/v1/session_controller/client.rb +43 -9
  31. data/lib/google/cloud/dataproc/v1/session_controller/operations.rb +19 -15
  32. data/lib/google/cloud/dataproc/v1/session_controller/rest/client.rb +43 -9
  33. data/lib/google/cloud/dataproc/v1/session_controller/rest/operations.rb +50 -38
  34. data/lib/google/cloud/dataproc/v1/session_controller/rest/service_stub.rb +54 -32
  35. data/lib/google/cloud/dataproc/v1/session_template_controller/client.rb +36 -6
  36. data/lib/google/cloud/dataproc/v1/session_template_controller/rest/client.rb +36 -6
  37. data/lib/google/cloud/dataproc/v1/session_template_controller/rest/service_stub.rb +54 -32
  38. data/lib/google/cloud/dataproc/v1/session_templates_pb.rb +1 -1
  39. data/lib/google/cloud/dataproc/v1/sessions_pb.rb +2 -1
  40. data/lib/google/cloud/dataproc/v1/shared_pb.rb +1 -1
  41. data/lib/google/cloud/dataproc/v1/version.rb +1 -1
  42. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +38 -8
  43. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +19 -15
  44. data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +21 -0
  45. data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/client.rb +38 -8
  46. data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/operations.rb +50 -38
  47. data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/service_stub.rb +70 -44
  48. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -1
  49. data/proto_docs/google/api/client.rb +47 -0
  50. data/proto_docs/google/cloud/dataproc/v1/batches.rb +17 -0
  51. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +129 -23
  52. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +130 -23
  53. data/proto_docs/google/cloud/dataproc/v1/session_templates.rb +7 -0
  54. data/proto_docs/google/cloud/dataproc/v1/sessions.rb +17 -3
  55. data/proto_docs/google/cloud/dataproc/v1/shared.rb +9 -4
  56. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +79 -0
  57. data/proto_docs/google/longrunning/operations.rb +23 -14
  58. metadata +6 -9
@@ -196,14 +196,26 @@ module Google
196
196
  universe_domain: @config.universe_domain,
197
197
  channel_args: @config.channel_args,
198
198
  interceptors: @config.interceptors,
199
- channel_pool_config: @config.channel_pool
199
+ channel_pool_config: @config.channel_pool,
200
+ logger: @config.logger
200
201
  )
201
202
 
203
+ @cluster_controller_stub.stub_logger&.info do |entry|
204
+ entry.set_system_name
205
+ entry.set_service
206
+ entry.message = "Created client for #{entry.service}"
207
+ entry.set_credentials_fields credentials
208
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
209
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
210
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
211
+ end
212
+
202
213
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
203
214
  config.credentials = credentials
204
215
  config.quota_project = @quota_project_id
205
216
  config.endpoint = @cluster_controller_stub.endpoint
206
217
  config.universe_domain = @cluster_controller_stub.universe_domain
218
+ config.logger = @cluster_controller_stub.logger if config.respond_to? :logger=
207
219
  end
208
220
  end
209
221
 
@@ -221,6 +233,15 @@ module Google
221
233
  #
222
234
  attr_reader :iam_policy_client
223
235
 
236
+ ##
237
+ # The logger used for request/response debug logging.
238
+ #
239
+ # @return [Logger]
240
+ #
241
+ def logger
242
+ @cluster_controller_stub.logger
243
+ end
244
+
224
245
  # Service calls
225
246
 
226
247
  ##
@@ -336,7 +357,7 @@ module Google
336
357
  @cluster_controller_stub.call_rpc :create_cluster, request, options: options do |response, operation|
337
358
  response = ::Gapic::Operation.new response, @operations_client, options: options
338
359
  yield response, operation if block_given?
339
- return response
360
+ throw :response, response
340
361
  end
341
362
  rescue ::GRPC::BadStatus => e
342
363
  raise ::Google::Cloud::Error.from_error(e)
@@ -523,7 +544,7 @@ module Google
523
544
  @cluster_controller_stub.call_rpc :update_cluster, request, options: options do |response, operation|
524
545
  response = ::Gapic::Operation.new response, @operations_client, options: options
525
546
  yield response, operation if block_given?
526
- return response
547
+ throw :response, response
527
548
  end
528
549
  rescue ::GRPC::BadStatus => e
529
550
  raise ::Google::Cloud::Error.from_error(e)
@@ -644,7 +665,7 @@ module Google
644
665
  @cluster_controller_stub.call_rpc :stop_cluster, request, options: options do |response, operation|
645
666
  response = ::Gapic::Operation.new response, @operations_client, options: options
646
667
  yield response, operation if block_given?
647
- return response
668
+ throw :response, response
648
669
  end
649
670
  rescue ::GRPC::BadStatus => e
650
671
  raise ::Google::Cloud::Error.from_error(e)
@@ -765,7 +786,7 @@ module Google
765
786
  @cluster_controller_stub.call_rpc :start_cluster, request, options: options do |response, operation|
766
787
  response = ::Gapic::Operation.new response, @operations_client, options: options
767
788
  yield response, operation if block_given?
768
- return response
789
+ throw :response, response
769
790
  end
770
791
  rescue ::GRPC::BadStatus => e
771
792
  raise ::Google::Cloud::Error.from_error(e)
@@ -888,7 +909,7 @@ module Google
888
909
  @cluster_controller_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
889
910
  response = ::Gapic::Operation.new response, @operations_client, options: options
890
911
  yield response, operation if block_given?
891
- return response
912
+ throw :response, response
892
913
  end
893
914
  rescue ::GRPC::BadStatus => e
894
915
  raise ::Google::Cloud::Error.from_error(e)
@@ -985,7 +1006,6 @@ module Google
985
1006
 
986
1007
  @cluster_controller_stub.call_rpc :get_cluster, request, options: options do |response, operation|
987
1008
  yield response, operation if block_given?
988
- return response
989
1009
  end
990
1010
  rescue ::GRPC::BadStatus => e
991
1011
  raise ::Google::Cloud::Error.from_error(e)
@@ -1023,12 +1043,12 @@ module Google
1023
1043
  # where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
1024
1044
  # and `[KEY]` is a label key. **value** can be `*` to match all values.
1025
1045
  # `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
1026
- # `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
1027
- # contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
1028
- # contains the `DELETING` and `ERROR` states.
1029
- # `clusterName` is the name of the cluster provided at creation time.
1030
- # Only the logical `AND` operator is supported; space-separated items are
1031
- # treated as having an implicit `AND` operator.
1046
+ # `CREATING`, `RUNNING`, `ERROR`, `DELETING`, `UPDATING`, `STOPPING`, or
1047
+ # `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING`
1048
+ # states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and
1049
+ # `STOPPED` states. `clusterName` is the name of the cluster provided at
1050
+ # creation time. Only the logical `AND` operator is supported;
1051
+ # space-separated items are treated as having an implicit `AND` operator.
1032
1052
  #
1033
1053
  # Example filter:
1034
1054
  #
@@ -1106,7 +1126,7 @@ module Google
1106
1126
  @cluster_controller_stub.call_rpc :list_clusters, request, options: options do |response, operation|
1107
1127
  response = ::Gapic::PagedEnumerable.new @cluster_controller_stub, :list_clusters, request, response, operation, options
1108
1128
  yield response, operation if block_given?
1109
- return response
1129
+ throw :response, response
1110
1130
  end
1111
1131
  rescue ::GRPC::BadStatus => e
1112
1132
  raise ::Google::Cloud::Error.from_error(e)
@@ -1131,7 +1151,7 @@ module Google
1131
1151
  # @param options [::Gapic::CallOptions, ::Hash]
1132
1152
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1133
1153
  #
1134
- # @overload diagnose_cluster(project_id: nil, region: nil, cluster_name: nil, tarball_gcs_dir: nil, diagnosis_interval: nil, jobs: nil, yarn_application_ids: nil)
1154
+ # @overload diagnose_cluster(project_id: nil, region: nil, cluster_name: nil, tarball_gcs_dir: nil, tarball_access: nil, diagnosis_interval: nil, jobs: nil, yarn_application_ids: nil)
1135
1155
  # Pass arguments to `diagnose_cluster` via keyword arguments. Note that at
1136
1156
  # least one keyword argument is required. To specify no parameters, or to keep all
1137
1157
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1144,9 +1164,12 @@ module Google
1144
1164
  # @param cluster_name [::String]
1145
1165
  # Required. The cluster name.
1146
1166
  # @param tarball_gcs_dir [::String]
1147
- # Optional. The output Cloud Storage directory for the diagnostic
1167
+ # Optional. (Optional) The output Cloud Storage directory for the diagnostic
1148
1168
  # tarball. If not specified, a task-specific directory in the cluster's
1149
1169
  # staging bucket will be used.
1170
+ # @param tarball_access [::Google::Cloud::Dataproc::V1::DiagnoseClusterRequest::TarballAccess]
1171
+ # Optional. (Optional) The access type to the diagnostic tarball. If not
1172
+ # specified, falls back to default access of the bucket
1150
1173
  # @param diagnosis_interval [::Google::Type::Interval, ::Hash]
1151
1174
  # Optional. Time interval in which diagnosis should be carried out on the
1152
1175
  # cluster.
@@ -1230,7 +1253,7 @@ module Google
1230
1253
  @cluster_controller_stub.call_rpc :diagnose_cluster, request, options: options do |response, operation|
1231
1254
  response = ::Gapic::Operation.new response, @operations_client, options: options
1232
1255
  yield response, operation if block_given?
1233
- return response
1256
+ throw :response, response
1234
1257
  end
1235
1258
  rescue ::GRPC::BadStatus => e
1236
1259
  raise ::Google::Cloud::Error.from_error(e)
@@ -1280,6 +1303,13 @@ module Google
1280
1303
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1281
1304
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1282
1305
  # * (`nil`) indicating no credentials
1306
+ #
1307
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1308
+ # external source for authentication to Google Cloud, you must validate it before
1309
+ # providing it to a Google API client library. Providing an unvalidated credential
1310
+ # configuration to Google APIs can compromise the security of your systems and data.
1311
+ # For more information, refer to [Validate credential configurations from external
1312
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1283
1313
  # @return [::Object]
1284
1314
  # @!attribute [rw] scope
1285
1315
  # The OAuth scopes
@@ -1319,6 +1349,11 @@ module Google
1319
1349
  # default endpoint URL. The default value of nil uses the environment
1320
1350
  # universe (usually the default "googleapis.com" universe).
1321
1351
  # @return [::String,nil]
1352
+ # @!attribute [rw] logger
1353
+ # A custom logger to use for request/response debug logging, or the value
1354
+ # `:default` (the default) to construct a default logger, or `nil` to
1355
+ # explicitly disable logging.
1356
+ # @return [::Logger,:default,nil]
1322
1357
  #
1323
1358
  class Configuration
1324
1359
  extend ::Gapic::Config
@@ -1343,6 +1378,7 @@ module Google
1343
1378
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1344
1379
  config_attr :quota_project, nil, ::String, nil
1345
1380
  config_attr :universe_domain, nil, ::String, nil
1381
+ config_attr :logger, :default, ::Logger, nil, :default
1346
1382
 
1347
1383
  # @private
1348
1384
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -649,6 +640,13 @@ module Google
649
640
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
650
641
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
651
642
  # * (`nil`) indicating no credentials
643
+ #
644
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
645
+ # external source for authentication to Google Cloud, you must validate it before
646
+ # providing it to a Google API client library. Providing an unvalidated credential
647
+ # configuration to Google APIs can compromise the security of your systems and data.
648
+ # For more information, refer to [Validate credential configurations from external
649
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
652
650
  # @return [::Object]
653
651
  # @!attribute [rw] scope
654
652
  # The OAuth scopes
@@ -688,6 +686,11 @@ module Google
688
686
  # default endpoint URL. The default value of nil uses the environment
689
687
  # universe (usually the default "googleapis.com" universe).
690
688
  # @return [::String,nil]
689
+ # @!attribute [rw] logger
690
+ # A custom logger to use for request/response debug logging, or the value
691
+ # `:default` (the default) to construct a default logger, or `nil` to
692
+ # explicitly disable logging.
693
+ # @return [::Logger,:default,nil]
691
694
  #
692
695
  class Configuration
693
696
  extend ::Gapic::Config
@@ -712,6 +715,7 @@ module Google
712
715
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
716
  config_attr :quota_project, nil, ::String, nil
714
717
  config_attr :universe_domain, nil, ::String, nil
718
+ config_attr :logger, :default, ::Logger, nil, :default
715
719
 
716
720
  # @private
717
721
  def initialize parent_config = nil
@@ -43,6 +43,27 @@ module Google
43
43
  "projects/#{project}/locations/#{location}/clusters/#{cluster}"
44
44
  end
45
45
 
46
+ ##
47
+ # Create a fully-qualified CryptoKey resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ # @param key_ring [String]
56
+ # @param crypto_key [String]
57
+ #
58
+ # @return [::String]
59
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
60
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
62
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
63
+
64
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
65
+ end
66
+
46
67
  ##
47
68
  # Create a fully-qualified NodeGroup resource string.
48
69
  #
@@ -189,15 +189,27 @@ module Google
189
189
  endpoint: @config.endpoint,
190
190
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
191
191
  universe_domain: @config.universe_domain,
192
- credentials: credentials
192
+ credentials: credentials,
193
+ logger: @config.logger
193
194
  )
194
195
 
196
+ @cluster_controller_stub.logger(stub: true)&.info do |entry|
197
+ entry.set_system_name
198
+ entry.set_service
199
+ entry.message = "Created client for #{entry.service}"
200
+ entry.set_credentials_fields credentials
201
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
202
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
203
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
204
+ end
205
+
195
206
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
196
207
  config.credentials = credentials
197
208
  config.quota_project = @quota_project_id
198
209
  config.endpoint = @cluster_controller_stub.endpoint
199
210
  config.universe_domain = @cluster_controller_stub.universe_domain
200
211
  config.bindings_override = @config.bindings_override
212
+ config.logger = @cluster_controller_stub.logger if config.respond_to? :logger=
201
213
  end
202
214
  end
203
215
 
@@ -215,6 +227,15 @@ module Google
215
227
  #
216
228
  attr_reader :iam_policy_client
217
229
 
230
+ ##
231
+ # The logger used for request/response debug logging.
232
+ #
233
+ # @return [Logger]
234
+ #
235
+ def logger
236
+ @cluster_controller_stub.logger
237
+ end
238
+
218
239
  # Service calls
219
240
 
220
241
  ##
@@ -320,7 +341,7 @@ module Google
320
341
  @cluster_controller_stub.create_cluster request, options do |result, operation|
321
342
  result = ::Gapic::Operation.new result, @operations_client, options: options
322
343
  yield result, operation if block_given?
323
- return result
344
+ throw :response, result
324
345
  end
325
346
  rescue ::Gapic::Rest::Error => e
326
347
  raise ::Google::Cloud::Error.from_error(e)
@@ -494,7 +515,7 @@ module Google
494
515
  @cluster_controller_stub.update_cluster request, options do |result, operation|
495
516
  result = ::Gapic::Operation.new result, @operations_client, options: options
496
517
  yield result, operation if block_given?
497
- return result
518
+ throw :response, result
498
519
  end
499
520
  rescue ::Gapic::Rest::Error => e
500
521
  raise ::Google::Cloud::Error.from_error(e)
@@ -602,7 +623,7 @@ module Google
602
623
  @cluster_controller_stub.stop_cluster request, options do |result, operation|
603
624
  result = ::Gapic::Operation.new result, @operations_client, options: options
604
625
  yield result, operation if block_given?
605
- return result
626
+ throw :response, result
606
627
  end
607
628
  rescue ::Gapic::Rest::Error => e
608
629
  raise ::Google::Cloud::Error.from_error(e)
@@ -710,7 +731,7 @@ module Google
710
731
  @cluster_controller_stub.start_cluster request, options do |result, operation|
711
732
  result = ::Gapic::Operation.new result, @operations_client, options: options
712
733
  yield result, operation if block_given?
713
- return result
734
+ throw :response, result
714
735
  end
715
736
  rescue ::Gapic::Rest::Error => e
716
737
  raise ::Google::Cloud::Error.from_error(e)
@@ -820,7 +841,7 @@ module Google
820
841
  @cluster_controller_stub.delete_cluster request, options do |result, operation|
821
842
  result = ::Gapic::Operation.new result, @operations_client, options: options
822
843
  yield result, operation if block_given?
823
- return result
844
+ throw :response, result
824
845
  end
825
846
  rescue ::Gapic::Rest::Error => e
826
847
  raise ::Google::Cloud::Error.from_error(e)
@@ -904,7 +925,6 @@ module Google
904
925
 
905
926
  @cluster_controller_stub.get_cluster request, options do |result, operation|
906
927
  yield result, operation if block_given?
907
- return result
908
928
  end
909
929
  rescue ::Gapic::Rest::Error => e
910
930
  raise ::Google::Cloud::Error.from_error(e)
@@ -942,12 +962,12 @@ module Google
942
962
  # where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
943
963
  # and `[KEY]` is a label key. **value** can be `*` to match all values.
944
964
  # `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
945
- # `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
946
- # contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
947
- # contains the `DELETING` and `ERROR` states.
948
- # `clusterName` is the name of the cluster provided at creation time.
949
- # Only the logical `AND` operator is supported; space-separated items are
950
- # treated as having an implicit `AND` operator.
965
+ # `CREATING`, `RUNNING`, `ERROR`, `DELETING`, `UPDATING`, `STOPPING`, or
966
+ # `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING`
967
+ # states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and
968
+ # `STOPPED` states. `clusterName` is the name of the cluster provided at
969
+ # creation time. Only the logical `AND` operator is supported;
970
+ # space-separated items are treated as having an implicit `AND` operator.
951
971
  #
952
972
  # Example filter:
953
973
  #
@@ -1015,7 +1035,7 @@ module Google
1015
1035
  @cluster_controller_stub.list_clusters request, options do |result, operation|
1016
1036
  result = ::Gapic::Rest::PagedEnumerable.new @cluster_controller_stub, :list_clusters, "clusters", request, result, options
1017
1037
  yield result, operation if block_given?
1018
- return result
1038
+ throw :response, result
1019
1039
  end
1020
1040
  rescue ::Gapic::Rest::Error => e
1021
1041
  raise ::Google::Cloud::Error.from_error(e)
@@ -1040,7 +1060,7 @@ module Google
1040
1060
  # @param options [::Gapic::CallOptions, ::Hash]
1041
1061
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1042
1062
  #
1043
- # @overload diagnose_cluster(project_id: nil, region: nil, cluster_name: nil, tarball_gcs_dir: nil, diagnosis_interval: nil, jobs: nil, yarn_application_ids: nil)
1063
+ # @overload diagnose_cluster(project_id: nil, region: nil, cluster_name: nil, tarball_gcs_dir: nil, tarball_access: nil, diagnosis_interval: nil, jobs: nil, yarn_application_ids: nil)
1044
1064
  # Pass arguments to `diagnose_cluster` via keyword arguments. Note that at
1045
1065
  # least one keyword argument is required. To specify no parameters, or to keep all
1046
1066
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1053,9 +1073,12 @@ module Google
1053
1073
  # @param cluster_name [::String]
1054
1074
  # Required. The cluster name.
1055
1075
  # @param tarball_gcs_dir [::String]
1056
- # Optional. The output Cloud Storage directory for the diagnostic
1076
+ # Optional. (Optional) The output Cloud Storage directory for the diagnostic
1057
1077
  # tarball. If not specified, a task-specific directory in the cluster's
1058
1078
  # staging bucket will be used.
1079
+ # @param tarball_access [::Google::Cloud::Dataproc::V1::DiagnoseClusterRequest::TarballAccess]
1080
+ # Optional. (Optional) The access type to the diagnostic tarball. If not
1081
+ # specified, falls back to default access of the bucket
1059
1082
  # @param diagnosis_interval [::Google::Type::Interval, ::Hash]
1060
1083
  # Optional. Time interval in which diagnosis should be carried out on the
1061
1084
  # cluster.
@@ -1126,7 +1149,7 @@ module Google
1126
1149
  @cluster_controller_stub.diagnose_cluster request, options do |result, operation|
1127
1150
  result = ::Gapic::Operation.new result, @operations_client, options: options
1128
1151
  yield result, operation if block_given?
1129
- return result
1152
+ throw :response, result
1130
1153
  end
1131
1154
  rescue ::Gapic::Rest::Error => e
1132
1155
  raise ::Google::Cloud::Error.from_error(e)
@@ -1174,6 +1197,13 @@ module Google
1174
1197
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1175
1198
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1176
1199
  # * (`nil`) indicating no credentials
1200
+ #
1201
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1202
+ # external source for authentication to Google Cloud, you must validate it before
1203
+ # providing it to a Google API client library. Providing an unvalidated credential
1204
+ # configuration to Google APIs can compromise the security of your systems and data.
1205
+ # For more information, refer to [Validate credential configurations from external
1206
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1177
1207
  # @return [::Object]
1178
1208
  # @!attribute [rw] scope
1179
1209
  # The OAuth scopes
@@ -1206,6 +1236,11 @@ module Google
1206
1236
  # default endpoint URL. The default value of nil uses the environment
1207
1237
  # universe (usually the default "googleapis.com" universe).
1208
1238
  # @return [::String,nil]
1239
+ # @!attribute [rw] logger
1240
+ # A custom logger to use for request/response debug logging, or the value
1241
+ # `:default` (the default) to construct a default logger, or `nil` to
1242
+ # explicitly disable logging.
1243
+ # @return [::Logger,:default,nil]
1209
1244
  #
1210
1245
  class Configuration
1211
1246
  extend ::Gapic::Config
@@ -1234,6 +1269,7 @@ module Google
1234
1269
  # by the host service.
1235
1270
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1236
1271
  config_attr :bindings_override, {}, ::Hash, nil
1272
+ config_attr :logger, :default, ::Logger, nil, :default
1237
1273
 
1238
1274
  # @private
1239
1275
  def initialize parent_config = nil