google-cloud-dataproc-v1 0.5.0 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) 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_policy_service/client.rb +48 -54
  5. data/lib/google/cloud/dataproc/v1/cluster_controller.rb +1 -0
  6. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +261 -72
  7. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +34 -25
  8. data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +71 -0
  9. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +60 -0
  10. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +4 -0
  11. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +64 -76
  12. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +34 -25
  13. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -0
  14. data/lib/google/cloud/dataproc/v1/shared_pb.rb +7 -0
  15. data/lib/google/cloud/dataproc/v1/version.rb +1 -1
  16. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +61 -74
  17. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +34 -25
  18. data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +38 -0
  19. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +5 -0
  20. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -1
  21. data/proto_docs/google/api/field_behavior.rb +7 -1
  22. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +240 -16
  23. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +29 -10
  24. data/proto_docs/google/cloud/dataproc/v1/shared.rb +24 -1
  25. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +34 -7
  26. metadata +14 -7
@@ -82,7 +82,7 @@ module Google
82
82
  # Create credentials
83
83
  credentials = @config.credentials
84
84
  credentials ||= Credentials.default scope: @config.scope
85
- if credentials.is_a?(String) || credentials.is_a?(Hash)
85
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
88
  @quota_project_id = @config.quota_project
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -396,9 +404,9 @@ module Google
396
404
  end
397
405
 
398
406
  ##
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
407
+ # Waits until the specified long-running operation is done or reaches at most
408
+ # a specified timeout, returning the latest state. If the operation is
409
+ # already done, the latest state is immediately returned. If the timeout
402
410
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
411
  # timeout is used. If the server does not support this method, it returns
404
412
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -116,6 +116,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
116
116
  add_message "google.cloud.dataproc.v1.JobPlacement" do
117
117
  optional :cluster_name, :string, 1
118
118
  optional :cluster_uuid, :string, 2
119
+ map :cluster_labels, :string, :string, 3
119
120
  end
120
121
  add_message "google.cloud.dataproc.v1.JobStatus" do
121
122
  optional :state, :enum, 1, "google.cloud.dataproc.v1.JobStatus.State"
@@ -187,6 +188,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
187
188
  end
188
189
  add_message "google.cloud.dataproc.v1.JobScheduling" do
189
190
  optional :max_failures_per_hour, :int32, 1
191
+ optional :max_failures_total, :int32, 2
190
192
  end
191
193
  add_message "google.cloud.dataproc.v1.SubmitJobRequest" do
192
194
  optional :project_id, :string, 1
@@ -4,14 +4,21 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'google/api/annotations_pb'
7
+ require 'google/api/field_behavior_pb'
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/cloud/dataproc/v1/shared.proto", :syntax => :proto3) do
9
10
  add_enum "google.cloud.dataproc.v1.Component" do
10
11
  value :COMPONENT_UNSPECIFIED, 0
11
12
  value :ANACONDA, 5
13
+ value :DOCKER, 13
14
+ value :DRUID, 9
15
+ value :FLINK, 14
16
+ value :HBASE, 11
12
17
  value :HIVE_WEBHCAT, 3
13
18
  value :JUPYTER, 1
14
19
  value :PRESTO, 6
20
+ value :RANGER, 12
21
+ value :SOLR, 10
15
22
  value :ZEPPELIN, 4
16
23
  value :ZOOKEEPER, 8
17
24
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dataproc
23
23
  module V1
24
- VERSION = "0.5.0"
24
+ VERSION = "0.6.3"
25
25
  end
26
26
  end
27
27
  end
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::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 WorkflowTemplateService clients:
48
- #
49
- # ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all WorkflowTemplateService clients
48
+ # ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::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]
@@ -68,58 +67,37 @@ module Google
68
67
 
69
68
  default_config.rpcs.create_workflow_template.timeout = 600.0
70
69
  default_config.rpcs.create_workflow_template.retry_policy = {
71
- initial_delay: 0.1,
72
- max_delay: 60.0,
73
- multiplier: 1.3,
74
- retry_codes: [14]
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
75
71
  }
76
72
 
77
73
  default_config.rpcs.get_workflow_template.timeout = 600.0
78
74
  default_config.rpcs.get_workflow_template.retry_policy = {
79
- initial_delay: 0.1,
80
- max_delay: 60.0,
81
- multiplier: 1.3,
82
- retry_codes: [4, 13, 14]
75
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
83
76
  }
84
77
 
85
78
  default_config.rpcs.instantiate_workflow_template.timeout = 600.0
86
79
  default_config.rpcs.instantiate_workflow_template.retry_policy = {
87
- initial_delay: 0.1,
88
- max_delay: 60.0,
89
- multiplier: 1.3,
90
- retry_codes: [14]
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
91
81
  }
92
82
 
93
83
  default_config.rpcs.instantiate_inline_workflow_template.timeout = 600.0
94
84
  default_config.rpcs.instantiate_inline_workflow_template.retry_policy = {
95
- initial_delay: 0.1,
96
- max_delay: 60.0,
97
- multiplier: 1.3,
98
- retry_codes: [14]
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
99
86
  }
100
87
 
101
88
  default_config.rpcs.update_workflow_template.timeout = 600.0
102
89
  default_config.rpcs.update_workflow_template.retry_policy = {
103
- initial_delay: 0.1,
104
- max_delay: 60.0,
105
- multiplier: 1.3,
106
- retry_codes: [14]
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
107
91
  }
108
92
 
109
93
  default_config.rpcs.list_workflow_templates.timeout = 600.0
110
94
  default_config.rpcs.list_workflow_templates.retry_policy = {
111
- initial_delay: 0.1,
112
- max_delay: 60.0,
113
- multiplier: 1.3,
114
- retry_codes: [4, 13, 14]
95
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
115
96
  }
116
97
 
117
98
  default_config.rpcs.delete_workflow_template.timeout = 600.0
118
99
  default_config.rpcs.delete_workflow_template.retry_policy = {
119
- initial_delay: 0.1,
120
- max_delay: 60.0,
121
- multiplier: 1.3,
122
- retry_codes: [14]
100
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
123
101
  }
124
102
 
125
103
  default_config
@@ -151,19 +129,15 @@ module Google
151
129
  ##
152
130
  # Create a new WorkflowTemplateService client object.
153
131
  #
154
- # ## Examples
155
- #
156
- # To create a new WorkflowTemplateService client with the default
157
- # configuration:
132
+ # @example
158
133
  #
159
- # client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
134
+ # # Create a client using the default configuration
135
+ # client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
160
136
  #
161
- # To create a new WorkflowTemplateService client with a custom
162
- # configuration:
163
- #
164
- # client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new do |config|
165
- # config.timeout = 10.0
166
- # end
137
+ # # Create a client using a custom configuration
138
+ # client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new do |config|
139
+ # config.timeout = 10.0
140
+ # end
167
141
  #
168
142
  # @yield [config] Configure the WorkflowTemplateService client.
169
143
  # @yieldparam config [Client::Configuration]
@@ -183,14 +157,13 @@ module Google
183
157
 
184
158
  # Create credentials
185
159
  credentials = @config.credentials
186
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
160
+ # Use self-signed JWT if the endpoint is unchanged from default,
187
161
  # but only if the default endpoint does not have a region prefix.
188
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
189
- @config.endpoint == Client.configure.endpoint &&
162
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
190
163
  !@config.endpoint.split(".").first.include?("-")
191
164
  credentials ||= Credentials.default scope: @config.scope,
192
165
  enable_self_signed_jwt: enable_self_signed_jwt
193
- if credentials.is_a?(String) || credentials.is_a?(Hash)
166
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
194
167
  credentials = Credentials.new credentials, scope: @config.scope
195
168
  end
196
169
  @quota_project_id = @config.quota_project
@@ -285,7 +258,9 @@ module Google
285
258
  options.apply_defaults timeout: @config.rpcs.create_workflow_template.timeout,
286
259
  metadata: metadata,
287
260
  retry_policy: @config.rpcs.create_workflow_template.retry_policy
288
- options.apply_defaults metadata: @config.metadata,
261
+
262
+ options.apply_defaults timeout: @config.timeout,
263
+ metadata: @config.metadata,
289
264
  retry_policy: @config.retry_policy
290
265
 
291
266
  @workflow_template_service_stub.call_rpc :create_workflow_template, request, options: options do |response, operation|
@@ -368,7 +343,9 @@ module Google
368
343
  options.apply_defaults timeout: @config.rpcs.get_workflow_template.timeout,
369
344
  metadata: metadata,
370
345
  retry_policy: @config.rpcs.get_workflow_template.retry_policy
371
- options.apply_defaults metadata: @config.metadata,
346
+
347
+ options.apply_defaults timeout: @config.timeout,
348
+ metadata: @config.metadata,
372
349
  retry_policy: @config.retry_policy
373
350
 
374
351
  @workflow_template_service_stub.call_rpc :get_workflow_template, request, options: options do |response, operation|
@@ -446,7 +423,7 @@ module Google
446
423
  # underscores (_), and hyphens (-). The maximum length is 40 characters.
447
424
  # @param parameters [::Hash{::String => ::String}]
448
425
  # Optional. Map from parameter names to values that should be used for those
449
- # parameters. Values may not exceed 100 characters.
426
+ # parameters. Values may not exceed 1000 characters.
450
427
  #
451
428
  # @yield [response, operation] Access the result along with the RPC operation
452
429
  # @yieldparam response [::Gapic::Operation]
@@ -482,7 +459,9 @@ module Google
482
459
  options.apply_defaults timeout: @config.rpcs.instantiate_workflow_template.timeout,
483
460
  metadata: metadata,
484
461
  retry_policy: @config.rpcs.instantiate_workflow_template.retry_policy
485
- options.apply_defaults metadata: @config.metadata,
462
+
463
+ options.apply_defaults timeout: @config.timeout,
464
+ metadata: @config.metadata,
486
465
  retry_policy: @config.retry_policy
487
466
 
488
467
  @workflow_template_service_stub.call_rpc :instantiate_workflow_template, request, options: options do |response, operation|
@@ -498,7 +477,8 @@ module Google
498
477
  # Instantiates a template and begins execution.
499
478
  #
500
479
  # This method is equivalent to executing the sequence
501
- # {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate}, {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
480
+ # {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
481
+ # {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
502
482
  # {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
503
483
  #
504
484
  # The returned Operation can be used to track execution of
@@ -593,7 +573,9 @@ module Google
593
573
  options.apply_defaults timeout: @config.rpcs.instantiate_inline_workflow_template.timeout,
594
574
  metadata: metadata,
595
575
  retry_policy: @config.rpcs.instantiate_inline_workflow_template.retry_policy
596
- options.apply_defaults metadata: @config.metadata,
576
+
577
+ options.apply_defaults timeout: @config.timeout,
578
+ metadata: @config.metadata,
597
579
  retry_policy: @config.retry_policy
598
580
 
599
581
  @workflow_template_service_stub.call_rpc :instantiate_inline_workflow_template, request, options: options do |response, operation|
@@ -663,7 +645,9 @@ module Google
663
645
  options.apply_defaults timeout: @config.rpcs.update_workflow_template.timeout,
664
646
  metadata: metadata,
665
647
  retry_policy: @config.rpcs.update_workflow_template.retry_policy
666
- options.apply_defaults metadata: @config.metadata,
648
+
649
+ options.apply_defaults timeout: @config.timeout,
650
+ metadata: @config.metadata,
667
651
  retry_policy: @config.retry_policy
668
652
 
669
653
  @workflow_template_service_stub.call_rpc :update_workflow_template, request, options: options do |response, operation|
@@ -743,7 +727,9 @@ module Google
743
727
  options.apply_defaults timeout: @config.rpcs.list_workflow_templates.timeout,
744
728
  metadata: metadata,
745
729
  retry_policy: @config.rpcs.list_workflow_templates.retry_policy
746
- options.apply_defaults metadata: @config.metadata,
730
+
731
+ options.apply_defaults timeout: @config.timeout,
732
+ metadata: @config.metadata,
747
733
  retry_policy: @config.retry_policy
748
734
 
749
735
  @workflow_template_service_stub.call_rpc :list_workflow_templates, request, options: options do |response, operation|
@@ -823,7 +809,9 @@ module Google
823
809
  options.apply_defaults timeout: @config.rpcs.delete_workflow_template.timeout,
824
810
  metadata: metadata,
825
811
  retry_policy: @config.rpcs.delete_workflow_template.retry_policy
826
- options.apply_defaults metadata: @config.metadata,
812
+
813
+ options.apply_defaults timeout: @config.timeout,
814
+ metadata: @config.metadata,
827
815
  retry_policy: @config.retry_policy
828
816
 
829
817
  @workflow_template_service_stub.call_rpc :delete_workflow_template, request, options: options do |response, operation|
@@ -847,22 +835,21 @@ module Google
847
835
  # Configuration can be applied globally to all clients, or to a single client
848
836
  # on construction.
849
837
  #
850
- # # Examples
851
- #
852
- # To modify the global config, setting the timeout for create_workflow_template
853
- # to 20 seconds, and all remaining timeouts to 10 seconds:
854
- #
855
- # ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.configure do |config|
856
- # config.timeout = 10.0
857
- # config.rpcs.create_workflow_template.timeout = 20.0
858
- # end
859
- #
860
- # To apply the above configuration only to a new client:
861
- #
862
- # client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new do |config|
863
- # config.timeout = 10.0
864
- # config.rpcs.create_workflow_template.timeout = 20.0
865
- # end
838
+ # @example
839
+ #
840
+ # # Modify the global config, setting the timeout for
841
+ # # create_workflow_template to 20 seconds,
842
+ # # and all remaining timeouts to 10 seconds.
843
+ # ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.configure do |config|
844
+ # config.timeout = 10.0
845
+ # config.rpcs.create_workflow_template.timeout = 20.0
846
+ # end
847
+ #
848
+ # # Apply the above configuration only to a new client.
849
+ # client = ::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new do |config|
850
+ # config.timeout = 10.0
851
+ # config.rpcs.create_workflow_template.timeout = 20.0
852
+ # end
866
853
  #
867
854
  # @!attribute [rw] endpoint
868
855
  # The hostname or hostname:port of the service endpoint.
@@ -82,7 +82,7 @@ module Google
82
82
  # Create credentials
83
83
  credentials = @config.credentials
84
84
  credentials ||= Credentials.default scope: @config.scope
85
- if credentials.is_a?(String) || credentials.is_a?(Hash)
85
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
88
  @quota_project_id = @config.quota_project
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -396,9 +404,9 @@ module Google
396
404
  end
397
405
 
398
406
  ##
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
407
+ # Waits until the specified long-running operation is done or reaches at most
408
+ # a specified timeout, returning the latest state. If the operation is
409
+ # already done, the latest state is immediately returned. If the timeout
402
410
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
411
  # timeout is used. If the server does not support this method, it returns
404
412
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.