google-cloud-dataproc-v1 0.2.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +68 -0
  3. data/lib/google/cloud/dataproc/v1.rb +3 -0
  4. data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +5 -5
  5. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +12 -6
  6. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +15 -9
  7. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +90 -5
  8. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +14 -0
  9. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +6 -6
  10. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +16 -10
  11. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +90 -5
  12. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +7 -7
  13. data/lib/google/cloud/dataproc/v1/version.rb +1 -1
  14. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +16 -10
  15. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +90 -5
  16. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +7 -7
  17. data/proto_docs/google/api/field_behavior.rb +6 -0
  18. data/proto_docs/google/api/resource.rb +50 -14
  19. data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +8 -2
  20. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +69 -2
  21. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +14 -13
  22. data/proto_docs/google/cloud/dataproc/v1/shared.rb +1 -1
  23. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +9 -3
  24. data/proto_docs/google/longrunning/operations.rb +17 -3
  25. data/proto_docs/google/protobuf/any.rb +5 -2
  26. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  27. metadata +9 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 370d280717ed0317b666d574e955a8fd3fd729f97137b8a809b2c909d94c78ac
4
- data.tar.gz: b53ea25c99d08a882d48be431858f1234f2cd65dbe891bae2e4821555f00d5a0
3
+ metadata.gz: 3a52ce94bdae1f76062be290ebebc5edc5c0732aac76c4a339564aaa92af6d13
4
+ data.tar.gz: a9e12b96f312e6167d6c07df02f919bbb814350ddcafbd2c950df90528e2a13b
5
5
  SHA512:
6
- metadata.gz: 8c3f11fdf660fc4e8114417e003b21c5f8c0a6de38e84eea1ec807f8f744b71686effb6300a1444b4a51552e66989f0a5eeb244f6e1cf92dbd288570a7302c43
7
- data.tar.gz: a7c1de563886a622ed42608b485ab1bcf8e74efdcab31950014c1ee1acf8181e424ba712ab26d20c70938f3e7a3139946bc0bb6163a5573fd222d2e59c80a4b7
6
+ metadata.gz: 4b8cf8f4b5f30eabd11527e5115e519b48f9c847f9345ed6185a30669a379c958b87afd7318dfac4865a80c1dfcda7111bd2323d36e3695c9cac826b98ad9495
7
+ data.tar.gz: 42c03da8d54c388ced1cf4ff18036994ae7991d603c57705604f27008c601c1badfdfcf78c2af11801164f35de95d285298b0722b4f06e72ed6c6158af577ff6
data/README.md CHANGED
@@ -6,6 +6,12 @@ Manages Hadoop-based clusters and jobs on Google Cloud Platform.
6
6
 
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
9
+ This gem is a _versioned_ client. It provides basic client classes for a
10
+ specific version of the Cloud Dataproc V1 API. Most users should consider using
11
+ the main client gem,
12
+ [google-cloud-dataproc](https://rubygems.org/gems/google-cloud-dataproc).
13
+ See the section below titled *Which client should I use?* for more information.
14
+
9
15
  ## Installation
10
16
 
11
17
  ```
@@ -18,6 +24,7 @@ In order to use this library, you first need to go through the following steps:
18
24
 
19
25
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
26
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
27
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/dataproc.googleapis.com)
21
28
  1. {file:AUTHENTICATION.md Set up authentication.}
22
29
 
23
30
  ## Quick Start
@@ -33,6 +40,9 @@ response = client.create_autoscaling_policy request
33
40
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-dataproc-v1/latest)
34
41
  for class and method documentation.
35
42
 
43
+ See also the [Product Documentation](https://cloud.google.com/dataproc)
44
+ for general usage information.
45
+
36
46
  ## Enabling Logging
37
47
 
38
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -69,3 +79,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
69
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
70
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
71
81
  about the Ruby support schedule.
82
+
83
+ ## Which client should I use?
84
+
85
+ Most modern Ruby client libraries for Google APIs come in two flavors: the main
86
+ client library with a name such as `google-cloud-dataproc`,
87
+ and lower-level _versioned_ client libraries with names such as
88
+ `google-cloud-dataproc-v1`.
89
+ _In most cases, you should install the main client._
90
+
91
+ ### What's the difference between the main client and a versioned client?
92
+
93
+ A _versioned client_ provides a basic set of data types and client classes for
94
+ a _single version_ of a specific service. (That is, for a service with multiple
95
+ versions, there might be a separate versioned client for each service version.)
96
+ Most versioned clients are written and maintained by a code generator.
97
+
98
+ The _main client_ is designed to provide you with the _recommended_ client
99
+ interfaces for the service. There will be only one main client for any given
100
+ service, even a service with multiple versions. The main client includes
101
+ factory methods for constructing the client objects we recommend for most
102
+ users. In some cases, those will be classes provided by an underlying versioned
103
+ client; in other cases, they will be handwritten higher-level client objects
104
+ with additional capabilities, convenience methods, or best practices built in.
105
+ Generally, the main client will default to a recommended service version,
106
+ although in some cases you can override this if you need to talk to a specific
107
+ service version.
108
+
109
+ ### Why would I want to use the main client?
110
+
111
+ We recommend that most users install the main client gem for a service. You can
112
+ identify this gem as the one _without_ a version in its name, e.g.
113
+ `google-cloud-dataproc`.
114
+ The main client is recommended because it will embody the best practices for
115
+ accessing the service, and may also provide more convenient interfaces or
116
+ tighter integration into frameworks and third-party libraries. In addition, the
117
+ documentation and samples published by Google will generally demonstrate use of
118
+ the main client.
119
+
120
+ ### Why would I want to use a versioned client?
121
+
122
+ You can use a versioned client if you are content with a possibly lower-level
123
+ class interface, you explicitly want to avoid features provided by the main
124
+ client, or you want to access a specific service version not be covered by the
125
+ main client. You can identify versioned client gems because the service version
126
+ is part of the name, e.g. `google-cloud-dataproc-v1`.
127
+
128
+ ### What about the google-apis-<name> clients?
129
+
130
+ Client library gems with names that begin with `google-apis-` are based on an
131
+ older code generation technology. They talk to a REST/JSON backend (whereas
132
+ most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
133
+ not offer the same performance, features, and ease of use provided by more
134
+ modern clients.
135
+
136
+ The `google-apis-` clients have wide coverage across Google services, so you
137
+ might need to use one if there is no modern client available for the service.
138
+ However, if a modern client is available, we generally recommend it over the
139
+ older `google-apis-` clients.
@@ -36,3 +36,6 @@ module Google
36
36
  end
37
37
  end
38
38
  end
39
+
40
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
41
+ require "google/cloud/dataproc/v1/_helpers" if ::File.file? helper_path
@@ -35,19 +35,19 @@ module Google
35
35
  self.service_name = 'google.cloud.dataproc.v1.AutoscalingPolicyService'
36
36
 
37
37
  # Creates new autoscaling policy.
38
- rpc :CreateAutoscalingPolicy, CreateAutoscalingPolicyRequest, AutoscalingPolicy
38
+ rpc :CreateAutoscalingPolicy, ::Google::Cloud::Dataproc::V1::CreateAutoscalingPolicyRequest, ::Google::Cloud::Dataproc::V1::AutoscalingPolicy
39
39
  # Updates (replaces) autoscaling policy.
40
40
  #
41
41
  # Disabled check for update_mask, because all updates will be full
42
42
  # replacements.
43
- rpc :UpdateAutoscalingPolicy, UpdateAutoscalingPolicyRequest, AutoscalingPolicy
43
+ rpc :UpdateAutoscalingPolicy, ::Google::Cloud::Dataproc::V1::UpdateAutoscalingPolicyRequest, ::Google::Cloud::Dataproc::V1::AutoscalingPolicy
44
44
  # Retrieves autoscaling policy.
45
- rpc :GetAutoscalingPolicy, GetAutoscalingPolicyRequest, AutoscalingPolicy
45
+ rpc :GetAutoscalingPolicy, ::Google::Cloud::Dataproc::V1::GetAutoscalingPolicyRequest, ::Google::Cloud::Dataproc::V1::AutoscalingPolicy
46
46
  # Lists autoscaling policies in the project.
47
- rpc :ListAutoscalingPolicies, ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse
47
+ rpc :ListAutoscalingPolicies, ::Google::Cloud::Dataproc::V1::ListAutoscalingPoliciesRequest, ::Google::Cloud::Dataproc::V1::ListAutoscalingPoliciesResponse
48
48
  # Deletes an autoscaling policy. It is an error to delete an autoscaling
49
49
  # policy that is in use by one or more clusters.
50
- rpc :DeleteAutoscalingPolicy, DeleteAutoscalingPolicyRequest, Google::Protobuf::Empty
50
+ rpc :DeleteAutoscalingPolicy, ::Google::Cloud::Dataproc::V1::DeleteAutoscalingPolicyRequest, ::Google::Protobuf::Empty
51
51
  end
52
52
 
53
53
  Stub = Service.rpc_stub_class
@@ -73,7 +73,7 @@ module Google
73
73
  initial_delay: 0.1,
74
74
  max_delay: 60.0,
75
75
  multiplier: 1.3,
76
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
76
+ retry_codes: [4, 14]
77
77
  }
78
78
 
79
79
  default_config.rpcs.get_autoscaling_policy.timeout = 600.0
@@ -81,7 +81,7 @@ module Google
81
81
  initial_delay: 0.1,
82
82
  max_delay: 60.0,
83
83
  multiplier: 1.3,
84
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
84
+ retry_codes: [4, 14]
85
85
  }
86
86
 
87
87
  default_config.rpcs.list_autoscaling_policies.timeout = 600.0
@@ -89,7 +89,7 @@ module Google
89
89
  initial_delay: 0.1,
90
90
  max_delay: 60.0,
91
91
  multiplier: 1.3,
92
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
92
+ retry_codes: [4, 14]
93
93
  }
94
94
 
95
95
  default_config.rpcs.delete_autoscaling_policy.timeout = 600.0
@@ -155,7 +155,13 @@ module Google
155
155
 
156
156
  # Create credentials
157
157
  credentials = @config.credentials
158
- credentials ||= Credentials.default scope: @config.scope
158
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
159
+ # but only if the default endpoint does not have a region prefix.
160
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
161
+ @config.endpoint == Client.configure.endpoint &&
162
+ !@config.endpoint.split(".").first.include?("-")
163
+ credentials ||= Credentials.default scope: @config.scope,
164
+ enable_self_signed_jwt: enable_self_signed_jwt
159
165
  if credentials.is_a?(String) || credentials.is_a?(Hash)
160
166
  credentials = Credentials.new credentials, scope: @config.scope
161
167
  end
@@ -637,7 +643,7 @@ module Google
637
643
 
638
644
  config_attr :endpoint, "dataproc.googleapis.com", ::String
639
645
  config_attr :credentials, nil do |value|
640
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
646
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
641
647
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
642
648
  allowed.any? { |klass| klass === value }
643
649
  end
@@ -677,7 +683,7 @@ module Google
677
683
  # Each configuration object is of type `Gapic::Config::Method` and includes
678
684
  # the following configuration fields:
679
685
  #
680
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
686
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
681
687
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
682
688
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
683
689
  # include the following keys:
@@ -69,7 +69,7 @@ module Google
69
69
  initial_delay: 0.1,
70
70
  max_delay: 60.0,
71
71
  multiplier: 1.3,
72
- retry_codes: ["UNAVAILABLE"]
72
+ retry_codes: [14]
73
73
  }
74
74
 
75
75
  default_config.rpcs.update_cluster.timeout = 300.0
@@ -77,7 +77,7 @@ module Google
77
77
  initial_delay: 0.1,
78
78
  max_delay: 60.0,
79
79
  multiplier: 1.3,
80
- retry_codes: ["UNAVAILABLE"]
80
+ retry_codes: [14]
81
81
  }
82
82
 
83
83
  default_config.rpcs.delete_cluster.timeout = 300.0
@@ -85,7 +85,7 @@ module Google
85
85
  initial_delay: 0.1,
86
86
  max_delay: 60.0,
87
87
  multiplier: 1.3,
88
- retry_codes: ["UNAVAILABLE"]
88
+ retry_codes: [14]
89
89
  }
90
90
 
91
91
  default_config.rpcs.get_cluster.timeout = 300.0
@@ -93,7 +93,7 @@ module Google
93
93
  initial_delay: 0.1,
94
94
  max_delay: 60.0,
95
95
  multiplier: 1.3,
96
- retry_codes: ["INTERNAL", "DEADLINE_EXCEEDED", "UNAVAILABLE"]
96
+ retry_codes: [13, 4, 14]
97
97
  }
98
98
 
99
99
  default_config.rpcs.list_clusters.timeout = 300.0
@@ -101,7 +101,7 @@ module Google
101
101
  initial_delay: 0.1,
102
102
  max_delay: 60.0,
103
103
  multiplier: 1.3,
104
- retry_codes: ["INTERNAL", "DEADLINE_EXCEEDED", "UNAVAILABLE"]
104
+ retry_codes: [13, 4, 14]
105
105
  }
106
106
 
107
107
  default_config.rpcs.diagnose_cluster.timeout = 300.0
@@ -109,7 +109,7 @@ module Google
109
109
  initial_delay: 0.1,
110
110
  max_delay: 60.0,
111
111
  multiplier: 1.3,
112
- retry_codes: ["UNAVAILABLE"]
112
+ retry_codes: [14]
113
113
  }
114
114
 
115
115
  default_config
@@ -173,7 +173,13 @@ module Google
173
173
 
174
174
  # Create credentials
175
175
  credentials = @config.credentials
176
- credentials ||= Credentials.default scope: @config.scope
176
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
177
+ # but only if the default endpoint does not have a region prefix.
178
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
179
+ @config.endpoint == Client.configure.endpoint &&
180
+ !@config.endpoint.split(".").first.include?("-")
181
+ credentials ||= Credentials.default scope: @config.scope,
182
+ enable_self_signed_jwt: enable_self_signed_jwt
177
183
  if credentials.is_a?(String) || credentials.is_a?(Hash)
178
184
  credentials = Credentials.new credentials, scope: @config.scope
179
185
  end
@@ -866,7 +872,7 @@ module Google
866
872
 
867
873
  config_attr :endpoint, "dataproc.googleapis.com", ::String
868
874
  config_attr :credentials, nil do |value|
869
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
875
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
870
876
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
871
877
  allowed.any? { |klass| klass === value }
872
878
  end
@@ -906,7 +912,7 @@ module Google
906
912
  # Each configuration object is of type `Gapic::Config::Method` and includes
907
913
  # the following configuration fields:
908
914
  #
909
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
915
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
910
916
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
911
917
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
912
918
  # include the following keys:
@@ -103,8 +103,13 @@ module Google
103
103
  # Lists operations that match the specified filter in the request. If the
104
104
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
105
105
  #
106
- # NOTE: the `name` binding below allows API services to override the binding
107
- # to use different resource name schemes, such as `users/*/operations`.
106
+ # NOTE: the `name` binding allows API services to override the binding
107
+ # to use different resource name schemes, such as `users/*/operations`. To
108
+ # override the binding, API services can add a binding such as
109
+ # `"/v1/{name=users/*}/operations"` to their service configuration.
110
+ # For backwards compatibility, the default name includes the operations
111
+ # collection id, however overriding users must ensure the name binding
112
+ # is the parent resource, without the operations collection id.
108
113
  #
109
114
  # @overload list_operations(request, options = nil)
110
115
  # Pass arguments to `list_operations` via a request object, either of type
@@ -122,7 +127,7 @@ module Google
122
127
  # the default parameter values, pass an empty Hash as a request object (see above).
123
128
  #
124
129
  # @param name [::String]
125
- # The name of the operation collection.
130
+ # The name of the operation's parent resource.
126
131
  # @param filter [::String]
127
132
  # The standard list filter.
128
133
  # @param page_size [::Integer]
@@ -390,6 +395,79 @@ module Google
390
395
  raise ::Google::Cloud::Error.from_error(e)
391
396
  end
392
397
 
398
+ ##
399
+ # Waits for the specified long-running operation until it is done or reaches
400
+ # at most a specified timeout, returning the latest state. If the operation
401
+ # is already done, the latest state is immediately returned. If the timeout
402
+ # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
+ # timeout is used. If the server does not support this method, it returns
404
+ # `google.rpc.Code.UNIMPLEMENTED`.
405
+ # Note that this method is on a best-effort basis. It may return the latest
406
+ # state before the specified timeout (including immediately), meaning even an
407
+ # immediate response is no guarantee that the operation is done.
408
+ #
409
+ # @overload wait_operation(request, options = nil)
410
+ # Pass arguments to `wait_operation` via a request object, either of type
411
+ # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash.
412
+ #
413
+ # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash]
414
+ # A request object representing the call parameters. Required. To specify no
415
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
416
+ # @param options [::Gapic::CallOptions, ::Hash]
417
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
418
+ #
419
+ # @overload wait_operation(name: nil, timeout: nil)
420
+ # Pass arguments to `wait_operation` via keyword arguments. Note that at
421
+ # least one keyword argument is required. To specify no parameters, or to keep all
422
+ # the default parameter values, pass an empty Hash as a request object (see above).
423
+ #
424
+ # @param name [::String]
425
+ # The name of the operation resource to wait on.
426
+ # @param timeout [::Google::Protobuf::Duration, ::Hash]
427
+ # The maximum duration to wait before timing out. If left blank, the wait
428
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
429
+ # If RPC context deadline is also specified, the shorter one will be used.
430
+ #
431
+ # @yield [response, operation] Access the result along with the RPC operation
432
+ # @yieldparam response [::Gapic::Operation]
433
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
434
+ #
435
+ # @return [::Gapic::Operation]
436
+ #
437
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
438
+ #
439
+ def wait_operation request, options = nil
440
+ raise ::ArgumentError, "request must be provided" if request.nil?
441
+
442
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest
443
+
444
+ # Converts hash and nil to an options object
445
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
446
+
447
+ # Customize the options with defaults
448
+ metadata = @config.rpcs.wait_operation.metadata.to_h
449
+
450
+ # Set x-goog-api-client and x-goog-user-project headers
451
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
452
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
453
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
454
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
455
+
456
+ options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
+ metadata: metadata,
458
+ retry_policy: @config.rpcs.wait_operation.retry_policy
459
+ options.apply_defaults metadata: @config.metadata,
460
+ retry_policy: @config.retry_policy
461
+
462
+ @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
463
+ response = ::Gapic::Operation.new response, @operations_client, options: options
464
+ yield response, operation if block_given?
465
+ return response
466
+ end
467
+ rescue ::GRPC::BadStatus => e
468
+ raise ::Google::Cloud::Error.from_error(e)
469
+ end
470
+
393
471
  ##
394
472
  # Configuration class for the Operations API.
395
473
  #
@@ -475,7 +553,7 @@ module Google
475
553
 
476
554
  config_attr :endpoint, "dataproc.googleapis.com", ::String
477
555
  config_attr :credentials, nil do |value|
478
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
556
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
479
557
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
480
558
  allowed.any? { |klass| klass === value }
481
559
  end
@@ -515,7 +593,7 @@ module Google
515
593
  # Each configuration object is of type `Gapic::Config::Method` and includes
516
594
  # the following configuration fields:
517
595
  #
518
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
596
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
519
597
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
520
598
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
521
599
  # include the following keys:
@@ -546,6 +624,11 @@ module Google
546
624
  # @return [::Gapic::Config::Method]
547
625
  #
548
626
  attr_reader :cancel_operation
627
+ ##
628
+ # RPC-specific configuration for `wait_operation`
629
+ # @return [::Gapic::Config::Method]
630
+ #
631
+ attr_reader :wait_operation
549
632
 
550
633
  # @private
551
634
  def initialize parent_rpcs = nil
@@ -557,6 +640,8 @@ module Google
557
640
  @delete_operation = ::Gapic::Config::Method.new delete_operation_config
558
641
  cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
559
642
  @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
643
+ wait_operation_config = parent_rpcs&.wait_operation if parent_rpcs&.respond_to? :wait_operation
644
+ @wait_operation = ::Gapic::Config::Method.new wait_operation_config
560
645
 
561
646
  yield self if block_given?
562
647
  end
@@ -25,6 +25,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
25
25
  end
26
26
  add_message "google.cloud.dataproc.v1.ClusterConfig" do
27
27
  optional :config_bucket, :string, 1
28
+ optional :temp_bucket, :string, 2
28
29
  optional :gce_cluster_config, :message, 8, "google.cloud.dataproc.v1.GceClusterConfig"
29
30
  optional :master_config, :message, 9, "google.cloud.dataproc.v1.InstanceGroupConfig"
30
31
  optional :worker_config, :message, 10, "google.cloud.dataproc.v1.InstanceGroupConfig"
@@ -35,6 +36,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
35
36
  optional :autoscaling_config, :message, 18, "google.cloud.dataproc.v1.AutoscalingConfig"
36
37
  optional :security_config, :message, 16, "google.cloud.dataproc.v1.SecurityConfig"
37
38
  optional :lifecycle_config, :message, 17, "google.cloud.dataproc.v1.LifecycleConfig"
39
+ optional :endpoint_config, :message, 19, "google.cloud.dataproc.v1.EndpointConfig"
40
+ end
41
+ add_message "google.cloud.dataproc.v1.EndpointConfig" do
42
+ map :http_ports, :string, :string, 1
43
+ optional :enable_http_port_access, :bool, 2
38
44
  end
39
45
  add_message "google.cloud.dataproc.v1.AutoscalingConfig" do
40
46
  optional :policy_uri, :string, 1
@@ -60,10 +66,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
60
66
  optional :machine_type_uri, :string, 4
61
67
  optional :disk_config, :message, 5, "google.cloud.dataproc.v1.DiskConfig"
62
68
  optional :is_preemptible, :bool, 6
69
+ optional :preemptibility, :enum, 10, "google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility"
63
70
  optional :managed_group_config, :message, 7, "google.cloud.dataproc.v1.ManagedGroupConfig"
64
71
  repeated :accelerators, :message, 8, "google.cloud.dataproc.v1.AcceleratorConfig"
65
72
  optional :min_cpu_platform, :string, 9
66
73
  end
74
+ add_enum "google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility" do
75
+ value :PREEMPTIBILITY_UNSPECIFIED, 0
76
+ value :NON_PREEMPTIBLE, 1
77
+ value :PREEMPTIBLE, 2
78
+ end
67
79
  add_message "google.cloud.dataproc.v1.ManagedGroupConfig" do
68
80
  optional :instance_template_name, :string, 1
69
81
  optional :instance_group_manager_name, :string, 2
@@ -203,10 +215,12 @@ module Google
203
215
  module V1
204
216
  Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Cluster").msgclass
205
217
  ClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterConfig").msgclass
218
+ EndpointConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EndpointConfig").msgclass
206
219
  AutoscalingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AutoscalingConfig").msgclass
207
220
  EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EncryptionConfig").msgclass
208
221
  GceClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GceClusterConfig").msgclass
209
222
  InstanceGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig").msgclass
223
+ InstanceGroupConfig::Preemptibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility").enummodule
210
224
  ManagedGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ManagedGroupConfig").msgclass
211
225
  AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AcceleratorConfig").msgclass
212
226
  DiskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.DiskConfig").msgclass