google-cloud-dataproc-v1 0.6.0 → 0.7.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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +1 -1
  4. data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +3 -2
  5. data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +1 -1
  6. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +48 -54
  7. data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +637 -0
  8. data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
  9. data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +664 -0
  10. data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +69 -0
  11. data/lib/google/cloud/dataproc/v1/batch_controller.rb +50 -0
  12. data/lib/google/cloud/dataproc/v1/batches_pb.rb +123 -0
  13. data/lib/google/cloud/dataproc/v1/batches_services_pb.rb +52 -0
  14. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +75 -80
  15. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +34 -25
  16. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +9 -2
  17. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -1
  18. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +58 -72
  19. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +34 -25
  20. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -2
  21. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +1 -1
  22. data/lib/google/cloud/dataproc/v1/operations_pb.rb +18 -3
  23. data/lib/google/cloud/dataproc/v1/shared_pb.rb +40 -2
  24. data/lib/google/cloud/dataproc/v1/version.rb +1 -1
  25. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +59 -74
  26. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +34 -25
  27. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -2
  28. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -3
  29. data/lib/google/cloud/dataproc/v1.rb +1 -0
  30. data/proto_docs/google/api/field_behavior.rb +7 -1
  31. data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +18 -0
  32. data/proto_docs/google/cloud/dataproc/v1/batches.rb +339 -0
  33. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +45 -22
  34. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +8 -9
  35. data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
  36. data/proto_docs/google/cloud/dataproc/v1/shared.rb +117 -1
  37. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +11 -14
  38. metadata +21 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f94c370eafa65952f1b3b24d82ce83fd6c525d2ee49edf592a0d048db65552bb
4
- data.tar.gz: 0b5cc24618372de2ac7df3ed407be7ba6e164aef51c8aa9652500110d187b558
3
+ metadata.gz: 9775385215deb483c8be4fb3e48a732bcf23e42fac681a657441fedb5c2c6587
4
+ data.tar.gz: 288920760ec16395f52dc3a22c8c4c853daab9c1ed37bcf611811afac1b2a804
5
5
  SHA512:
6
- metadata.gz: 45e0cb059d560fe81079c5b97c70b89f152f14fce14056f7ae774295e9999b44ca2d2b451b3aa4f3dd5ea7641efc3d04fd9715c3b828f459ba2a480948bb0a6c
7
- data.tar.gz: 178d84bc29f77c21574cb54dc23dc6c302803f06c1d3d60aaf58d1026e51a880ccb1c2e2b835bc9fb156c6933bcad4b5435f2a650c33a6726228fdf21e0a22c4
6
+ metadata.gz: e739d97d6cc64954d55609af6ebf60add1a743e908e4a3665d47b84ba180d064176596e3c9bbe6fee8b7d651138edcb05fc5c7684d4430c36a3922325c4846ea
7
+ data.tar.gz: 31e43e639bcf12d0cb4ce77c0715cc820ccf018fa6aa5a3a308223b03d4cf2866add501da48ee65daf57f96d4bd84af1decdd7efc1c4544cd0c0e011f46e2aa8
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-dataproc-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Credentials}):
68
68
 
69
- 1. `DATAPROC_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `DATAPROC_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `DATAPROC_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `DATAPROC_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/dataproc/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/dataproc/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new do
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/dataproc/v1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/dataproc/v1"
34
34
 
35
35
  client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Dataproc::V1::CreateAutoscalingPolicyRequest.new # (request fields as keyword arguments...)
37
37
  response = client.create_autoscaling_policy request
38
38
  ```
39
39
 
@@ -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
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all AutoscalingPolicyService clients:
48
- #
49
- # ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all AutoscalingPolicyService clients
48
+ # ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -70,26 +69,17 @@ module Google
70
69
 
71
70
  default_config.rpcs.update_autoscaling_policy.timeout = 600.0
72
71
  default_config.rpcs.update_autoscaling_policy.retry_policy = {
73
- initial_delay: 0.1,
74
- max_delay: 60.0,
75
- multiplier: 1.3,
76
- retry_codes: [4, 14]
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
73
  }
78
74
 
79
75
  default_config.rpcs.get_autoscaling_policy.timeout = 600.0
80
76
  default_config.rpcs.get_autoscaling_policy.retry_policy = {
81
- initial_delay: 0.1,
82
- max_delay: 60.0,
83
- multiplier: 1.3,
84
- retry_codes: [4, 14]
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
85
78
  }
86
79
 
87
80
  default_config.rpcs.list_autoscaling_policies.timeout = 600.0
88
81
  default_config.rpcs.list_autoscaling_policies.retry_policy = {
89
- initial_delay: 0.1,
90
- max_delay: 60.0,
91
- multiplier: 1.3,
92
- retry_codes: [4, 14]
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
93
83
  }
94
84
 
95
85
  default_config.rpcs.delete_autoscaling_policy.timeout = 600.0
@@ -123,19 +113,15 @@ module Google
123
113
  ##
124
114
  # Create a new AutoscalingPolicyService client object.
125
115
  #
126
- # ## Examples
127
- #
128
- # To create a new AutoscalingPolicyService client with the default
129
- # configuration:
130
- #
131
- # client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
116
+ # @example
132
117
  #
133
- # To create a new AutoscalingPolicyService client with a custom
134
- # configuration:
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new
135
120
  #
136
- # client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new do |config|
137
- # config.timeout = 10.0
138
- # end
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
139
125
  #
140
126
  # @yield [config] Configure the AutoscalingPolicyService client.
141
127
  # @yieldparam config [Client::Configuration]
@@ -155,14 +141,13 @@ module Google
155
141
 
156
142
  # Create credentials
157
143
  credentials = @config.credentials
158
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
144
+ # Use self-signed JWT if the endpoint is unchanged from default,
159
145
  # 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 &&
146
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
162
147
  !@config.endpoint.split(".").first.include?("-")
163
148
  credentials ||= Credentials.default scope: @config.scope,
164
149
  enable_self_signed_jwt: enable_self_signed_jwt
165
- if credentials.is_a?(String) || credentials.is_a?(Hash)
150
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
166
151
  credentials = Credentials.new credentials, scope: @config.scope
167
152
  end
168
153
  @quota_project_id = @config.quota_project
@@ -245,7 +230,9 @@ module Google
245
230
  options.apply_defaults timeout: @config.rpcs.create_autoscaling_policy.timeout,
246
231
  metadata: metadata,
247
232
  retry_policy: @config.rpcs.create_autoscaling_policy.retry_policy
248
- options.apply_defaults metadata: @config.metadata,
233
+
234
+ options.apply_defaults timeout: @config.timeout,
235
+ metadata: @config.metadata,
249
236
  retry_policy: @config.retry_policy
250
237
 
251
238
  @autoscaling_policy_service_stub.call_rpc :create_autoscaling_policy, request, options: options do |response, operation|
@@ -314,7 +301,9 @@ module Google
314
301
  options.apply_defaults timeout: @config.rpcs.update_autoscaling_policy.timeout,
315
302
  metadata: metadata,
316
303
  retry_policy: @config.rpcs.update_autoscaling_policy.retry_policy
317
- options.apply_defaults metadata: @config.metadata,
304
+
305
+ options.apply_defaults timeout: @config.timeout,
306
+ metadata: @config.metadata,
318
307
  retry_policy: @config.retry_policy
319
308
 
320
309
  @autoscaling_policy_service_stub.call_rpc :update_autoscaling_policy, request, options: options do |response, operation|
@@ -389,7 +378,9 @@ module Google
389
378
  options.apply_defaults timeout: @config.rpcs.get_autoscaling_policy.timeout,
390
379
  metadata: metadata,
391
380
  retry_policy: @config.rpcs.get_autoscaling_policy.retry_policy
392
- options.apply_defaults metadata: @config.metadata,
381
+
382
+ options.apply_defaults timeout: @config.timeout,
383
+ metadata: @config.metadata,
393
384
  retry_policy: @config.retry_policy
394
385
 
395
386
  @autoscaling_policy_service_stub.call_rpc :get_autoscaling_policy, request, options: options do |response, operation|
@@ -470,7 +461,9 @@ module Google
470
461
  options.apply_defaults timeout: @config.rpcs.list_autoscaling_policies.timeout,
471
462
  metadata: metadata,
472
463
  retry_policy: @config.rpcs.list_autoscaling_policies.retry_policy
473
- options.apply_defaults metadata: @config.metadata,
464
+
465
+ options.apply_defaults timeout: @config.timeout,
466
+ metadata: @config.metadata,
474
467
  retry_policy: @config.retry_policy
475
468
 
476
469
  @autoscaling_policy_service_stub.call_rpc :list_autoscaling_policies, request, options: options do |response, operation|
@@ -547,7 +540,9 @@ module Google
547
540
  options.apply_defaults timeout: @config.rpcs.delete_autoscaling_policy.timeout,
548
541
  metadata: metadata,
549
542
  retry_policy: @config.rpcs.delete_autoscaling_policy.retry_policy
550
- options.apply_defaults metadata: @config.metadata,
543
+
544
+ options.apply_defaults timeout: @config.timeout,
545
+ metadata: @config.metadata,
551
546
  retry_policy: @config.retry_policy
552
547
 
553
548
  @autoscaling_policy_service_stub.call_rpc :delete_autoscaling_policy, request, options: options do |response, operation|
@@ -571,22 +566,21 @@ module Google
571
566
  # Configuration can be applied globally to all clients, or to a single client
572
567
  # on construction.
573
568
  #
574
- # # Examples
575
- #
576
- # To modify the global config, setting the timeout for create_autoscaling_policy
577
- # to 20 seconds, and all remaining timeouts to 10 seconds:
578
- #
579
- # ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.configure do |config|
580
- # config.timeout = 10.0
581
- # config.rpcs.create_autoscaling_policy.timeout = 20.0
582
- # end
583
- #
584
- # To apply the above configuration only to a new client:
585
- #
586
- # client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new do |config|
587
- # config.timeout = 10.0
588
- # config.rpcs.create_autoscaling_policy.timeout = 20.0
589
- # end
569
+ # @example
570
+ #
571
+ # # Modify the global config, setting the timeout for
572
+ # # create_autoscaling_policy to 20 seconds,
573
+ # # and all remaining timeouts to 10 seconds.
574
+ # ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.configure do |config|
575
+ # config.timeout = 10.0
576
+ # config.rpcs.create_autoscaling_policy.timeout = 20.0
577
+ # end
578
+ #
579
+ # # Apply the above configuration only to a new client.
580
+ # client = ::Google::Cloud::Dataproc::V1::AutoscalingPolicyService::Client.new do |config|
581
+ # config.timeout = 10.0
582
+ # config.rpcs.create_autoscaling_policy.timeout = 20.0
583
+ # end
590
584
  #
591
585
  # @!attribute [rw] endpoint
592
586
  # The hostname or hostname:port of the service endpoint.