google-cloud-dataflow-v1beta3 0.1.0 → 0.1.4
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.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +1 -1
- data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/client.rb +48 -38
- data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +168 -44
- data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +54 -38
- data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +96 -40
- data/lib/google/cloud/dataflow/v1beta3/snapshots/client.rb +84 -40
- data/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb +84 -40
- data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
- data/lib/google/dataflow/v1beta3/environment_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/jobs_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/jobs_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/messages_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/messages_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/metrics_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/metrics_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/snapshots_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/snapshots_services_pb.rb +1 -1
- data/lib/google/dataflow/v1beta3/templates_pb.rb +2 -2
- data/lib/google/dataflow/v1beta3/templates_services_pb.rb +2 -2
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +10 -71
- metadata +5 -5
@@ -40,13 +40,12 @@ module Google
|
|
40
40
|
# See {::Google::Cloud::Dataflow::V1beta3::Messages::Client::Configuration}
|
41
41
|
# for a description of the configuration fields.
|
42
42
|
#
|
43
|
-
#
|
43
|
+
# @example
|
44
44
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# end
|
45
|
+
# # Modify the configuration for all Messages clients
|
46
|
+
# ::Google::Cloud::Dataflow::V1beta3::Messages::Client.configure do |config|
|
47
|
+
# config.timeout = 10.0
|
48
|
+
# end
|
50
49
|
#
|
51
50
|
# @yield [config] Configure the Client client.
|
52
51
|
# @yieldparam config [Client::Configuration]
|
@@ -95,19 +94,15 @@ module Google
|
|
95
94
|
##
|
96
95
|
# Create a new Messages client object.
|
97
96
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new Messages client with the default
|
101
|
-
# configuration:
|
97
|
+
# @example
|
102
98
|
#
|
103
|
-
#
|
99
|
+
# # Create a client using the default configuration
|
100
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Messages::Client.new
|
104
101
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
102
|
+
# # Create a client using a custom configuration
|
103
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Messages::Client.new do |config|
|
104
|
+
# config.timeout = 10.0
|
105
|
+
# end
|
111
106
|
#
|
112
107
|
# @yield [config] Configure the Messages client.
|
113
108
|
# @yieldparam config [Client::Configuration]
|
@@ -127,14 +122,13 @@ module Google
|
|
127
122
|
|
128
123
|
# Create credentials
|
129
124
|
credentials = @config.credentials
|
130
|
-
# Use self-signed JWT if the
|
125
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
131
126
|
# but only if the default endpoint does not have a region prefix.
|
132
|
-
enable_self_signed_jwt = @config.
|
133
|
-
@config.endpoint == Client.configure.endpoint &&
|
127
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
134
128
|
!@config.endpoint.split(".").first.include?("-")
|
135
129
|
credentials ||= Credentials.default scope: @config.scope,
|
136
130
|
enable_self_signed_jwt: enable_self_signed_jwt
|
137
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
131
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
138
132
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
133
|
end
|
140
134
|
@quota_project_id = @config.quota_project
|
@@ -208,6 +202,27 @@ module Google
|
|
208
202
|
#
|
209
203
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
210
204
|
#
|
205
|
+
# @example Basic example
|
206
|
+
# require "google/cloud/dataflow/v1beta3"
|
207
|
+
#
|
208
|
+
# # Create a client object. The client can be reused for multiple calls.
|
209
|
+
# client = Google::Cloud::Dataflow::V1beta3::Messages::Client.new
|
210
|
+
#
|
211
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
212
|
+
# request = Google::Cloud::Dataflow::V1beta3::ListJobMessagesRequest.new
|
213
|
+
#
|
214
|
+
# # Call the list_job_messages method.
|
215
|
+
# result = client.list_job_messages request
|
216
|
+
#
|
217
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
218
|
+
# # iterate over all elements by calling #each, and the enumerable
|
219
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
220
|
+
# # methods are also available for managing paging directly.
|
221
|
+
# result.each do |response|
|
222
|
+
# # Each element is of type ::Google::Cloud::Dataflow::V1beta3::JobMessage.
|
223
|
+
# p response
|
224
|
+
# end
|
225
|
+
#
|
211
226
|
def list_job_messages request, options = nil
|
212
227
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
213
228
|
|
@@ -228,7 +243,9 @@ module Google
|
|
228
243
|
options.apply_defaults timeout: @config.rpcs.list_job_messages.timeout,
|
229
244
|
metadata: metadata,
|
230
245
|
retry_policy: @config.rpcs.list_job_messages.retry_policy
|
231
|
-
|
246
|
+
|
247
|
+
options.apply_defaults timeout: @config.timeout,
|
248
|
+
metadata: @config.metadata,
|
232
249
|
retry_policy: @config.retry_policy
|
233
250
|
|
234
251
|
@messages_stub.call_rpc :list_job_messages, request, options: options do |response, operation|
|
@@ -253,22 +270,21 @@ module Google
|
|
253
270
|
# Configuration can be applied globally to all clients, or to a single client
|
254
271
|
# on construction.
|
255
272
|
#
|
256
|
-
#
|
257
|
-
#
|
258
|
-
#
|
259
|
-
# to 20 seconds,
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
#
|
264
|
-
#
|
265
|
-
#
|
266
|
-
#
|
267
|
-
#
|
268
|
-
#
|
269
|
-
#
|
270
|
-
#
|
271
|
-
# end
|
273
|
+
# @example
|
274
|
+
#
|
275
|
+
# # Modify the global config, setting the timeout for
|
276
|
+
# # list_job_messages to 20 seconds,
|
277
|
+
# # and all remaining timeouts to 10 seconds.
|
278
|
+
# ::Google::Cloud::Dataflow::V1beta3::Messages::Client.configure do |config|
|
279
|
+
# config.timeout = 10.0
|
280
|
+
# config.rpcs.list_job_messages.timeout = 20.0
|
281
|
+
# end
|
282
|
+
#
|
283
|
+
# # Apply the above configuration only to a new client.
|
284
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Messages::Client.new do |config|
|
285
|
+
# config.timeout = 10.0
|
286
|
+
# config.rpcs.list_job_messages.timeout = 20.0
|
287
|
+
# end
|
272
288
|
#
|
273
289
|
# @!attribute [rw] endpoint
|
274
290
|
# The hostname or hostname:port of the service endpoint.
|
@@ -40,13 +40,12 @@ module Google
|
|
40
40
|
# See {::Google::Cloud::Dataflow::V1beta3::Metrics::Client::Configuration}
|
41
41
|
# for a description of the configuration fields.
|
42
42
|
#
|
43
|
-
#
|
43
|
+
# @example
|
44
44
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# end
|
45
|
+
# # Modify the configuration for all Metrics clients
|
46
|
+
# ::Google::Cloud::Dataflow::V1beta3::Metrics::Client.configure do |config|
|
47
|
+
# config.timeout = 10.0
|
48
|
+
# end
|
50
49
|
#
|
51
50
|
# @yield [config] Configure the Client client.
|
52
51
|
# @yieldparam config [Client::Configuration]
|
@@ -95,19 +94,15 @@ module Google
|
|
95
94
|
##
|
96
95
|
# Create a new Metrics client object.
|
97
96
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new Metrics client with the default
|
101
|
-
# configuration:
|
97
|
+
# @example
|
102
98
|
#
|
103
|
-
#
|
99
|
+
# # Create a client using the default configuration
|
100
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Client.new
|
104
101
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
102
|
+
# # Create a client using a custom configuration
|
103
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Client.new do |config|
|
104
|
+
# config.timeout = 10.0
|
105
|
+
# end
|
111
106
|
#
|
112
107
|
# @yield [config] Configure the Metrics client.
|
113
108
|
# @yieldparam config [Client::Configuration]
|
@@ -127,14 +122,13 @@ module Google
|
|
127
122
|
|
128
123
|
# Create credentials
|
129
124
|
credentials = @config.credentials
|
130
|
-
# Use self-signed JWT if the
|
125
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
131
126
|
# but only if the default endpoint does not have a region prefix.
|
132
|
-
enable_self_signed_jwt = @config.
|
133
|
-
@config.endpoint == Client.configure.endpoint &&
|
127
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
134
128
|
!@config.endpoint.split(".").first.include?("-")
|
135
129
|
credentials ||= Credentials.default scope: @config.scope,
|
136
130
|
enable_self_signed_jwt: enable_self_signed_jwt
|
137
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
131
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
138
132
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
133
|
end
|
140
134
|
@quota_project_id = @config.quota_project
|
@@ -195,6 +189,21 @@ module Google
|
|
195
189
|
#
|
196
190
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
197
191
|
#
|
192
|
+
# @example Basic example
|
193
|
+
# require "google/cloud/dataflow/v1beta3"
|
194
|
+
#
|
195
|
+
# # Create a client object. The client can be reused for multiple calls.
|
196
|
+
# client = Google::Cloud::Dataflow::V1beta3::Metrics::Client.new
|
197
|
+
#
|
198
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
199
|
+
# request = Google::Cloud::Dataflow::V1beta3::GetJobMetricsRequest.new
|
200
|
+
#
|
201
|
+
# # Call the get_job_metrics method.
|
202
|
+
# result = client.get_job_metrics request
|
203
|
+
#
|
204
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::JobMetrics.
|
205
|
+
# p result
|
206
|
+
#
|
198
207
|
def get_job_metrics request, options = nil
|
199
208
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
200
209
|
|
@@ -215,7 +224,9 @@ module Google
|
|
215
224
|
options.apply_defaults timeout: @config.rpcs.get_job_metrics.timeout,
|
216
225
|
metadata: metadata,
|
217
226
|
retry_policy: @config.rpcs.get_job_metrics.retry_policy
|
218
|
-
|
227
|
+
|
228
|
+
options.apply_defaults timeout: @config.timeout,
|
229
|
+
metadata: @config.metadata,
|
219
230
|
retry_policy: @config.retry_policy
|
220
231
|
|
221
232
|
@metrics_stub.call_rpc :get_job_metrics, request, options: options do |response, operation|
|
@@ -271,6 +282,27 @@ module Google
|
|
271
282
|
#
|
272
283
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
273
284
|
#
|
285
|
+
# @example Basic example
|
286
|
+
# require "google/cloud/dataflow/v1beta3"
|
287
|
+
#
|
288
|
+
# # Create a client object. The client can be reused for multiple calls.
|
289
|
+
# client = Google::Cloud::Dataflow::V1beta3::Metrics::Client.new
|
290
|
+
#
|
291
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
292
|
+
# request = Google::Cloud::Dataflow::V1beta3::GetJobExecutionDetailsRequest.new
|
293
|
+
#
|
294
|
+
# # Call the get_job_execution_details method.
|
295
|
+
# result = client.get_job_execution_details request
|
296
|
+
#
|
297
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
298
|
+
# # iterate over all elements by calling #each, and the enumerable
|
299
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
300
|
+
# # methods are also available for managing paging directly.
|
301
|
+
# result.each do |response|
|
302
|
+
# # Each element is of type ::Google::Cloud::Dataflow::V1beta3::StageSummary.
|
303
|
+
# p response
|
304
|
+
# end
|
305
|
+
#
|
274
306
|
def get_job_execution_details request, options = nil
|
275
307
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
276
308
|
|
@@ -291,7 +323,9 @@ module Google
|
|
291
323
|
options.apply_defaults timeout: @config.rpcs.get_job_execution_details.timeout,
|
292
324
|
metadata: metadata,
|
293
325
|
retry_policy: @config.rpcs.get_job_execution_details.retry_policy
|
294
|
-
|
326
|
+
|
327
|
+
options.apply_defaults timeout: @config.timeout,
|
328
|
+
metadata: @config.metadata,
|
295
329
|
retry_policy: @config.retry_policy
|
296
330
|
|
297
331
|
@metrics_stub.call_rpc :get_job_execution_details, request, options: options do |response, operation|
|
@@ -355,6 +389,27 @@ module Google
|
|
355
389
|
#
|
356
390
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
357
391
|
#
|
392
|
+
# @example Basic example
|
393
|
+
# require "google/cloud/dataflow/v1beta3"
|
394
|
+
#
|
395
|
+
# # Create a client object. The client can be reused for multiple calls.
|
396
|
+
# client = Google::Cloud::Dataflow::V1beta3::Metrics::Client.new
|
397
|
+
#
|
398
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
399
|
+
# request = Google::Cloud::Dataflow::V1beta3::GetStageExecutionDetailsRequest.new
|
400
|
+
#
|
401
|
+
# # Call the get_stage_execution_details method.
|
402
|
+
# result = client.get_stage_execution_details request
|
403
|
+
#
|
404
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
405
|
+
# # iterate over all elements by calling #each, and the enumerable
|
406
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
407
|
+
# # methods are also available for managing paging directly.
|
408
|
+
# result.each do |response|
|
409
|
+
# # Each element is of type ::Google::Cloud::Dataflow::V1beta3::WorkerDetails.
|
410
|
+
# p response
|
411
|
+
# end
|
412
|
+
#
|
358
413
|
def get_stage_execution_details request, options = nil
|
359
414
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
360
415
|
|
@@ -375,7 +430,9 @@ module Google
|
|
375
430
|
options.apply_defaults timeout: @config.rpcs.get_stage_execution_details.timeout,
|
376
431
|
metadata: metadata,
|
377
432
|
retry_policy: @config.rpcs.get_stage_execution_details.retry_policy
|
378
|
-
|
433
|
+
|
434
|
+
options.apply_defaults timeout: @config.timeout,
|
435
|
+
metadata: @config.metadata,
|
379
436
|
retry_policy: @config.retry_policy
|
380
437
|
|
381
438
|
@metrics_stub.call_rpc :get_stage_execution_details, request, options: options do |response, operation|
|
@@ -400,22 +457,21 @@ module Google
|
|
400
457
|
# Configuration can be applied globally to all clients, or to a single client
|
401
458
|
# on construction.
|
402
459
|
#
|
403
|
-
#
|
404
|
-
#
|
405
|
-
#
|
406
|
-
# to 20 seconds,
|
407
|
-
#
|
408
|
-
#
|
409
|
-
#
|
410
|
-
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
#
|
414
|
-
#
|
415
|
-
#
|
416
|
-
#
|
417
|
-
#
|
418
|
-
# end
|
460
|
+
# @example
|
461
|
+
#
|
462
|
+
# # Modify the global config, setting the timeout for
|
463
|
+
# # get_job_metrics to 20 seconds,
|
464
|
+
# # and all remaining timeouts to 10 seconds.
|
465
|
+
# ::Google::Cloud::Dataflow::V1beta3::Metrics::Client.configure do |config|
|
466
|
+
# config.timeout = 10.0
|
467
|
+
# config.rpcs.get_job_metrics.timeout = 20.0
|
468
|
+
# end
|
469
|
+
#
|
470
|
+
# # Apply the above configuration only to a new client.
|
471
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Client.new do |config|
|
472
|
+
# config.timeout = 10.0
|
473
|
+
# config.rpcs.get_job_metrics.timeout = 20.0
|
474
|
+
# end
|
419
475
|
#
|
420
476
|
# @!attribute [rw] endpoint
|
421
477
|
# The hostname or hostname:port of the service endpoint.
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::Dataflow::V1beta3::Snapshots::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all Snapshots clients
|
45
|
+
# ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -94,19 +93,15 @@ module Google
|
|
94
93
|
##
|
95
94
|
# Create a new Snapshots client object.
|
96
95
|
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
# To create a new Snapshots client with the default
|
100
|
-
# configuration:
|
96
|
+
# @example
|
101
97
|
#
|
102
|
-
#
|
98
|
+
# # Create a client using the default configuration
|
99
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new
|
103
100
|
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# config.timeout = 10.0
|
109
|
-
# end
|
101
|
+
# # Create a client using a custom configuration
|
102
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new do |config|
|
103
|
+
# config.timeout = 10.0
|
104
|
+
# end
|
110
105
|
#
|
111
106
|
# @yield [config] Configure the Snapshots client.
|
112
107
|
# @yieldparam config [Client::Configuration]
|
@@ -126,14 +121,13 @@ module Google
|
|
126
121
|
|
127
122
|
# Create credentials
|
128
123
|
credentials = @config.credentials
|
129
|
-
# Use self-signed JWT if the
|
124
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
130
125
|
# but only if the default endpoint does not have a region prefix.
|
131
|
-
enable_self_signed_jwt = @config.
|
132
|
-
@config.endpoint == Client.configure.endpoint &&
|
126
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
133
127
|
!@config.endpoint.split(".").first.include?("-")
|
134
128
|
credentials ||= Credentials.default scope: @config.scope,
|
135
129
|
enable_self_signed_jwt: enable_self_signed_jwt
|
136
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
130
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
137
131
|
credentials = Credentials.new credentials, scope: @config.scope
|
138
132
|
end
|
139
133
|
@quota_project_id = @config.quota_project
|
@@ -183,6 +177,21 @@ module Google
|
|
183
177
|
#
|
184
178
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
185
179
|
#
|
180
|
+
# @example Basic example
|
181
|
+
# require "google/cloud/dataflow/v1beta3"
|
182
|
+
#
|
183
|
+
# # Create a client object. The client can be reused for multiple calls.
|
184
|
+
# client = Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new
|
185
|
+
#
|
186
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
187
|
+
# request = Google::Cloud::Dataflow::V1beta3::GetSnapshotRequest.new
|
188
|
+
#
|
189
|
+
# # Call the get_snapshot method.
|
190
|
+
# result = client.get_snapshot request
|
191
|
+
#
|
192
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::Snapshot.
|
193
|
+
# p result
|
194
|
+
#
|
186
195
|
def get_snapshot request, options = nil
|
187
196
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
188
197
|
|
@@ -203,7 +212,9 @@ module Google
|
|
203
212
|
options.apply_defaults timeout: @config.rpcs.get_snapshot.timeout,
|
204
213
|
metadata: metadata,
|
205
214
|
retry_policy: @config.rpcs.get_snapshot.retry_policy
|
206
|
-
|
215
|
+
|
216
|
+
options.apply_defaults timeout: @config.timeout,
|
217
|
+
metadata: @config.metadata,
|
207
218
|
retry_policy: @config.retry_policy
|
208
219
|
|
209
220
|
@snapshots_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
|
@@ -247,6 +258,21 @@ module Google
|
|
247
258
|
#
|
248
259
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
249
260
|
#
|
261
|
+
# @example Basic example
|
262
|
+
# require "google/cloud/dataflow/v1beta3"
|
263
|
+
#
|
264
|
+
# # Create a client object. The client can be reused for multiple calls.
|
265
|
+
# client = Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new
|
266
|
+
#
|
267
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
268
|
+
# request = Google::Cloud::Dataflow::V1beta3::DeleteSnapshotRequest.new
|
269
|
+
#
|
270
|
+
# # Call the delete_snapshot method.
|
271
|
+
# result = client.delete_snapshot request
|
272
|
+
#
|
273
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse.
|
274
|
+
# p result
|
275
|
+
#
|
250
276
|
def delete_snapshot request, options = nil
|
251
277
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
252
278
|
|
@@ -267,7 +293,9 @@ module Google
|
|
267
293
|
options.apply_defaults timeout: @config.rpcs.delete_snapshot.timeout,
|
268
294
|
metadata: metadata,
|
269
295
|
retry_policy: @config.rpcs.delete_snapshot.retry_policy
|
270
|
-
|
296
|
+
|
297
|
+
options.apply_defaults timeout: @config.timeout,
|
298
|
+
metadata: @config.metadata,
|
271
299
|
retry_policy: @config.retry_policy
|
272
300
|
|
273
301
|
@snapshots_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
|
@@ -311,6 +339,21 @@ module Google
|
|
311
339
|
#
|
312
340
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
313
341
|
#
|
342
|
+
# @example Basic example
|
343
|
+
# require "google/cloud/dataflow/v1beta3"
|
344
|
+
#
|
345
|
+
# # Create a client object. The client can be reused for multiple calls.
|
346
|
+
# client = Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new
|
347
|
+
#
|
348
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
349
|
+
# request = Google::Cloud::Dataflow::V1beta3::ListSnapshotsRequest.new
|
350
|
+
#
|
351
|
+
# # Call the list_snapshots method.
|
352
|
+
# result = client.list_snapshots request
|
353
|
+
#
|
354
|
+
# # The returned object is of type Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse.
|
355
|
+
# p result
|
356
|
+
#
|
314
357
|
def list_snapshots request, options = nil
|
315
358
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
316
359
|
|
@@ -331,7 +374,9 @@ module Google
|
|
331
374
|
options.apply_defaults timeout: @config.rpcs.list_snapshots.timeout,
|
332
375
|
metadata: metadata,
|
333
376
|
retry_policy: @config.rpcs.list_snapshots.retry_policy
|
334
|
-
|
377
|
+
|
378
|
+
options.apply_defaults timeout: @config.timeout,
|
379
|
+
metadata: @config.metadata,
|
335
380
|
retry_policy: @config.retry_policy
|
336
381
|
|
337
382
|
@snapshots_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
|
@@ -355,22 +400,21 @@ module Google
|
|
355
400
|
# Configuration can be applied globally to all clients, or to a single client
|
356
401
|
# on construction.
|
357
402
|
#
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
# to 20 seconds,
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
371
|
-
#
|
372
|
-
#
|
373
|
-
# end
|
403
|
+
# @example
|
404
|
+
#
|
405
|
+
# # Modify the global config, setting the timeout for
|
406
|
+
# # get_snapshot to 20 seconds,
|
407
|
+
# # and all remaining timeouts to 10 seconds.
|
408
|
+
# ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.configure do |config|
|
409
|
+
# config.timeout = 10.0
|
410
|
+
# config.rpcs.get_snapshot.timeout = 20.0
|
411
|
+
# end
|
412
|
+
#
|
413
|
+
# # Apply the above configuration only to a new client.
|
414
|
+
# client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new do |config|
|
415
|
+
# config.timeout = 10.0
|
416
|
+
# config.rpcs.get_snapshot.timeout = 20.0
|
417
|
+
# end
|
374
418
|
#
|
375
419
|
# @!attribute [rw] endpoint
|
376
420
|
# The hostname or hostname:port of the service endpoint.
|