google-cloud-dataproc-v1 0.6.3 → 0.9.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +1 -1
  5. data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +3 -2
  6. data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +1 -1
  7. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +106 -15
  8. data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +719 -0
  9. data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
  10. data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +767 -0
  11. data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +69 -0
  12. data/lib/google/cloud/dataproc/v1/batch_controller.rb +50 -0
  13. data/lib/google/cloud/dataproc/v1/batches_pb.rb +123 -0
  14. data/lib/google/cloud/dataproc/v1/batches_services_pb.rb +52 -0
  15. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +266 -49
  16. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +115 -12
  17. data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +0 -19
  18. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +23 -10
  19. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -1
  20. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +187 -32
  21. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +115 -12
  22. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -2
  23. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +1 -1
  24. data/lib/google/cloud/dataproc/v1/operations_pb.rb +18 -3
  25. data/lib/google/cloud/dataproc/v1/shared_pb.rb +99 -2
  26. data/lib/google/cloud/dataproc/v1/version.rb +1 -1
  27. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +163 -24
  28. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +115 -12
  29. data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +0 -19
  30. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -2
  31. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -3
  32. data/lib/google/cloud/dataproc/v1.rb +1 -0
  33. data/proto_docs/google/api/resource.rb +10 -71
  34. data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +18 -0
  35. data/proto_docs/google/cloud/dataproc/v1/batches.rb +339 -0
  36. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +117 -47
  37. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +20 -9
  38. data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
  39. data/proto_docs/google/cloud/dataproc/v1/shared.rb +336 -1
  40. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +12 -15
  41. metadata +11 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9df93f6bd1d83e69b00a66aafaac208f41268c4e426556242014353c6acfcc80
4
- data.tar.gz: 8034f237fcfff16df053a9c5dd26e8b52bacc26f23d8ee4a4ddafe639b716fa4
3
+ metadata.gz: '096fe11db7fcb9a7ae4b9abd2deaf16fd8c1e0226c8705c40c7d70ef7bf175f5'
4
+ data.tar.gz: ff186e05094eee5034c48b4af192bea38e0e047b2d6ebb936ca52cbb1f66a9f1
5
5
  SHA512:
6
- metadata.gz: 2007015632c66ae71352f90689f23ca1ccee4f6c0aa45c7c20ce214f3a9cb6e896d3c57654737135de2d42d1a74969dbef4aa8f041e20a20b352e4792958eaec
7
- data.tar.gz: 2d88207eb2471725760b0ef449f8f58fdca93432190a806486e05ffcf27d705ceeb6a069f147b65cbca68dae645aa451e512e7a36625c706f1e9a7912a85f8ba
6
+ metadata.gz: c7c3e6d902a3c78603c7fa7b5bc92a5737dbe1e8e9b553874979914c9668a95d8366f621c4e26ea2c0d81ca1f8fa1ec32afd8b8c30244c7769299854f77cb83c
7
+ data.tar.gz: 8590a833f18fce759b1d040684ac0a43de995cce5a4b0f1174cbb209fddb6032be8b42f54eb910a2094aed8a405e0074cb7bbb1ee0d4d3189621fd2b00d097df
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Dataproc V1 API
2
+ --title="Cloud Dataproc V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Dataproc::V1::CreateAutoscalingPolicyRequest.new # (r
37
37
  response = client.create_autoscaling_policy request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-dataproc-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/dataproc)
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dataproc/v1/autoscaling_policies.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/protobuf/duration_pb'
11
9
  require 'google/protobuf/empty_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/dataproc/v1/autoscaling_policies.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.dataproc.v1.AutoscalingPolicy" do
@@ -16,6 +16,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  optional :name, :string, 2
17
17
  optional :worker_config, :message, 4, "google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig"
18
18
  optional :secondary_worker_config, :message, 5, "google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig"
19
+ map :labels, :string, :string, 6
19
20
  oneof :algorithm do
20
21
  optional :basic_algorithm, :message, 3, "google.cloud.dataproc.v1.BasicAutoscalingAlgorithm"
21
22
  end
@@ -28,7 +28,7 @@ module Google
28
28
  # Dataproc API.
29
29
  class Service
30
30
 
31
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode
@@ -204,6 +204,21 @@ module Google
204
204
  #
205
205
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
206
206
  #
207
+ # @example Basic example
208
+ # require "google/cloud/dataproc/v1"
209
+ #
210
+ # # Create a client object. The client can be reused for multiple calls.
211
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
212
+ #
213
+ # # Create a request. To set request fields, pass in keyword arguments.
214
+ # request = Google::Cloud::Dataproc::V1::CreateAutoscalingPolicyRequest.new
215
+ #
216
+ # # Call the create_autoscaling_policy method.
217
+ # result = client.create_autoscaling_policy request
218
+ #
219
+ # # The returned object is of type Google::Cloud::Dataproc::V1::AutoscalingPolicy.
220
+ # p result
221
+ #
207
222
  def create_autoscaling_policy request, options = nil
208
223
  raise ::ArgumentError, "request must be provided" if request.nil?
209
224
 
@@ -221,9 +236,11 @@ module Google
221
236
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
222
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
223
238
 
224
- header_params = {
225
- "parent" => request.parent
226
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
227
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
228
245
  metadata[:"x-goog-request-params"] ||= request_params_header
229
246
 
@@ -275,6 +292,21 @@ module Google
275
292
  #
276
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
277
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/dataproc/v1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Dataproc::V1::UpdateAutoscalingPolicyRequest.new
303
+ #
304
+ # # Call the update_autoscaling_policy method.
305
+ # result = client.update_autoscaling_policy request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Dataproc::V1::AutoscalingPolicy.
308
+ # p result
309
+ #
278
310
  def update_autoscaling_policy request, options = nil
279
311
  raise ::ArgumentError, "request must be provided" if request.nil?
280
312
 
@@ -292,9 +324,11 @@ module Google
292
324
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
293
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
294
326
 
295
- header_params = {
296
- "policy.name" => request.policy.name
297
- }
327
+ header_params = {}
328
+ if request.policy&.name
329
+ header_params["policy.name"] = request.policy.name
330
+ end
331
+
298
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
299
333
  metadata[:"x-goog-request-params"] ||= request_params_header
300
334
 
@@ -352,6 +386,21 @@ module Google
352
386
  #
353
387
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
354
388
  #
389
+ # @example Basic example
390
+ # require "google/cloud/dataproc/v1"
391
+ #
392
+ # # Create a client object. The client can be reused for multiple calls.
393
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
394
+ #
395
+ # # Create a request. To set request fields, pass in keyword arguments.
396
+ # request = Google::Cloud::Dataproc::V1::GetAutoscalingPolicyRequest.new
397
+ #
398
+ # # Call the get_autoscaling_policy method.
399
+ # result = client.get_autoscaling_policy request
400
+ #
401
+ # # The returned object is of type Google::Cloud::Dataproc::V1::AutoscalingPolicy.
402
+ # p result
403
+ #
355
404
  def get_autoscaling_policy request, options = nil
356
405
  raise ::ArgumentError, "request must be provided" if request.nil?
357
406
 
@@ -369,9 +418,11 @@ module Google
369
418
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
370
419
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
420
 
372
- header_params = {
373
- "name" => request.name
374
- }
421
+ header_params = {}
422
+ if request.name
423
+ header_params["name"] = request.name
424
+ end
425
+
375
426
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
376
427
  metadata[:"x-goog-request-params"] ||= request_params_header
377
428
 
@@ -435,6 +486,27 @@ module Google
435
486
  #
436
487
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
437
488
  #
489
+ # @example Basic example
490
+ # require "google/cloud/dataproc/v1"
491
+ #
492
+ # # Create a client object. The client can be reused for multiple calls.
493
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
494
+ #
495
+ # # Create a request. To set request fields, pass in keyword arguments.
496
+ # request = Google::Cloud::Dataproc::V1::ListAutoscalingPoliciesRequest.new
497
+ #
498
+ # # Call the list_autoscaling_policies method.
499
+ # result = client.list_autoscaling_policies request
500
+ #
501
+ # # The returned object is of type Gapic::PagedEnumerable. You can
502
+ # # iterate over all elements by calling #each, and the enumerable
503
+ # # will lazily make API calls to fetch subsequent pages. Other
504
+ # # methods are also available for managing paging directly.
505
+ # result.each do |response|
506
+ # # Each element is of type ::Google::Cloud::Dataproc::V1::AutoscalingPolicy.
507
+ # p response
508
+ # end
509
+ #
438
510
  def list_autoscaling_policies request, options = nil
439
511
  raise ::ArgumentError, "request must be provided" if request.nil?
440
512
 
@@ -452,9 +524,11 @@ module Google
452
524
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
453
525
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
454
526
 
455
- header_params = {
456
- "parent" => request.parent
457
- }
527
+ header_params = {}
528
+ if request.parent
529
+ header_params["parent"] = request.parent
530
+ end
531
+
458
532
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
459
533
  metadata[:"x-goog-request-params"] ||= request_params_header
460
534
 
@@ -514,6 +588,21 @@ module Google
514
588
  #
515
589
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
516
590
  #
591
+ # @example Basic example
592
+ # require "google/cloud/dataproc/v1"
593
+ #
594
+ # # Create a client object. The client can be reused for multiple calls.
595
+ # client = Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
596
+ #
597
+ # # Create a request. To set request fields, pass in keyword arguments.
598
+ # request = Google::Cloud::Dataproc::V1::DeleteAutoscalingPolicyRequest.new
599
+ #
600
+ # # Call the delete_autoscaling_policy method.
601
+ # result = client.delete_autoscaling_policy request
602
+ #
603
+ # # The returned object is of type Google::Protobuf::Empty.
604
+ # p result
605
+ #
517
606
  def delete_autoscaling_policy request, options = nil
518
607
  raise ::ArgumentError, "request must be provided" if request.nil?
519
608
 
@@ -531,9 +620,11 @@ module Google
531
620
  gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
532
621
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
533
622
 
534
- header_params = {
535
- "name" => request.name
536
- }
623
+ header_params = {}
624
+ if request.name
625
+ header_params["name"] = request.name
626
+ end
627
+
537
628
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
538
629
  metadata[:"x-goog-request-params"] ||= request_params_header
539
630