google-cloud-gaming-v1 0.3.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/README.md +1 -1
  4. data/lib/google/cloud/gaming/v1/common_pb.rb +2 -2
  5. data/lib/google/cloud/gaming/v1/game_server_clusters_pb.rb +33 -2
  6. data/lib/google/cloud/gaming/v1/game_server_clusters_service/client.rb +275 -108
  7. data/lib/google/cloud/gaming/v1/game_server_clusters_service/operations.rb +149 -37
  8. data/lib/google/cloud/gaming/v1/game_server_clusters_service_pb.rb +2 -2
  9. data/lib/google/cloud/gaming/v1/game_server_configs_pb.rb +2 -2
  10. data/lib/google/cloud/gaming/v1/game_server_configs_service/client.rb +148 -69
  11. data/lib/google/cloud/gaming/v1/game_server_configs_service/operations.rb +149 -37
  12. data/lib/google/cloud/gaming/v1/game_server_configs_service_pb.rb +2 -2
  13. data/lib/google/cloud/gaming/v1/game_server_deployments_pb.rb +2 -2
  14. data/lib/google/cloud/gaming/v1/game_server_deployments_service/client.rb +286 -116
  15. data/lib/google/cloud/gaming/v1/game_server_deployments_service/operations.rb +149 -37
  16. data/lib/google/cloud/gaming/v1/game_server_deployments_service_pb.rb +2 -2
  17. data/lib/google/cloud/gaming/v1/realms_pb.rb +2 -2
  18. data/lib/google/cloud/gaming/v1/realms_service/client.rb +204 -85
  19. data/lib/google/cloud/gaming/v1/realms_service/operations.rb +149 -37
  20. data/lib/google/cloud/gaming/v1/realms_service_pb.rb +2 -2
  21. data/lib/google/cloud/gaming/v1/version.rb +1 -1
  22. data/proto_docs/google/api/field_behavior.rb +7 -1
  23. data/proto_docs/google/cloud/gaming/v1/common.rb +0 -3
  24. data/proto_docs/google/cloud/gaming/v1/game_server_clusters.rb +117 -19
  25. data/proto_docs/google/cloud/gaming/v1/game_server_configs.rb +5 -11
  26. data/proto_docs/google/cloud/gaming/v1/game_server_deployments.rb +12 -28
  27. data/proto_docs/google/cloud/gaming/v1/realms.rb +7 -13
  28. metadata +4 -4
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::Gaming::V1::GameServerDeploymentsService::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 GameServerDeploymentsService clients:
48
- #
49
- # ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all GameServerDeploymentsService clients
48
+ # ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::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,18 +67,12 @@ module Google
68
67
 
69
68
  default_config.rpcs.list_game_server_deployments.timeout = 60.0
70
69
  default_config.rpcs.list_game_server_deployments.retry_policy = {
71
- initial_delay: 1.0,
72
- max_delay: 10.0,
73
- multiplier: 1.3,
74
- retry_codes: [14]
70
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
75
71
  }
76
72
 
77
73
  default_config.rpcs.get_game_server_deployment.timeout = 60.0
78
74
  default_config.rpcs.get_game_server_deployment.retry_policy = {
79
- initial_delay: 1.0,
80
- max_delay: 10.0,
81
- multiplier: 1.3,
82
- retry_codes: [14]
75
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
76
  }
84
77
 
85
78
  default_config.rpcs.create_game_server_deployment.timeout = 60.0
@@ -90,28 +83,19 @@ module Google
90
83
 
91
84
  default_config.rpcs.get_game_server_deployment_rollout.timeout = 60.0
92
85
  default_config.rpcs.get_game_server_deployment_rollout.retry_policy = {
93
- initial_delay: 1.0,
94
- max_delay: 10.0,
95
- multiplier: 1.3,
96
- retry_codes: [14]
86
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
97
87
  }
98
88
 
99
89
  default_config.rpcs.update_game_server_deployment_rollout.timeout = 60.0
100
90
 
101
91
  default_config.rpcs.preview_game_server_deployment_rollout.timeout = 60.0
102
92
  default_config.rpcs.preview_game_server_deployment_rollout.retry_policy = {
103
- initial_delay: 1.0,
104
- max_delay: 10.0,
105
- multiplier: 1.3,
106
- retry_codes: [14]
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
107
94
  }
108
95
 
109
- default_config.rpcs.fetch_deployment_state.timeout = 120.0
96
+ default_config.rpcs.fetch_deployment_state.timeout = 60.0
110
97
  default_config.rpcs.fetch_deployment_state.retry_policy = {
111
- initial_delay: 1.0,
112
- max_delay: 10.0,
113
- multiplier: 1.3,
114
- retry_codes: [14]
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
115
99
  }
116
100
 
117
101
  default_config
@@ -143,19 +127,15 @@ module Google
143
127
  ##
144
128
  # Create a new GameServerDeploymentsService client object.
145
129
  #
146
- # ## Examples
147
- #
148
- # To create a new GameServerDeploymentsService client with the default
149
- # configuration:
150
- #
151
- # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
130
+ # @example
152
131
  #
153
- # To create a new GameServerDeploymentsService client with a custom
154
- # configuration:
132
+ # # Create a client using the default configuration
133
+ # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
155
134
  #
156
- # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new do |config|
157
- # config.timeout = 10.0
158
- # end
135
+ # # Create a client using a custom configuration
136
+ # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new do |config|
137
+ # config.timeout = 10.0
138
+ # end
159
139
  #
160
140
  # @yield [config] Configure the GameServerDeploymentsService client.
161
141
  # @yieldparam config [Client::Configuration]
@@ -175,14 +155,13 @@ module Google
175
155
 
176
156
  # Create credentials
177
157
  credentials = @config.credentials
178
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
158
+ # Use self-signed JWT if the endpoint is unchanged from default,
179
159
  # but only if the default endpoint does not have a region prefix.
180
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
181
- @config.endpoint == Client.configure.endpoint &&
160
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
182
161
  !@config.endpoint.split(".").first.include?("-")
183
162
  credentials ||= Credentials.default scope: @config.scope,
184
163
  enable_self_signed_jwt: enable_self_signed_jwt
185
- if credentials.is_a?(String) || credentials.is_a?(Hash)
164
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
186
165
  credentials = Credentials.new credentials, scope: @config.scope
187
166
  end
188
167
  @quota_project_id = @config.quota_project
@@ -230,7 +209,7 @@ module Google
230
209
  # the default parameter values, pass an empty Hash as a request object (see above).
231
210
  #
232
211
  # @param parent [::String]
233
- # Required. The parent resource name. Uses the form:
212
+ # Required. The parent resource name, in the following form:
234
213
  # `projects/{project}/locations/{location}`.
235
214
  # @param page_size [::Integer]
236
215
  # Optional. The maximum number of items to return. If unspecified, the server
@@ -255,6 +234,27 @@ module Google
255
234
  #
256
235
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
257
236
  #
237
+ # @example Basic example
238
+ # require "google/cloud/gaming/v1"
239
+ #
240
+ # # Create a client object. The client can be reused for multiple calls.
241
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
242
+ #
243
+ # # Create a request. To set request fields, pass in keyword arguments.
244
+ # request = Google::Cloud::Gaming::V1::ListGameServerDeploymentsRequest.new
245
+ #
246
+ # # Call the list_game_server_deployments method.
247
+ # result = client.list_game_server_deployments request
248
+ #
249
+ # # The returned object is of type Gapic::PagedEnumerable. You can
250
+ # # iterate over all elements by calling #each, and the enumerable
251
+ # # will lazily make API calls to fetch subsequent pages. Other
252
+ # # methods are also available for managing paging directly.
253
+ # result.each do |response|
254
+ # # Each element is of type ::Google::Cloud::Gaming::V1::GameServerDeployment.
255
+ # p response
256
+ # end
257
+ #
258
258
  def list_game_server_deployments request, options = nil
259
259
  raise ::ArgumentError, "request must be provided" if request.nil?
260
260
 
@@ -272,16 +272,20 @@ module Google
272
272
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
273
273
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
274
 
275
- header_params = {
276
- "parent" => request.parent
277
- }
275
+ header_params = {}
276
+ if request.parent
277
+ header_params["parent"] = request.parent
278
+ end
279
+
278
280
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
279
281
  metadata[:"x-goog-request-params"] ||= request_params_header
280
282
 
281
283
  options.apply_defaults timeout: @config.rpcs.list_game_server_deployments.timeout,
282
284
  metadata: metadata,
283
285
  retry_policy: @config.rpcs.list_game_server_deployments.retry_policy
284
- options.apply_defaults metadata: @config.metadata,
286
+
287
+ options.apply_defaults timeout: @config.timeout,
288
+ metadata: @config.metadata,
285
289
  retry_policy: @config.retry_policy
286
290
 
287
291
  @game_server_deployments_service_stub.call_rpc :list_game_server_deployments, request, options: options do |response, operation|
@@ -312,8 +316,7 @@ module Google
312
316
  # the default parameter values, pass an empty Hash as a request object (see above).
313
317
  #
314
318
  # @param name [::String]
315
- # Required. The name of the game server delpoyment to retrieve. Uses the form:
316
- #
319
+ # Required. The name of the game server delpoyment to retrieve, in the following form:
317
320
  # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
318
321
  #
319
322
  # @yield [response, operation] Access the result along with the RPC operation
@@ -324,6 +327,21 @@ module Google
324
327
  #
325
328
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
326
329
  #
330
+ # @example Basic example
331
+ # require "google/cloud/gaming/v1"
332
+ #
333
+ # # Create a client object. The client can be reused for multiple calls.
334
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
335
+ #
336
+ # # Create a request. To set request fields, pass in keyword arguments.
337
+ # request = Google::Cloud::Gaming::V1::GetGameServerDeploymentRequest.new
338
+ #
339
+ # # Call the get_game_server_deployment method.
340
+ # result = client.get_game_server_deployment request
341
+ #
342
+ # # The returned object is of type Google::Cloud::Gaming::V1::GameServerDeployment.
343
+ # p result
344
+ #
327
345
  def get_game_server_deployment request, options = nil
328
346
  raise ::ArgumentError, "request must be provided" if request.nil?
329
347
 
@@ -341,16 +359,20 @@ module Google
341
359
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
342
360
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
343
361
 
344
- header_params = {
345
- "name" => request.name
346
- }
362
+ header_params = {}
363
+ if request.name
364
+ header_params["name"] = request.name
365
+ end
366
+
347
367
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
348
368
  metadata[:"x-goog-request-params"] ||= request_params_header
349
369
 
350
370
  options.apply_defaults timeout: @config.rpcs.get_game_server_deployment.timeout,
351
371
  metadata: metadata,
352
372
  retry_policy: @config.rpcs.get_game_server_deployment.retry_policy
353
- options.apply_defaults metadata: @config.metadata,
373
+
374
+ options.apply_defaults timeout: @config.timeout,
375
+ metadata: @config.metadata,
354
376
  retry_policy: @config.retry_policy
355
377
 
356
378
  @game_server_deployments_service_stub.call_rpc :get_game_server_deployment, request, options: options do |response, operation|
@@ -380,7 +402,7 @@ module Google
380
402
  # the default parameter values, pass an empty Hash as a request object (see above).
381
403
  #
382
404
  # @param parent [::String]
383
- # Required. The parent resource name. Uses the form:
405
+ # Required. The parent resource name, in the following form:
384
406
  # `projects/{project}/locations/{location}`.
385
407
  # @param deployment_id [::String]
386
408
  # Required. The ID of the game server delpoyment resource to be created.
@@ -395,6 +417,28 @@ module Google
395
417
  #
396
418
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
397
419
  #
420
+ # @example Basic example
421
+ # require "google/cloud/gaming/v1"
422
+ #
423
+ # # Create a client object. The client can be reused for multiple calls.
424
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
425
+ #
426
+ # # Create a request. To set request fields, pass in keyword arguments.
427
+ # request = Google::Cloud::Gaming::V1::CreateGameServerDeploymentRequest.new
428
+ #
429
+ # # Call the create_game_server_deployment method.
430
+ # result = client.create_game_server_deployment request
431
+ #
432
+ # # The returned object is of type Gapic::Operation. You can use this
433
+ # # object to check the status of an operation, cancel it, or wait
434
+ # # for results. Here is how to block until completion:
435
+ # result.wait_until_done! timeout: 60
436
+ # if result.response?
437
+ # p result.response
438
+ # else
439
+ # puts "Error!"
440
+ # end
441
+ #
398
442
  def create_game_server_deployment request, options = nil
399
443
  raise ::ArgumentError, "request must be provided" if request.nil?
400
444
 
@@ -412,16 +456,20 @@ module Google
412
456
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
413
457
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
414
458
 
415
- header_params = {
416
- "parent" => request.parent
417
- }
459
+ header_params = {}
460
+ if request.parent
461
+ header_params["parent"] = request.parent
462
+ end
463
+
418
464
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
419
465
  metadata[:"x-goog-request-params"] ||= request_params_header
420
466
 
421
467
  options.apply_defaults timeout: @config.rpcs.create_game_server_deployment.timeout,
422
468
  metadata: metadata,
423
469
  retry_policy: @config.rpcs.create_game_server_deployment.retry_policy
424
- options.apply_defaults metadata: @config.metadata,
470
+
471
+ options.apply_defaults timeout: @config.timeout,
472
+ metadata: @config.metadata,
425
473
  retry_policy: @config.retry_policy
426
474
 
427
475
  @game_server_deployments_service_stub.call_rpc :create_game_server_deployment, request, options: options do |response, operation|
@@ -452,8 +500,7 @@ module Google
452
500
  # the default parameter values, pass an empty Hash as a request object (see above).
453
501
  #
454
502
  # @param name [::String]
455
- # Required. The name of the game server delpoyment to delete. Uses the form:
456
- #
503
+ # Required. The name of the game server delpoyment to delete, in the following form:
457
504
  # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
458
505
  #
459
506
  # @yield [response, operation] Access the result along with the RPC operation
@@ -464,6 +511,28 @@ module Google
464
511
  #
465
512
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
466
513
  #
514
+ # @example Basic example
515
+ # require "google/cloud/gaming/v1"
516
+ #
517
+ # # Create a client object. The client can be reused for multiple calls.
518
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
519
+ #
520
+ # # Create a request. To set request fields, pass in keyword arguments.
521
+ # request = Google::Cloud::Gaming::V1::DeleteGameServerDeploymentRequest.new
522
+ #
523
+ # # Call the delete_game_server_deployment method.
524
+ # result = client.delete_game_server_deployment request
525
+ #
526
+ # # The returned object is of type Gapic::Operation. You can use this
527
+ # # object to check the status of an operation, cancel it, or wait
528
+ # # for results. Here is how to block until completion:
529
+ # result.wait_until_done! timeout: 60
530
+ # if result.response?
531
+ # p result.response
532
+ # else
533
+ # puts "Error!"
534
+ # end
535
+ #
467
536
  def delete_game_server_deployment request, options = nil
468
537
  raise ::ArgumentError, "request must be provided" if request.nil?
469
538
 
@@ -481,16 +550,20 @@ module Google
481
550
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
482
551
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
483
552
 
484
- header_params = {
485
- "name" => request.name
486
- }
553
+ header_params = {}
554
+ if request.name
555
+ header_params["name"] = request.name
556
+ end
557
+
487
558
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
488
559
  metadata[:"x-goog-request-params"] ||= request_params_header
489
560
 
490
561
  options.apply_defaults timeout: @config.rpcs.delete_game_server_deployment.timeout,
491
562
  metadata: metadata,
492
563
  retry_policy: @config.rpcs.delete_game_server_deployment.retry_policy
493
- options.apply_defaults metadata: @config.metadata,
564
+
565
+ options.apply_defaults timeout: @config.timeout,
566
+ metadata: @config.metadata,
494
567
  retry_policy: @config.retry_policy
495
568
 
496
569
  @game_server_deployments_service_stub.call_rpc :delete_game_server_deployment, request, options: options do |response, operation|
@@ -526,10 +599,7 @@ module Google
526
599
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
527
600
  # Required. Mask of fields to update. At least one path must be supplied in
528
601
  # this field. For the `FieldMask` definition, see
529
- #
530
- # https:
531
- # //developers.google.com/protocol-buffers
532
- # // /docs/reference/google.protobuf#fieldmask
602
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
533
603
  #
534
604
  # @yield [response, operation] Access the result along with the RPC operation
535
605
  # @yieldparam response [::Gapic::Operation]
@@ -539,6 +609,28 @@ module Google
539
609
  #
540
610
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
541
611
  #
612
+ # @example Basic example
613
+ # require "google/cloud/gaming/v1"
614
+ #
615
+ # # Create a client object. The client can be reused for multiple calls.
616
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
617
+ #
618
+ # # Create a request. To set request fields, pass in keyword arguments.
619
+ # request = Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRequest.new
620
+ #
621
+ # # Call the update_game_server_deployment method.
622
+ # result = client.update_game_server_deployment request
623
+ #
624
+ # # The returned object is of type Gapic::Operation. You can use this
625
+ # # object to check the status of an operation, cancel it, or wait
626
+ # # for results. Here is how to block until completion:
627
+ # result.wait_until_done! timeout: 60
628
+ # if result.response?
629
+ # p result.response
630
+ # else
631
+ # puts "Error!"
632
+ # end
633
+ #
542
634
  def update_game_server_deployment request, options = nil
543
635
  raise ::ArgumentError, "request must be provided" if request.nil?
544
636
 
@@ -556,16 +648,20 @@ module Google
556
648
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
557
649
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
558
650
 
559
- header_params = {
560
- "game_server_deployment.name" => request.game_server_deployment.name
561
- }
651
+ header_params = {}
652
+ if request.game_server_deployment&.name
653
+ header_params["game_server_deployment.name"] = request.game_server_deployment.name
654
+ end
655
+
562
656
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
563
657
  metadata[:"x-goog-request-params"] ||= request_params_header
564
658
 
565
659
  options.apply_defaults timeout: @config.rpcs.update_game_server_deployment.timeout,
566
660
  metadata: metadata,
567
661
  retry_policy: @config.rpcs.update_game_server_deployment.retry_policy
568
- options.apply_defaults metadata: @config.metadata,
662
+
663
+ options.apply_defaults timeout: @config.timeout,
664
+ metadata: @config.metadata,
569
665
  retry_policy: @config.retry_policy
570
666
 
571
667
  @game_server_deployments_service_stub.call_rpc :update_game_server_deployment, request, options: options do |response, operation|
@@ -596,8 +692,7 @@ module Google
596
692
  # the default parameter values, pass an empty Hash as a request object (see above).
597
693
  #
598
694
  # @param name [::String]
599
- # Required. The name of the game server delpoyment to retrieve. Uses the form:
600
- #
695
+ # Required. The name of the game server delpoyment to retrieve, in the following form:
601
696
  # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
602
697
  #
603
698
  # @yield [response, operation] Access the result along with the RPC operation
@@ -608,6 +703,21 @@ module Google
608
703
  #
609
704
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
610
705
  #
706
+ # @example Basic example
707
+ # require "google/cloud/gaming/v1"
708
+ #
709
+ # # Create a client object. The client can be reused for multiple calls.
710
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
711
+ #
712
+ # # Create a request. To set request fields, pass in keyword arguments.
713
+ # request = Google::Cloud::Gaming::V1::GetGameServerDeploymentRolloutRequest.new
714
+ #
715
+ # # Call the get_game_server_deployment_rollout method.
716
+ # result = client.get_game_server_deployment_rollout request
717
+ #
718
+ # # The returned object is of type Google::Cloud::Gaming::V1::GameServerDeploymentRollout.
719
+ # p result
720
+ #
611
721
  def get_game_server_deployment_rollout request, options = nil
612
722
  raise ::ArgumentError, "request must be provided" if request.nil?
613
723
 
@@ -625,16 +735,20 @@ module Google
625
735
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
626
736
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
627
737
 
628
- header_params = {
629
- "name" => request.name
630
- }
738
+ header_params = {}
739
+ if request.name
740
+ header_params["name"] = request.name
741
+ end
742
+
631
743
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
632
744
  metadata[:"x-goog-request-params"] ||= request_params_header
633
745
 
634
746
  options.apply_defaults timeout: @config.rpcs.get_game_server_deployment_rollout.timeout,
635
747
  metadata: metadata,
636
748
  retry_policy: @config.rpcs.get_game_server_deployment_rollout.retry_policy
637
- options.apply_defaults metadata: @config.metadata,
749
+
750
+ options.apply_defaults timeout: @config.timeout,
751
+ metadata: @config.metadata,
638
752
  retry_policy: @config.retry_policy
639
753
 
640
754
  @game_server_deployments_service_stub.call_rpc :get_game_server_deployment_rollout, request, options: options do |response, operation|
@@ -674,10 +788,7 @@ module Google
674
788
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
675
789
  # Required. Mask of fields to update. At least one path must be supplied in
676
790
  # this field. For the `FieldMask` definition, see
677
- #
678
- # https:
679
- # //developers.google.com/protocol-buffers
680
- # // /docs/reference/google.protobuf#fieldmask
791
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
681
792
  #
682
793
  # @yield [response, operation] Access the result along with the RPC operation
683
794
  # @yieldparam response [::Gapic::Operation]
@@ -687,6 +798,28 @@ module Google
687
798
  #
688
799
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
689
800
  #
801
+ # @example Basic example
802
+ # require "google/cloud/gaming/v1"
803
+ #
804
+ # # Create a client object. The client can be reused for multiple calls.
805
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
806
+ #
807
+ # # Create a request. To set request fields, pass in keyword arguments.
808
+ # request = Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRolloutRequest.new
809
+ #
810
+ # # Call the update_game_server_deployment_rollout method.
811
+ # result = client.update_game_server_deployment_rollout request
812
+ #
813
+ # # The returned object is of type Gapic::Operation. You can use this
814
+ # # object to check the status of an operation, cancel it, or wait
815
+ # # for results. Here is how to block until completion:
816
+ # result.wait_until_done! timeout: 60
817
+ # if result.response?
818
+ # p result.response
819
+ # else
820
+ # puts "Error!"
821
+ # end
822
+ #
690
823
  def update_game_server_deployment_rollout request, options = nil
691
824
  raise ::ArgumentError, "request must be provided" if request.nil?
692
825
 
@@ -704,16 +837,20 @@ module Google
704
837
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
705
838
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
706
839
 
707
- header_params = {
708
- "rollout.name" => request.rollout.name
709
- }
840
+ header_params = {}
841
+ if request.rollout&.name
842
+ header_params["rollout.name"] = request.rollout.name
843
+ end
844
+
710
845
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
711
846
  metadata[:"x-goog-request-params"] ||= request_params_header
712
847
 
713
848
  options.apply_defaults timeout: @config.rpcs.update_game_server_deployment_rollout.timeout,
714
849
  metadata: metadata,
715
850
  retry_policy: @config.rpcs.update_game_server_deployment_rollout.retry_policy
716
- options.apply_defaults metadata: @config.metadata,
851
+
852
+ options.apply_defaults timeout: @config.timeout,
853
+ metadata: @config.metadata,
717
854
  retry_policy: @config.retry_policy
718
855
 
719
856
  @game_server_deployments_service_stub.call_rpc :update_game_server_deployment_rollout, request, options: options do |response, operation|
@@ -750,10 +887,7 @@ module Google
750
887
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
751
888
  # Optional. Mask of fields to update. At least one path must be supplied in
752
889
  # this field. For the `FieldMask` definition, see
753
- #
754
- # https:
755
- # //developers.google.com/protocol-buffers
756
- # // /docs/reference/google.protobuf#fieldmask
890
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
757
891
  # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
758
892
  # Optional. The target timestamp to compute the preview. Defaults to the immediately
759
893
  # after the proposed rollout completes.
@@ -766,6 +900,21 @@ module Google
766
900
  #
767
901
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
768
902
  #
903
+ # @example Basic example
904
+ # require "google/cloud/gaming/v1"
905
+ #
906
+ # # Create a client object. The client can be reused for multiple calls.
907
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
908
+ #
909
+ # # Create a request. To set request fields, pass in keyword arguments.
910
+ # request = Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutRequest.new
911
+ #
912
+ # # Call the preview_game_server_deployment_rollout method.
913
+ # result = client.preview_game_server_deployment_rollout request
914
+ #
915
+ # # The returned object is of type Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutResponse.
916
+ # p result
917
+ #
769
918
  def preview_game_server_deployment_rollout request, options = nil
770
919
  raise ::ArgumentError, "request must be provided" if request.nil?
771
920
 
@@ -783,16 +932,20 @@ module Google
783
932
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
784
933
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
785
934
 
786
- header_params = {
787
- "rollout.name" => request.rollout.name
788
- }
935
+ header_params = {}
936
+ if request.rollout&.name
937
+ header_params["rollout.name"] = request.rollout.name
938
+ end
939
+
789
940
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
790
941
  metadata[:"x-goog-request-params"] ||= request_params_header
791
942
 
792
943
  options.apply_defaults timeout: @config.rpcs.preview_game_server_deployment_rollout.timeout,
793
944
  metadata: metadata,
794
945
  retry_policy: @config.rpcs.preview_game_server_deployment_rollout.retry_policy
795
- options.apply_defaults metadata: @config.metadata,
946
+
947
+ options.apply_defaults timeout: @config.timeout,
948
+ metadata: @config.metadata,
796
949
  retry_policy: @config.retry_policy
797
950
 
798
951
  @game_server_deployments_service_stub.call_rpc :preview_game_server_deployment_rollout, request, options: options do |response, operation|
@@ -824,8 +977,7 @@ module Google
824
977
  # the default parameter values, pass an empty Hash as a request object (see above).
825
978
  #
826
979
  # @param name [::String]
827
- # Required. The name of the game server delpoyment. Uses the form:
828
- #
980
+ # Required. The name of the game server delpoyment, in the following form:
829
981
  # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
830
982
  #
831
983
  # @yield [response, operation] Access the result along with the RPC operation
@@ -836,6 +988,21 @@ module Google
836
988
  #
837
989
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
838
990
  #
991
+ # @example Basic example
992
+ # require "google/cloud/gaming/v1"
993
+ #
994
+ # # Create a client object. The client can be reused for multiple calls.
995
+ # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
996
+ #
997
+ # # Create a request. To set request fields, pass in keyword arguments.
998
+ # request = Google::Cloud::Gaming::V1::FetchDeploymentStateRequest.new
999
+ #
1000
+ # # Call the fetch_deployment_state method.
1001
+ # result = client.fetch_deployment_state request
1002
+ #
1003
+ # # The returned object is of type Google::Cloud::Gaming::V1::FetchDeploymentStateResponse.
1004
+ # p result
1005
+ #
839
1006
  def fetch_deployment_state request, options = nil
840
1007
  raise ::ArgumentError, "request must be provided" if request.nil?
841
1008
 
@@ -853,16 +1020,20 @@ module Google
853
1020
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
854
1021
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
855
1022
 
856
- header_params = {
857
- "name" => request.name
858
- }
1023
+ header_params = {}
1024
+ if request.name
1025
+ header_params["name"] = request.name
1026
+ end
1027
+
859
1028
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
860
1029
  metadata[:"x-goog-request-params"] ||= request_params_header
861
1030
 
862
1031
  options.apply_defaults timeout: @config.rpcs.fetch_deployment_state.timeout,
863
1032
  metadata: metadata,
864
1033
  retry_policy: @config.rpcs.fetch_deployment_state.retry_policy
865
- options.apply_defaults metadata: @config.metadata,
1034
+
1035
+ options.apply_defaults timeout: @config.timeout,
1036
+ metadata: @config.metadata,
866
1037
  retry_policy: @config.retry_policy
867
1038
 
868
1039
  @game_server_deployments_service_stub.call_rpc :fetch_deployment_state, request, options: options do |response, operation|
@@ -886,22 +1057,21 @@ module Google
886
1057
  # Configuration can be applied globally to all clients, or to a single client
887
1058
  # on construction.
888
1059
  #
889
- # # Examples
890
- #
891
- # To modify the global config, setting the timeout for list_game_server_deployments
892
- # to 20 seconds, and all remaining timeouts to 10 seconds:
893
- #
894
- # ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.configure do |config|
895
- # config.timeout = 10.0
896
- # config.rpcs.list_game_server_deployments.timeout = 20.0
897
- # end
898
- #
899
- # To apply the above configuration only to a new client:
900
- #
901
- # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new do |config|
902
- # config.timeout = 10.0
903
- # config.rpcs.list_game_server_deployments.timeout = 20.0
904
- # end
1060
+ # @example
1061
+ #
1062
+ # # Modify the global config, setting the timeout for
1063
+ # # list_game_server_deployments to 20 seconds,
1064
+ # # and all remaining timeouts to 10 seconds.
1065
+ # ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.configure do |config|
1066
+ # config.timeout = 10.0
1067
+ # config.rpcs.list_game_server_deployments.timeout = 20.0
1068
+ # end
1069
+ #
1070
+ # # Apply the above configuration only to a new client.
1071
+ # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new do |config|
1072
+ # config.timeout = 10.0
1073
+ # config.rpcs.list_game_server_deployments.timeout = 20.0
1074
+ # end
905
1075
  #
906
1076
  # @!attribute [rw] endpoint
907
1077
  # The hostname or hostname:port of the service endpoint.