google-cloud-dataproc 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/AUTHENTICATION.md +199 -0
  4. data/lib/google/cloud/dataproc/v1/cluster_controller_client.rb +15 -12
  5. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/clusters.rb +46 -32
  6. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/jobs.rb +21 -17
  7. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/workflow_templates.rb +6 -6
  8. data/lib/google/cloud/dataproc/v1/doc/google/longrunning/operations.rb +1 -1
  9. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/any.rb +2 -1
  10. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/field_mask.rb +18 -26
  11. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/timestamp.rb +15 -13
  12. data/lib/google/cloud/dataproc/v1/doc/google/rpc/status.rb +17 -14
  13. data/lib/google/cloud/dataproc/v1/job_controller_client.rb +4 -3
  14. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +2 -1
  15. data/lib/google/cloud/dataproc/v1/workflow_template_service_client.rb +45 -23
  16. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -1
  17. data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb +29 -20
  18. data/lib/google/cloud/dataproc/v1beta2/clusters_pb.rb +1 -1
  19. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb +58 -39
  20. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb +23 -18
  21. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb +10 -9
  22. data/lib/google/cloud/dataproc/v1beta2/doc/google/longrunning/operations.rb +1 -1
  23. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/any.rb +2 -1
  24. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/field_mask.rb +18 -26
  25. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/timestamp.rb +15 -13
  26. data/lib/google/cloud/dataproc/v1beta2/doc/google/rpc/status.rb +17 -14
  27. data/lib/google/cloud/dataproc/v1beta2/job_controller_client.rb +6 -4
  28. data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +2 -1
  29. data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client.rb +45 -23
  30. data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +2 -1
  31. metadata +6 -6
@@ -15,17 +15,19 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # A Timestamp represents a point in time independent of any time zone
19
- # or calendar, represented as seconds and fractions of seconds at
20
- # nanosecond resolution in UTC Epoch time. It is encoded using the
21
- # Proleptic Gregorian Calendar which extends the Gregorian calendar
22
- # backwards to year one. It is encoded assuming all minutes are 60
23
- # seconds long, i.e. leap seconds are "smeared" so that no leap second
24
- # table is needed for interpretation. Range is from
25
- # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
26
- # By restricting to that range, we ensure that we can convert to
27
- # and from RFC 3339 date strings.
28
- # See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
18
+ # A Timestamp represents a point in time independent of any time zone or local
19
+ # calendar, encoded as a count of seconds and fractions of seconds at
20
+ # nanosecond resolution. The count is relative to an epoch at UTC midnight on
21
+ # January 1, 1970, in the proleptic Gregorian calendar which extends the
22
+ # Gregorian calendar backwards to year one.
23
+ #
24
+ # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
25
+ # second table is needed for interpretation, using a [24-hour linear
26
+ # smear](https://developers.google.com/time/smear).
27
+ #
28
+ # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
29
+ # restricting to that range, we ensure that we can convert to and from [RFC
30
+ # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
29
31
  #
30
32
  # = Examples
31
33
  #
@@ -86,12 +88,12 @@ module Google
86
88
  # 01:30 UTC on January 15, 2017.
87
89
  #
88
90
  # In JavaScript, one can convert a Date object to this format using the
89
- # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
91
+ # standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
90
92
  # method. In Python, a standard `datetime.datetime` object can be converted
91
93
  # to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
92
94
  # with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
93
95
  # can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
96
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
95
97
  # ) to obtain a formatter capable of generating timestamps in this format.
96
98
  # @!attribute [rw] seconds
97
99
  # @return [Integer]
@@ -15,24 +15,25 @@
15
15
 
16
16
  module Google
17
17
  module Rpc
18
- # The `Status` type defines a logical error model that is suitable for different
19
- # programming environments, including REST APIs and RPC APIs. It is used by
20
- # [gRPC](https://github.com/grpc). The error model is designed to be:
18
+ # The `Status` type defines a logical error model that is suitable for
19
+ # different programming environments, including REST APIs and RPC APIs. It is
20
+ # used by [gRPC](https://github.com/grpc). The error model is designed to be:
21
21
  #
22
22
  # * Simple to use and understand for most users
23
23
  # * Flexible enough to meet unexpected needs
24
24
  #
25
25
  # = Overview
26
26
  #
27
- # The `Status` message contains three pieces of data: error code, error message,
28
- # and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
- # error message should be a developer-facing English message that helps
31
- # developers *understand* and *resolve* the error. If a localized user-facing
32
- # error message is needed, put the localized message in the error details or
33
- # localize it in the client. The optional error details may contain arbitrary
34
- # information about the error. There is a predefined set of error detail types
35
- # in the package `google.rpc` that can be used for common error conditions.
27
+ # The `Status` message contains three pieces of data: error code, error
28
+ # message, and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes
30
+ # if needed. The error message should be a developer-facing English message
31
+ # that helps developers *understand* and *resolve* the error. If a localized
32
+ # user-facing error message is needed, put the localized message in the error
33
+ # details or localize it in the client. The optional error details may contain
34
+ # arbitrary information about the error. There is a predefined set of error
35
+ # detail types in the package `google.rpc` that can be used for common error
36
+ # conditions.
36
37
  #
37
38
  # = Language mapping
38
39
  #
@@ -69,12 +70,14 @@ module Google
69
70
  # be used directly after any stripping needed for security/privacy reasons.
70
71
  # @!attribute [rw] code
71
72
  # @return [Integer]
72
- # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # The status code, which should be an enum value of
74
+ # {Google::Rpc::Code}.
73
75
  # @!attribute [rw] message
74
76
  # @return [String]
75
77
  # A developer-facing error message, which should be in English. Any
76
78
  # user-facing error message should be localized and sent in the
77
- # {Google::Rpc::Status#details} field, or localized by the client.
79
+ # {Google::Rpc::Status#details} field, or localized
80
+ # by the client.
78
81
  # @!attribute [rw] details
79
82
  # @return [Array<Google::Protobuf::Any>]
80
83
  # A list of messages that carry the error details. There is a common set of
@@ -217,9 +217,10 @@ module Google
217
217
  # can also be provided.
218
218
  # @param request_id [String]
219
219
  # Optional. A unique id used to identify the request. If the server
220
- # receives two {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests with the same
221
- # id, then the second request will be ignored and the
222
- # first {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
220
+ # receives two
221
+ # {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests
222
+ # with the same id, then the second request will be ignored and the first
223
+ # {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
223
224
  # is returned.
224
225
  #
225
226
  # It is recommended to always set this value to a
@@ -479,7 +480,8 @@ module Google
479
480
 
480
481
  # Starts a job cancellation request. To access the job resource
481
482
  # after cancellation, call
482
- # [regions/\\{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) or
483
+ # [regions/\\{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list)
484
+ # or
483
485
  # [regions/\\{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
484
486
  #
485
487
  # @param project_id [String]
@@ -45,7 +45,8 @@ module Google
45
45
  rpc :UpdateJob, UpdateJobRequest, Job
46
46
  # Starts a job cancellation request. To access the job resource
47
47
  # after cancellation, call
48
- # [regions/\\{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) or
48
+ # [regions/\\{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list)
49
+ # or
49
50
  # [regions/\\{region}/jobs.get](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
50
51
  rpc :CancelJob, CancelJobRequest, Job
51
52
  # Deletes the job from the project. If the job is active, the delete fails,
@@ -225,37 +225,58 @@ module Google
225
225
  @create_workflow_template = Google::Gax.create_api_call(
226
226
  @workflow_template_service_stub.method(:create_workflow_template),
227
227
  defaults["create_workflow_template"],
228
- exception_transformer: exception_transformer
228
+ exception_transformer: exception_transformer,
229
+ params_extractor: proc do |request|
230
+ {'parent' => request.parent}
231
+ end
229
232
  )
230
233
  @get_workflow_template = Google::Gax.create_api_call(
231
234
  @workflow_template_service_stub.method(:get_workflow_template),
232
235
  defaults["get_workflow_template"],
233
- exception_transformer: exception_transformer
236
+ exception_transformer: exception_transformer,
237
+ params_extractor: proc do |request|
238
+ {'name' => request.name}
239
+ end
234
240
  )
235
241
  @instantiate_workflow_template = Google::Gax.create_api_call(
236
242
  @workflow_template_service_stub.method(:instantiate_workflow_template),
237
243
  defaults["instantiate_workflow_template"],
238
- exception_transformer: exception_transformer
244
+ exception_transformer: exception_transformer,
245
+ params_extractor: proc do |request|
246
+ {'name' => request.name}
247
+ end
239
248
  )
240
249
  @instantiate_inline_workflow_template = Google::Gax.create_api_call(
241
250
  @workflow_template_service_stub.method(:instantiate_inline_workflow_template),
242
251
  defaults["instantiate_inline_workflow_template"],
243
- exception_transformer: exception_transformer
252
+ exception_transformer: exception_transformer,
253
+ params_extractor: proc do |request|
254
+ {'parent' => request.parent}
255
+ end
244
256
  )
245
257
  @update_workflow_template = Google::Gax.create_api_call(
246
258
  @workflow_template_service_stub.method(:update_workflow_template),
247
259
  defaults["update_workflow_template"],
248
- exception_transformer: exception_transformer
260
+ exception_transformer: exception_transformer,
261
+ params_extractor: proc do |request|
262
+ {'template.name' => request.template.name}
263
+ end
249
264
  )
250
265
  @list_workflow_templates = Google::Gax.create_api_call(
251
266
  @workflow_template_service_stub.method(:list_workflow_templates),
252
267
  defaults["list_workflow_templates"],
253
- exception_transformer: exception_transformer
268
+ exception_transformer: exception_transformer,
269
+ params_extractor: proc do |request|
270
+ {'parent' => request.parent}
271
+ end
254
272
  )
255
273
  @delete_workflow_template = Google::Gax.create_api_call(
256
274
  @workflow_template_service_stub.method(:delete_workflow_template),
257
275
  defaults["delete_workflow_template"],
258
- exception_transformer: exception_transformer
276
+ exception_transformer: exception_transformer,
277
+ params_extractor: proc do |request|
278
+ {'name' => request.name}
279
+ end
259
280
  )
260
281
  end
261
282
 
@@ -282,12 +303,12 @@ module Google
282
303
  # @example
283
304
  # require "google/cloud/dataproc"
284
305
  #
285
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
306
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
286
307
  # formatted_parent = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.region_path("[PROJECT]", "[REGION]")
287
308
  #
288
309
  # # TODO: Initialize `template`:
289
310
  # template = {}
290
- # response = workflow_template_service_client.create_workflow_template(formatted_parent, template)
311
+ # response = workflow_template_client.create_workflow_template(formatted_parent, template)
291
312
 
292
313
  def create_workflow_template \
293
314
  parent,
@@ -327,9 +348,9 @@ module Google
327
348
  # @example
328
349
  # require "google/cloud/dataproc"
329
350
  #
330
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
351
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
331
352
  # formatted_name = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.workflow_template_path("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
332
- # response = workflow_template_service_client.get_workflow_template(formatted_name)
353
+ # response = workflow_template_client.get_workflow_template(formatted_name)
333
354
 
334
355
  def get_workflow_template \
335
356
  name,
@@ -397,11 +418,11 @@ module Google
397
418
  # @example
398
419
  # require "google/cloud/dataproc"
399
420
  #
400
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
421
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
401
422
  # formatted_name = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.workflow_template_path("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
402
423
  #
403
424
  # # Register a callback during the method call.
404
- # operation = workflow_template_service_client.instantiate_workflow_template(formatted_name) do |op|
425
+ # operation = workflow_template_client.instantiate_workflow_template(formatted_name) do |op|
405
426
  # raise op.results.message if op.error?
406
427
  # op_results = op.results
407
428
  # # Process the results.
@@ -456,7 +477,8 @@ module Google
456
477
  # Instantiates a template and begins execution.
457
478
  #
458
479
  # This method is equivalent to executing the sequence
459
- # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::CreateWorkflowTemplate CreateWorkflowTemplate}, {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::InstantiateWorkflowTemplate InstantiateWorkflowTemplate},
480
+ # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::CreateWorkflowTemplate CreateWorkflowTemplate},
481
+ # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::InstantiateWorkflowTemplate InstantiateWorkflowTemplate},
460
482
  # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::DeleteWorkflowTemplate DeleteWorkflowTemplate}.
461
483
  #
462
484
  # The returned Operation can be used to track execution of
@@ -504,14 +526,14 @@ module Google
504
526
  # @example
505
527
  # require "google/cloud/dataproc"
506
528
  #
507
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
529
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
508
530
  # formatted_parent = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.region_path("[PROJECT]", "[REGION]")
509
531
  #
510
532
  # # TODO: Initialize `template`:
511
533
  # template = {}
512
534
  #
513
535
  # # Register a callback during the method call.
514
- # operation = workflow_template_service_client.instantiate_inline_workflow_template(formatted_parent, template) do |op|
536
+ # operation = workflow_template_client.instantiate_inline_workflow_template(formatted_parent, template) do |op|
515
537
  # raise op.results.message if op.error?
516
538
  # op_results = op.results
517
539
  # # Process the results.
@@ -581,11 +603,11 @@ module Google
581
603
  # @example
582
604
  # require "google/cloud/dataproc"
583
605
  #
584
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
606
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
585
607
  #
586
608
  # # TODO: Initialize `template`:
587
609
  # template = {}
588
- # response = workflow_template_service_client.update_workflow_template(template)
610
+ # response = workflow_template_client.update_workflow_template(template)
589
611
 
590
612
  def update_workflow_template \
591
613
  template,
@@ -625,16 +647,16 @@ module Google
625
647
  # @example
626
648
  # require "google/cloud/dataproc"
627
649
  #
628
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
650
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
629
651
  # formatted_parent = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.region_path("[PROJECT]", "[REGION]")
630
652
  #
631
653
  # # Iterate over all results.
632
- # workflow_template_service_client.list_workflow_templates(formatted_parent).each do |element|
654
+ # workflow_template_client.list_workflow_templates(formatted_parent).each do |element|
633
655
  # # Process element.
634
656
  # end
635
657
  #
636
658
  # # Or iterate over results one page at a time.
637
- # workflow_template_service_client.list_workflow_templates(formatted_parent).each_page do |page|
659
+ # workflow_template_client.list_workflow_templates(formatted_parent).each_page do |page|
638
660
  # # Process each page at a time.
639
661
  # page.each do |element|
640
662
  # # Process element.
@@ -674,9 +696,9 @@ module Google
674
696
  # @example
675
697
  # require "google/cloud/dataproc"
676
698
  #
677
- # workflow_template_service_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
699
+ # workflow_template_client = Google::Cloud::Dataproc::WorkflowTemplateService.new(version: :v1beta2)
678
700
  # formatted_name = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateServiceClient.workflow_template_path("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
679
- # workflow_template_service_client.delete_workflow_template(formatted_name)
701
+ # workflow_template_client.delete_workflow_template(formatted_name)
680
702
 
681
703
  def delete_workflow_template \
682
704
  name,
@@ -65,7 +65,8 @@ module Google
65
65
  # Instantiates a template and begins execution.
66
66
  #
67
67
  # This method is equivalent to executing the sequence
68
- # [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
68
+ # [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
69
+ # [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
69
70
  # [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
70
71
  #
71
72
  # The returned Operation can be used to track execution of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataproc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-01 00:00:00.000000000 Z
11
+ date: 2019-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.61.0
61
+ version: 0.64.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.61.0
68
+ version: 0.64.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -102,6 +102,7 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".yardopts"
105
+ - AUTHENTICATION.md
105
106
  - LICENSE
106
107
  - README.md
107
108
  - lib/google/cloud/dataproc.rb
@@ -175,8 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
176
  - !ruby/object:Gem::Version
176
177
  version: '0'
177
178
  requirements: []
178
- rubyforge_project:
179
- rubygems_version: 2.7.6
179
+ rubygems_version: 3.0.3
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: API Client library for Google Cloud Dataproc API