google-cloud-gaming-v1 0.3.2 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/gaming/v1/common_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/game_server_clusters_pb.rb +33 -2
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/client.rb +269 -87
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/operations.rb +145 -33
- data/lib/google/cloud/gaming/v1/game_server_clusters_service_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/game_server_clusters_service_services_pb.rb +1 -1
- data/lib/google/cloud/gaming/v1/game_server_configs_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/game_server_configs_service/client.rb +145 -60
- data/lib/google/cloud/gaming/v1/game_server_configs_service/operations.rb +145 -33
- data/lib/google/cloud/gaming/v1/game_server_configs_service_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/game_server_configs_service_services_pb.rb +1 -1
- data/lib/google/cloud/gaming/v1/game_server_deployments_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/client.rb +280 -95
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/operations.rb +145 -33
- data/lib/google/cloud/gaming/v1/game_server_deployments_service_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/game_server_deployments_service_services_pb.rb +1 -1
- data/lib/google/cloud/gaming/v1/realms_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/realms_service/client.rb +200 -72
- data/lib/google/cloud/gaming/v1/realms_service/operations.rb +145 -33
- data/lib/google/cloud/gaming/v1/realms_service_pb.rb +2 -2
- data/lib/google/cloud/gaming/v1/realms_service_services_pb.rb +1 -1
- data/lib/google/cloud/gaming/v1/version.rb +1 -1
- data/proto_docs/google/cloud/gaming/v1/common.rb +4 -5
- data/proto_docs/google/cloud/gaming/v1/game_server_clusters.rb +117 -19
- data/proto_docs/google/cloud/gaming/v1/game_server_configs.rb +5 -11
- data/proto_docs/google/cloud/gaming/v1/game_server_deployments.rb +12 -28
- data/proto_docs/google/cloud/gaming/v1/realms.rb +7 -13
- metadata +4 -4
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Gaming::V1::GameServerClustersService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all GameServerClustersService clients
|
48
|
+
# ::Google::Cloud::Gaming::V1::GameServerClustersService::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]
|
@@ -126,19 +125,15 @@ module Google
|
|
126
125
|
##
|
127
126
|
# Create a new GameServerClustersService client object.
|
128
127
|
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
# To create a new GameServerClustersService client with the default
|
132
|
-
# configuration:
|
133
|
-
#
|
134
|
-
# client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
128
|
+
# @example
|
135
129
|
#
|
136
|
-
#
|
137
|
-
#
|
130
|
+
# # Create a client using the default configuration
|
131
|
+
# client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
138
132
|
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
133
|
+
# # Create a client using a custom configuration
|
134
|
+
# client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Client.new do |config|
|
135
|
+
# config.timeout = 10.0
|
136
|
+
# end
|
142
137
|
#
|
143
138
|
# @yield [config] Configure the GameServerClustersService client.
|
144
139
|
# @yieldparam config [Client::Configuration]
|
@@ -158,10 +153,9 @@ module Google
|
|
158
153
|
|
159
154
|
# Create credentials
|
160
155
|
credentials = @config.credentials
|
161
|
-
# Use self-signed JWT if the
|
156
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
162
157
|
# but only if the default endpoint does not have a region prefix.
|
163
|
-
enable_self_signed_jwt = @config.
|
164
|
-
@config.endpoint == Client.configure.endpoint &&
|
158
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
165
159
|
!@config.endpoint.split(".").first.include?("-")
|
166
160
|
credentials ||= Credentials.default scope: @config.scope,
|
167
161
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -207,16 +201,16 @@ module Google
|
|
207
201
|
# @param options [::Gapic::CallOptions, ::Hash]
|
208
202
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
209
203
|
#
|
210
|
-
# @overload list_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
204
|
+
# @overload list_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
|
211
205
|
# Pass arguments to `list_game_server_clusters` via keyword arguments. Note that at
|
212
206
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
213
207
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
214
208
|
#
|
215
209
|
# @param parent [::String]
|
216
|
-
# Required. The parent resource name
|
210
|
+
# Required. The parent resource name, in the following form:
|
217
211
|
# "projects/\\{project}/locations/\\{location}/realms/\\{realm}".
|
218
212
|
# @param page_size [::Integer]
|
219
|
-
# Optional. The maximum number of items to return.
|
213
|
+
# Optional. The maximum number of items to return. If unspecified, the server
|
220
214
|
# will pick an appropriate default. The server may return fewer items than
|
221
215
|
# requested. A caller should only rely on response's
|
222
216
|
# {::Google::Cloud::Gaming::V1::ListGameServerClustersResponse#next_page_token next_page_token} to
|
@@ -228,6 +222,13 @@ module Google
|
|
228
222
|
# @param order_by [::String]
|
229
223
|
# Optional. Specifies the ordering of results following syntax at
|
230
224
|
# https://cloud.google.com/apis/design/design_patterns#sorting_order.
|
225
|
+
# @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
|
226
|
+
# Optional. View for the returned GameServerCluster objects. When `FULL` is
|
227
|
+
# specified, the `cluster_state` field is also returned in the
|
228
|
+
# GameServerCluster object, which includes the state of the referenced
|
229
|
+
# Kubernetes cluster such as versions and provider info. The default/unset
|
230
|
+
# value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
|
231
|
+
# not return the `cluster_state` field.
|
231
232
|
#
|
232
233
|
# @yield [response, operation] Access the result along with the RPC operation
|
233
234
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerCluster>]
|
@@ -237,6 +238,27 @@ module Google
|
|
237
238
|
#
|
238
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
239
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/cloud/gaming/v1"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Cloud::Gaming::V1::ListGameServerClustersRequest.new
|
249
|
+
#
|
250
|
+
# # Call the list_game_server_clusters method.
|
251
|
+
# result = client.list_game_server_clusters request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
254
|
+
# # iterate over all elements by calling #each, and the enumerable
|
255
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
256
|
+
# # methods are also available for managing paging directly.
|
257
|
+
# result.each do |response|
|
258
|
+
# # Each element is of type ::Google::Cloud::Gaming::V1::GameServerCluster.
|
259
|
+
# p response
|
260
|
+
# end
|
261
|
+
#
|
240
262
|
def list_game_server_clusters request, options = nil
|
241
263
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
242
264
|
|
@@ -254,16 +276,20 @@ module Google
|
|
254
276
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
255
277
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
256
278
|
|
257
|
-
header_params = {
|
258
|
-
|
259
|
-
|
279
|
+
header_params = {}
|
280
|
+
if request.parent
|
281
|
+
header_params["parent"] = request.parent
|
282
|
+
end
|
283
|
+
|
260
284
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
261
285
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
262
286
|
|
263
287
|
options.apply_defaults timeout: @config.rpcs.list_game_server_clusters.timeout,
|
264
288
|
metadata: metadata,
|
265
289
|
retry_policy: @config.rpcs.list_game_server_clusters.retry_policy
|
266
|
-
|
290
|
+
|
291
|
+
options.apply_defaults timeout: @config.timeout,
|
292
|
+
metadata: @config.metadata,
|
267
293
|
retry_policy: @config.retry_policy
|
268
294
|
|
269
295
|
@game_server_clusters_service_stub.call_rpc :list_game_server_clusters, request, options: options do |response, operation|
|
@@ -288,15 +314,21 @@ module Google
|
|
288
314
|
# @param options [::Gapic::CallOptions, ::Hash]
|
289
315
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
290
316
|
#
|
291
|
-
# @overload get_game_server_cluster(name: nil)
|
317
|
+
# @overload get_game_server_cluster(name: nil, view: nil)
|
292
318
|
# Pass arguments to `get_game_server_cluster` via keyword arguments. Note that at
|
293
319
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
294
320
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
295
321
|
#
|
296
322
|
# @param name [::String]
|
297
|
-
# Required. The name of the game server cluster to retrieve
|
298
|
-
#
|
323
|
+
# Required. The name of the game server cluster to retrieve, in the following form:
|
299
324
|
# `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
|
325
|
+
# @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
|
326
|
+
# Optional. View for the returned GameServerCluster objects. When `FULL` is
|
327
|
+
# specified, the `cluster_state` field is also returned in the
|
328
|
+
# GameServerCluster object, which includes the state of the referenced
|
329
|
+
# Kubernetes cluster such as versions and provider info. The default/unset
|
330
|
+
# value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
|
331
|
+
# not return the `cluster_state` field.
|
300
332
|
#
|
301
333
|
# @yield [response, operation] Access the result along with the RPC operation
|
302
334
|
# @yieldparam response [::Google::Cloud::Gaming::V1::GameServerCluster]
|
@@ -306,6 +338,21 @@ module Google
|
|
306
338
|
#
|
307
339
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
308
340
|
#
|
341
|
+
# @example Basic example
|
342
|
+
# require "google/cloud/gaming/v1"
|
343
|
+
#
|
344
|
+
# # Create a client object. The client can be reused for multiple calls.
|
345
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
346
|
+
#
|
347
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
348
|
+
# request = Google::Cloud::Gaming::V1::GetGameServerClusterRequest.new
|
349
|
+
#
|
350
|
+
# # Call the get_game_server_cluster method.
|
351
|
+
# result = client.get_game_server_cluster request
|
352
|
+
#
|
353
|
+
# # The returned object is of type Google::Cloud::Gaming::V1::GameServerCluster.
|
354
|
+
# p result
|
355
|
+
#
|
309
356
|
def get_game_server_cluster request, options = nil
|
310
357
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
311
358
|
|
@@ -323,16 +370,20 @@ module Google
|
|
323
370
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
324
371
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
325
372
|
|
326
|
-
header_params = {
|
327
|
-
|
328
|
-
|
373
|
+
header_params = {}
|
374
|
+
if request.name
|
375
|
+
header_params["name"] = request.name
|
376
|
+
end
|
377
|
+
|
329
378
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
330
379
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
331
380
|
|
332
381
|
options.apply_defaults timeout: @config.rpcs.get_game_server_cluster.timeout,
|
333
382
|
metadata: metadata,
|
334
383
|
retry_policy: @config.rpcs.get_game_server_cluster.retry_policy
|
335
|
-
|
384
|
+
|
385
|
+
options.apply_defaults timeout: @config.timeout,
|
386
|
+
metadata: @config.metadata,
|
336
387
|
retry_policy: @config.retry_policy
|
337
388
|
|
338
389
|
@game_server_clusters_service_stub.call_rpc :get_game_server_cluster, request, options: options do |response, operation|
|
@@ -362,7 +413,7 @@ module Google
|
|
362
413
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
363
414
|
#
|
364
415
|
# @param parent [::String]
|
365
|
-
# Required. The parent resource name
|
416
|
+
# Required. The parent resource name, in the following form:
|
366
417
|
# `projects/{project}/locations/{location}/realms/{realm-id}`.
|
367
418
|
# @param game_server_cluster_id [::String]
|
368
419
|
# Required. The ID of the game server cluster resource to be created.
|
@@ -377,6 +428,28 @@ module Google
|
|
377
428
|
#
|
378
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
379
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/cloud/gaming/v1"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Cloud::Gaming::V1::CreateGameServerClusterRequest.new
|
439
|
+
#
|
440
|
+
# # Call the create_game_server_cluster method.
|
441
|
+
# result = client.create_game_server_cluster request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
444
|
+
# # object to check the status of an operation, cancel it, or wait
|
445
|
+
# # for results. Here is how to block until completion:
|
446
|
+
# result.wait_until_done! timeout: 60
|
447
|
+
# if result.response?
|
448
|
+
# p result.response
|
449
|
+
# else
|
450
|
+
# puts "Error!"
|
451
|
+
# end
|
452
|
+
#
|
380
453
|
def create_game_server_cluster request, options = nil
|
381
454
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
382
455
|
|
@@ -394,16 +467,20 @@ module Google
|
|
394
467
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
395
468
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
396
469
|
|
397
|
-
header_params = {
|
398
|
-
|
399
|
-
|
470
|
+
header_params = {}
|
471
|
+
if request.parent
|
472
|
+
header_params["parent"] = request.parent
|
473
|
+
end
|
474
|
+
|
400
475
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
401
476
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
402
477
|
|
403
478
|
options.apply_defaults timeout: @config.rpcs.create_game_server_cluster.timeout,
|
404
479
|
metadata: metadata,
|
405
480
|
retry_policy: @config.rpcs.create_game_server_cluster.retry_policy
|
406
|
-
|
481
|
+
|
482
|
+
options.apply_defaults timeout: @config.timeout,
|
483
|
+
metadata: @config.metadata,
|
407
484
|
retry_policy: @config.retry_policy
|
408
485
|
|
409
486
|
@game_server_clusters_service_stub.call_rpc :create_game_server_cluster, request, options: options do |response, operation|
|
@@ -429,13 +506,13 @@ module Google
|
|
429
506
|
# @param options [::Gapic::CallOptions, ::Hash]
|
430
507
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
431
508
|
#
|
432
|
-
# @overload preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil)
|
509
|
+
# @overload preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil, view: nil)
|
433
510
|
# Pass arguments to `preview_create_game_server_cluster` via keyword arguments. Note that at
|
434
511
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
435
512
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
436
513
|
#
|
437
514
|
# @param parent [::String]
|
438
|
-
# Required. The parent resource name
|
515
|
+
# Required. The parent resource name, in the following form:
|
439
516
|
# `projects/{project}/locations/{location}/realms/{realm}`.
|
440
517
|
# @param game_server_cluster_id [::String]
|
441
518
|
# Required. The ID of the game server cluster resource to be created.
|
@@ -443,6 +520,9 @@ module Google
|
|
443
520
|
# Required. The game server cluster resource to be created.
|
444
521
|
# @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
|
445
522
|
# Optional. The target timestamp to compute the preview.
|
523
|
+
# @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
|
524
|
+
# Optional. This field is deprecated, preview will always return
|
525
|
+
# KubernetesClusterState.
|
446
526
|
#
|
447
527
|
# @yield [response, operation] Access the result along with the RPC operation
|
448
528
|
# @yieldparam response [::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse]
|
@@ -452,6 +532,21 @@ module Google
|
|
452
532
|
#
|
453
533
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
454
534
|
#
|
535
|
+
# @example Basic example
|
536
|
+
# require "google/cloud/gaming/v1"
|
537
|
+
#
|
538
|
+
# # Create a client object. The client can be reused for multiple calls.
|
539
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
540
|
+
#
|
541
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
542
|
+
# request = Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterRequest.new
|
543
|
+
#
|
544
|
+
# # Call the preview_create_game_server_cluster method.
|
545
|
+
# result = client.preview_create_game_server_cluster request
|
546
|
+
#
|
547
|
+
# # The returned object is of type Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse.
|
548
|
+
# p result
|
549
|
+
#
|
455
550
|
def preview_create_game_server_cluster request, options = nil
|
456
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
457
552
|
|
@@ -469,16 +564,20 @@ module Google
|
|
469
564
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
470
565
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
471
566
|
|
472
|
-
header_params = {
|
473
|
-
|
474
|
-
|
567
|
+
header_params = {}
|
568
|
+
if request.parent
|
569
|
+
header_params["parent"] = request.parent
|
570
|
+
end
|
571
|
+
|
475
572
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
476
573
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
477
574
|
|
478
575
|
options.apply_defaults timeout: @config.rpcs.preview_create_game_server_cluster.timeout,
|
479
576
|
metadata: metadata,
|
480
577
|
retry_policy: @config.rpcs.preview_create_game_server_cluster.retry_policy
|
481
|
-
|
578
|
+
|
579
|
+
options.apply_defaults timeout: @config.timeout,
|
580
|
+
metadata: @config.metadata,
|
482
581
|
retry_policy: @config.retry_policy
|
483
582
|
|
484
583
|
@game_server_clusters_service_stub.call_rpc :preview_create_game_server_cluster, request, options: options do |response, operation|
|
@@ -508,7 +607,7 @@ module Google
|
|
508
607
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
509
608
|
#
|
510
609
|
# @param name [::String]
|
511
|
-
# Required. The name of the game server cluster to delete
|
610
|
+
# Required. The name of the game server cluster to delete, in the following form:
|
512
611
|
# `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
|
513
612
|
#
|
514
613
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -519,6 +618,28 @@ module Google
|
|
519
618
|
#
|
520
619
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
521
620
|
#
|
621
|
+
# @example Basic example
|
622
|
+
# require "google/cloud/gaming/v1"
|
623
|
+
#
|
624
|
+
# # Create a client object. The client can be reused for multiple calls.
|
625
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
626
|
+
#
|
627
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
628
|
+
# request = Google::Cloud::Gaming::V1::DeleteGameServerClusterRequest.new
|
629
|
+
#
|
630
|
+
# # Call the delete_game_server_cluster method.
|
631
|
+
# result = client.delete_game_server_cluster request
|
632
|
+
#
|
633
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
634
|
+
# # object to check the status of an operation, cancel it, or wait
|
635
|
+
# # for results. Here is how to block until completion:
|
636
|
+
# result.wait_until_done! timeout: 60
|
637
|
+
# if result.response?
|
638
|
+
# p result.response
|
639
|
+
# else
|
640
|
+
# puts "Error!"
|
641
|
+
# end
|
642
|
+
#
|
522
643
|
def delete_game_server_cluster request, options = nil
|
523
644
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
524
645
|
|
@@ -536,16 +657,20 @@ module Google
|
|
536
657
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
537
658
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
538
659
|
|
539
|
-
header_params = {
|
540
|
-
|
541
|
-
|
660
|
+
header_params = {}
|
661
|
+
if request.name
|
662
|
+
header_params["name"] = request.name
|
663
|
+
end
|
664
|
+
|
542
665
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
543
666
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
544
667
|
|
545
668
|
options.apply_defaults timeout: @config.rpcs.delete_game_server_cluster.timeout,
|
546
669
|
metadata: metadata,
|
547
670
|
retry_policy: @config.rpcs.delete_game_server_cluster.retry_policy
|
548
|
-
|
671
|
+
|
672
|
+
options.apply_defaults timeout: @config.timeout,
|
673
|
+
metadata: @config.metadata,
|
549
674
|
retry_policy: @config.retry_policy
|
550
675
|
|
551
676
|
@game_server_clusters_service_stub.call_rpc :delete_game_server_cluster, request, options: options do |response, operation|
|
@@ -576,7 +701,7 @@ module Google
|
|
576
701
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
577
702
|
#
|
578
703
|
# @param name [::String]
|
579
|
-
# Required. The name of the game server cluster to delete
|
704
|
+
# Required. The name of the game server cluster to delete, in the following form:
|
580
705
|
# `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
|
581
706
|
# @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
|
582
707
|
# Optional. The target timestamp to compute the preview.
|
@@ -589,6 +714,21 @@ module Google
|
|
589
714
|
#
|
590
715
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
591
716
|
#
|
717
|
+
# @example Basic example
|
718
|
+
# require "google/cloud/gaming/v1"
|
719
|
+
#
|
720
|
+
# # Create a client object. The client can be reused for multiple calls.
|
721
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
722
|
+
#
|
723
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
724
|
+
# request = Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterRequest.new
|
725
|
+
#
|
726
|
+
# # Call the preview_delete_game_server_cluster method.
|
727
|
+
# result = client.preview_delete_game_server_cluster request
|
728
|
+
#
|
729
|
+
# # The returned object is of type Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse.
|
730
|
+
# p result
|
731
|
+
#
|
592
732
|
def preview_delete_game_server_cluster request, options = nil
|
593
733
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
594
734
|
|
@@ -606,16 +746,20 @@ module Google
|
|
606
746
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
607
747
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
608
748
|
|
609
|
-
header_params = {
|
610
|
-
|
611
|
-
|
749
|
+
header_params = {}
|
750
|
+
if request.name
|
751
|
+
header_params["name"] = request.name
|
752
|
+
end
|
753
|
+
|
612
754
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
613
755
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
614
756
|
|
615
757
|
options.apply_defaults timeout: @config.rpcs.preview_delete_game_server_cluster.timeout,
|
616
758
|
metadata: metadata,
|
617
759
|
retry_policy: @config.rpcs.preview_delete_game_server_cluster.retry_policy
|
618
|
-
|
760
|
+
|
761
|
+
options.apply_defaults timeout: @config.timeout,
|
762
|
+
metadata: @config.metadata,
|
619
763
|
retry_policy: @config.retry_policy
|
620
764
|
|
621
765
|
@game_server_clusters_service_stub.call_rpc :preview_delete_game_server_cluster, request, options: options do |response, operation|
|
@@ -650,10 +794,7 @@ module Google
|
|
650
794
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
651
795
|
# Required. Mask of fields to update. At least one path must be supplied in
|
652
796
|
# this field. For the `FieldMask` definition, see
|
653
|
-
#
|
654
|
-
# https:
|
655
|
-
# //developers.google.com/protocol-buffers
|
656
|
-
# // /docs/reference/google.protobuf#fieldmask
|
797
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
657
798
|
#
|
658
799
|
# @yield [response, operation] Access the result along with the RPC operation
|
659
800
|
# @yieldparam response [::Gapic::Operation]
|
@@ -663,6 +804,28 @@ module Google
|
|
663
804
|
#
|
664
805
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
665
806
|
#
|
807
|
+
# @example Basic example
|
808
|
+
# require "google/cloud/gaming/v1"
|
809
|
+
#
|
810
|
+
# # Create a client object. The client can be reused for multiple calls.
|
811
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
812
|
+
#
|
813
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
814
|
+
# request = Google::Cloud::Gaming::V1::UpdateGameServerClusterRequest.new
|
815
|
+
#
|
816
|
+
# # Call the update_game_server_cluster method.
|
817
|
+
# result = client.update_game_server_cluster request
|
818
|
+
#
|
819
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
820
|
+
# # object to check the status of an operation, cancel it, or wait
|
821
|
+
# # for results. Here is how to block until completion:
|
822
|
+
# result.wait_until_done! timeout: 60
|
823
|
+
# if result.response?
|
824
|
+
# p result.response
|
825
|
+
# else
|
826
|
+
# puts "Error!"
|
827
|
+
# end
|
828
|
+
#
|
666
829
|
def update_game_server_cluster request, options = nil
|
667
830
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
668
831
|
|
@@ -680,16 +843,20 @@ module Google
|
|
680
843
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
681
844
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
682
845
|
|
683
|
-
header_params = {
|
684
|
-
|
685
|
-
|
846
|
+
header_params = {}
|
847
|
+
if request.game_server_cluster&.name
|
848
|
+
header_params["game_server_cluster.name"] = request.game_server_cluster.name
|
849
|
+
end
|
850
|
+
|
686
851
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
687
852
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
688
853
|
|
689
854
|
options.apply_defaults timeout: @config.rpcs.update_game_server_cluster.timeout,
|
690
855
|
metadata: metadata,
|
691
856
|
retry_policy: @config.rpcs.update_game_server_cluster.retry_policy
|
692
|
-
|
857
|
+
|
858
|
+
options.apply_defaults timeout: @config.timeout,
|
859
|
+
metadata: @config.metadata,
|
693
860
|
retry_policy: @config.retry_policy
|
694
861
|
|
695
862
|
@game_server_clusters_service_stub.call_rpc :update_game_server_cluster, request, options: options do |response, operation|
|
@@ -725,10 +892,7 @@ module Google
|
|
725
892
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
726
893
|
# Required. Mask of fields to update. At least one path must be supplied in
|
727
894
|
# this field. For the `FieldMask` definition, see
|
728
|
-
#
|
729
|
-
# https:
|
730
|
-
# //developers.google.com/protocol-buffers
|
731
|
-
# // /docs/reference/google.protobuf#fieldmask
|
895
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
732
896
|
# @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
|
733
897
|
# Optional. The target timestamp to compute the preview.
|
734
898
|
#
|
@@ -740,6 +904,21 @@ module Google
|
|
740
904
|
#
|
741
905
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
742
906
|
#
|
907
|
+
# @example Basic example
|
908
|
+
# require "google/cloud/gaming/v1"
|
909
|
+
#
|
910
|
+
# # Create a client object. The client can be reused for multiple calls.
|
911
|
+
# client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
|
912
|
+
#
|
913
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
914
|
+
# request = Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterRequest.new
|
915
|
+
#
|
916
|
+
# # Call the preview_update_game_server_cluster method.
|
917
|
+
# result = client.preview_update_game_server_cluster request
|
918
|
+
#
|
919
|
+
# # The returned object is of type Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse.
|
920
|
+
# p result
|
921
|
+
#
|
743
922
|
def preview_update_game_server_cluster request, options = nil
|
744
923
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
745
924
|
|
@@ -757,16 +936,20 @@ module Google
|
|
757
936
|
gapic_version: ::Google::Cloud::Gaming::V1::VERSION
|
758
937
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
759
938
|
|
760
|
-
header_params = {
|
761
|
-
|
762
|
-
|
939
|
+
header_params = {}
|
940
|
+
if request.game_server_cluster&.name
|
941
|
+
header_params["game_server_cluster.name"] = request.game_server_cluster.name
|
942
|
+
end
|
943
|
+
|
763
944
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
764
945
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
765
946
|
|
766
947
|
options.apply_defaults timeout: @config.rpcs.preview_update_game_server_cluster.timeout,
|
767
948
|
metadata: metadata,
|
768
949
|
retry_policy: @config.rpcs.preview_update_game_server_cluster.retry_policy
|
769
|
-
|
950
|
+
|
951
|
+
options.apply_defaults timeout: @config.timeout,
|
952
|
+
metadata: @config.metadata,
|
770
953
|
retry_policy: @config.retry_policy
|
771
954
|
|
772
955
|
@game_server_clusters_service_stub.call_rpc :preview_update_game_server_cluster, request, options: options do |response, operation|
|
@@ -790,22 +973,21 @@ module Google
|
|
790
973
|
# Configuration can be applied globally to all clients, or to a single client
|
791
974
|
# on construction.
|
792
975
|
#
|
793
|
-
#
|
794
|
-
#
|
795
|
-
#
|
796
|
-
# to 20 seconds,
|
797
|
-
#
|
798
|
-
#
|
799
|
-
#
|
800
|
-
#
|
801
|
-
#
|
802
|
-
#
|
803
|
-
#
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
# end
|
976
|
+
# @example
|
977
|
+
#
|
978
|
+
# # Modify the global config, setting the timeout for
|
979
|
+
# # list_game_server_clusters to 20 seconds,
|
980
|
+
# # and all remaining timeouts to 10 seconds.
|
981
|
+
# ::Google::Cloud::Gaming::V1::GameServerClustersService::Client.configure do |config|
|
982
|
+
# config.timeout = 10.0
|
983
|
+
# config.rpcs.list_game_server_clusters.timeout = 20.0
|
984
|
+
# end
|
985
|
+
#
|
986
|
+
# # Apply the above configuration only to a new client.
|
987
|
+
# client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Client.new do |config|
|
988
|
+
# config.timeout = 10.0
|
989
|
+
# config.rpcs.list_game_server_clusters.timeout = 20.0
|
990
|
+
# end
|
809
991
|
#
|
810
992
|
# @!attribute [rw] endpoint
|
811
993
|
# The hostname or hostname:port of the service endpoint.
|