google-cloud-gaming-v1 0.3.3 → 0.4.3

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  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 +217 -43
  7. data/lib/google/cloud/gaming/v1/game_server_clusters_service/operations.rb +115 -12
  8. data/lib/google/cloud/gaming/v1/game_server_clusters_service_pb.rb +2 -2
  9. data/lib/google/cloud/gaming/v1/game_server_clusters_service_services_pb.rb +1 -1
  10. data/lib/google/cloud/gaming/v1/game_server_configs_pb.rb +2 -2
  11. data/lib/google/cloud/gaming/v1/game_server_configs_service/client.rb +105 -20
  12. data/lib/google/cloud/gaming/v1/game_server_configs_service/operations.rb +115 -12
  13. data/lib/google/cloud/gaming/v1/game_server_configs_service_pb.rb +2 -2
  14. data/lib/google/cloud/gaming/v1/game_server_configs_service_services_pb.rb +1 -1
  15. data/lib/google/cloud/gaming/v1/game_server_deployments_pb.rb +2 -2
  16. data/lib/google/cloud/gaming/v1/game_server_deployments_service/client.rb +225 -50
  17. data/lib/google/cloud/gaming/v1/game_server_deployments_service/operations.rb +115 -12
  18. data/lib/google/cloud/gaming/v1/game_server_deployments_service_pb.rb +2 -2
  19. data/lib/google/cloud/gaming/v1/game_server_deployments_service_services_pb.rb +1 -1
  20. data/lib/google/cloud/gaming/v1/realms_pb.rb +2 -2
  21. data/lib/google/cloud/gaming/v1/realms_service/client.rb +154 -30
  22. data/lib/google/cloud/gaming/v1/realms_service/operations.rb +115 -12
  23. data/lib/google/cloud/gaming/v1/realms_service_pb.rb +2 -2
  24. data/lib/google/cloud/gaming/v1/realms_service_services_pb.rb +1 -1
  25. data/lib/google/cloud/gaming/v1/version.rb +1 -1
  26. data/proto_docs/google/api/resource.rb +10 -71
  27. data/proto_docs/google/cloud/gaming/v1/common.rb +4 -5
  28. data/proto_docs/google/cloud/gaming/v1/game_server_clusters.rb +117 -19
  29. data/proto_docs/google/cloud/gaming/v1/game_server_configs.rb +5 -11
  30. data/proto_docs/google/cloud/gaming/v1/game_server_deployments.rb +12 -28
  31. data/proto_docs/google/cloud/gaming/v1/realms.rb +7 -13
  32. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a49d9ea1051bcf73ba5095d0995c107a5cc22fa5ff051f0ac36e0a7c1147333c
4
- data.tar.gz: 57060d23a6a95e40734324260eb53612e2f077a47caa0a7d5083468d715435cc
3
+ metadata.gz: 319d21505e1868972cb52a67a07b10eab16e9279a30f07727e838dc0051e598c
4
+ data.tar.gz: 9d77226aff43d2c3e2a278c8ab98219a57ba3379828e155c37d3556efa0b3b54
5
5
  SHA512:
6
- metadata.gz: f7b3053b3600c3ac21fd208eaf262afa6c42a9becdecd8eb7813c2126de3a100e0005b39eecdd232ac95e90bd288b19efe108f71a50e9a4708fb29f8091a283e
7
- data.tar.gz: 1af00a6dc75f428df532142b829ceec9ac4f0d95eea9877e0f0886e39d5fb1c01076fe94c2c6966719211fa565689a3129621bec3f28cb4af14ad597a300ff9f
6
+ metadata.gz: 2d4a544bf67bb81c8b9bda321c2bcf2bde60e5ea758a553e993fe9653f35bc58d9ddf124c7ad8778c027437522d050e1d4fc4e159d968c3a1ffc5367e9f033ae
7
+ data.tar.gz: f92189ca07be76dbd3be95d9926a571ad6a2281a04e17eb70a6618baca1bbf96a9234c6a348401e92b16a50248b66ca571f6c34c2662e752620ca58026e79659
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Gaming V1 API
2
+ --title="Cloud Gaming V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/gaming/v1/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/protobuf/duration_pb'
8
6
  require 'google/protobuf/timestamp_pb'
9
7
  require 'google/api/annotations_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/cloud/gaming/v1/common.proto", :syntax => :proto3) do
12
12
  add_message "google.cloud.gaming.v1.OperationMetadata" do
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/gaming/v1/game_server_clusters.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/cloud/gaming/v1/common_pb'
9
7
  require 'google/protobuf/field_mask_pb'
10
8
  require 'google/protobuf/timestamp_pb'
11
9
  require 'google/api/annotations_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/gaming/v1/game_server_clusters.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.gaming.v1.ListGameServerClustersRequest" do
@@ -17,6 +17,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  optional :page_token, :string, 3
18
18
  optional :filter, :string, 4
19
19
  optional :order_by, :string, 5
20
+ optional :view, :enum, 6, "google.cloud.gaming.v1.GameServerClusterView"
20
21
  end
21
22
  add_message "google.cloud.gaming.v1.ListGameServerClustersResponse" do
22
23
  repeated :game_server_clusters, :message, 1, "google.cloud.gaming.v1.GameServerCluster"
@@ -25,6 +26,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
25
26
  end
26
27
  add_message "google.cloud.gaming.v1.GetGameServerClusterRequest" do
27
28
  optional :name, :string, 1
29
+ optional :view, :enum, 6, "google.cloud.gaming.v1.GameServerClusterView"
28
30
  end
29
31
  add_message "google.cloud.gaming.v1.CreateGameServerClusterRequest" do
30
32
  optional :parent, :string, 1
@@ -36,10 +38,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
36
38
  optional :game_server_cluster_id, :string, 2
37
39
  optional :game_server_cluster, :message, 3, "google.cloud.gaming.v1.GameServerCluster"
38
40
  optional :preview_time, :message, 4, "google.protobuf.Timestamp"
41
+ optional :view, :enum, 6, "google.cloud.gaming.v1.GameServerClusterView"
39
42
  end
40
43
  add_message "google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse" do
41
44
  optional :etag, :string, 2
42
45
  optional :target_state, :message, 3, "google.cloud.gaming.v1.TargetState"
46
+ optional :cluster_state, :message, 4, "google.cloud.gaming.v1.KubernetesClusterState"
43
47
  end
44
48
  add_message "google.cloud.gaming.v1.DeleteGameServerClusterRequest" do
45
49
  optional :name, :string, 1
@@ -82,6 +86,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
82
86
  optional :connection_info, :message, 5, "google.cloud.gaming.v1.GameServerClusterConnectionInfo"
83
87
  optional :etag, :string, 6
84
88
  optional :description, :string, 7
89
+ optional :cluster_state, :message, 11, "google.cloud.gaming.v1.KubernetesClusterState"
90
+ end
91
+ add_message "google.cloud.gaming.v1.KubernetesClusterState" do
92
+ optional :agones_version_installed, :string, 1
93
+ optional :kubernetes_version_installed, :string, 2
94
+ optional :installation_state, :enum, 3, "google.cloud.gaming.v1.KubernetesClusterState.InstallationState"
95
+ optional :version_installed_error_message, :string, 4
96
+ optional :provider, :string, 5
97
+ optional :agones_version_targeted, :string, 6
98
+ end
99
+ add_enum "google.cloud.gaming.v1.KubernetesClusterState.InstallationState" do
100
+ value :INSTALLATION_STATE_UNSPECIFIED, 0
101
+ value :AGONES_KUBERNETES_VERSION_SUPPORTED, 1
102
+ value :AGONES_VERSION_UNSUPPORTED, 2
103
+ value :AGONES_KUBERNETES_VERSION_UNSUPPORTED, 3
104
+ value :AGONES_VERSION_UNRECOGNIZED, 4
105
+ value :KUBERNETES_VERSION_UNRECOGNIZED, 5
106
+ value :VERSION_VERIFICATION_FAILED, 6
107
+ value :AGONES_NOT_INSTALLED, 7
108
+ end
109
+ add_enum "google.cloud.gaming.v1.GameServerClusterView" do
110
+ value :GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, 0
111
+ value :BASIC, 1
112
+ value :FULL, 2
85
113
  end
86
114
  end
87
115
  end
@@ -105,6 +133,9 @@ module Google
105
133
  GameServerClusterConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gaming.v1.GameServerClusterConnectionInfo").msgclass
106
134
  GkeClusterReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gaming.v1.GkeClusterReference").msgclass
107
135
  GameServerCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gaming.v1.GameServerCluster").msgclass
136
+ KubernetesClusterState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gaming.v1.KubernetesClusterState").msgclass
137
+ KubernetesClusterState::InstallationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gaming.v1.KubernetesClusterState.InstallationState").enummodule
138
+ GameServerClusterView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gaming.v1.GameServerClusterView").enummodule
108
139
  end
109
140
  end
110
141
  end
@@ -167,6 +167,7 @@ module Google
167
167
 
168
168
  @operations_client = Operations.new do |config|
169
169
  config.credentials = credentials
170
+ config.quota_project = @quota_project_id
170
171
  config.endpoint = @config.endpoint
171
172
  end
172
173
 
@@ -201,16 +202,16 @@ module Google
201
202
  # @param options [::Gapic::CallOptions, ::Hash]
202
203
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
203
204
  #
204
- # @overload list_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
205
+ # @overload list_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
205
206
  # Pass arguments to `list_game_server_clusters` via keyword arguments. Note that at
206
207
  # least one keyword argument is required. To specify no parameters, or to keep all
207
208
  # the default parameter values, pass an empty Hash as a request object (see above).
208
209
  #
209
210
  # @param parent [::String]
210
- # Required. The parent resource name. Uses the form:
211
+ # Required. The parent resource name, in the following form:
211
212
  # "projects/\\{project}/locations/\\{location}/realms/\\{realm}".
212
213
  # @param page_size [::Integer]
213
- # Optional. The maximum number of items to return. If unspecified, the server
214
+ # Optional. The maximum number of items to return. If unspecified, the server
214
215
  # will pick an appropriate default. The server may return fewer items than
215
216
  # requested. A caller should only rely on response's
216
217
  # {::Google::Cloud::Gaming::V1::ListGameServerClustersResponse#next_page_token next_page_token} to
@@ -222,6 +223,13 @@ module Google
222
223
  # @param order_by [::String]
223
224
  # Optional. Specifies the ordering of results following syntax at
224
225
  # https://cloud.google.com/apis/design/design_patterns#sorting_order.
226
+ # @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
227
+ # Optional. View for the returned GameServerCluster objects. When `FULL` is
228
+ # specified, the `cluster_state` field is also returned in the
229
+ # GameServerCluster object, which includes the state of the referenced
230
+ # Kubernetes cluster such as versions and provider info. The default/unset
231
+ # value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
232
+ # not return the `cluster_state` field.
225
233
  #
226
234
  # @yield [response, operation] Access the result along with the RPC operation
227
235
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerCluster>]
@@ -231,6 +239,27 @@ module Google
231
239
  #
232
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
233
241
  #
242
+ # @example Basic example
243
+ # require "google/cloud/gaming/v1"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Cloud::Gaming::V1::ListGameServerClustersRequest.new
250
+ #
251
+ # # Call the list_game_server_clusters method.
252
+ # result = client.list_game_server_clusters request
253
+ #
254
+ # # The returned object is of type Gapic::PagedEnumerable. You can
255
+ # # iterate over all elements by calling #each, and the enumerable
256
+ # # will lazily make API calls to fetch subsequent pages. Other
257
+ # # methods are also available for managing paging directly.
258
+ # result.each do |response|
259
+ # # Each element is of type ::Google::Cloud::Gaming::V1::GameServerCluster.
260
+ # p response
261
+ # end
262
+ #
234
263
  def list_game_server_clusters request, options = nil
235
264
  raise ::ArgumentError, "request must be provided" if request.nil?
236
265
 
@@ -248,9 +277,11 @@ module Google
248
277
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
249
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
250
279
 
251
- header_params = {
252
- "parent" => request.parent
253
- }
280
+ header_params = {}
281
+ if request.parent
282
+ header_params["parent"] = request.parent
283
+ end
284
+
254
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
255
286
  metadata[:"x-goog-request-params"] ||= request_params_header
256
287
 
@@ -284,15 +315,21 @@ module Google
284
315
  # @param options [::Gapic::CallOptions, ::Hash]
285
316
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
286
317
  #
287
- # @overload get_game_server_cluster(name: nil)
318
+ # @overload get_game_server_cluster(name: nil, view: nil)
288
319
  # Pass arguments to `get_game_server_cluster` via keyword arguments. Note that at
289
320
  # least one keyword argument is required. To specify no parameters, or to keep all
290
321
  # the default parameter values, pass an empty Hash as a request object (see above).
291
322
  #
292
323
  # @param name [::String]
293
- # Required. The name of the game server cluster to retrieve. Uses the form:
294
- #
324
+ # Required. The name of the game server cluster to retrieve, in the following form:
295
325
  # `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
326
+ # @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
327
+ # Optional. View for the returned GameServerCluster objects. When `FULL` is
328
+ # specified, the `cluster_state` field is also returned in the
329
+ # GameServerCluster object, which includes the state of the referenced
330
+ # Kubernetes cluster such as versions and provider info. The default/unset
331
+ # value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
332
+ # not return the `cluster_state` field.
296
333
  #
297
334
  # @yield [response, operation] Access the result along with the RPC operation
298
335
  # @yieldparam response [::Google::Cloud::Gaming::V1::GameServerCluster]
@@ -302,6 +339,21 @@ module Google
302
339
  #
303
340
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
304
341
  #
342
+ # @example Basic example
343
+ # require "google/cloud/gaming/v1"
344
+ #
345
+ # # Create a client object. The client can be reused for multiple calls.
346
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
347
+ #
348
+ # # Create a request. To set request fields, pass in keyword arguments.
349
+ # request = Google::Cloud::Gaming::V1::GetGameServerClusterRequest.new
350
+ #
351
+ # # Call the get_game_server_cluster method.
352
+ # result = client.get_game_server_cluster request
353
+ #
354
+ # # The returned object is of type Google::Cloud::Gaming::V1::GameServerCluster.
355
+ # p result
356
+ #
305
357
  def get_game_server_cluster request, options = nil
306
358
  raise ::ArgumentError, "request must be provided" if request.nil?
307
359
 
@@ -319,9 +371,11 @@ module Google
319
371
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
320
372
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
321
373
 
322
- header_params = {
323
- "name" => request.name
324
- }
374
+ header_params = {}
375
+ if request.name
376
+ header_params["name"] = request.name
377
+ end
378
+
325
379
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
326
380
  metadata[:"x-goog-request-params"] ||= request_params_header
327
381
 
@@ -360,7 +414,7 @@ module Google
360
414
  # the default parameter values, pass an empty Hash as a request object (see above).
361
415
  #
362
416
  # @param parent [::String]
363
- # Required. The parent resource name. Uses the form:
417
+ # Required. The parent resource name, in the following form:
364
418
  # `projects/{project}/locations/{location}/realms/{realm-id}`.
365
419
  # @param game_server_cluster_id [::String]
366
420
  # Required. The ID of the game server cluster resource to be created.
@@ -375,6 +429,28 @@ module Google
375
429
  #
376
430
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
377
431
  #
432
+ # @example Basic example
433
+ # require "google/cloud/gaming/v1"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Cloud::Gaming::V1::CreateGameServerClusterRequest.new
440
+ #
441
+ # # Call the create_game_server_cluster method.
442
+ # result = client.create_game_server_cluster request
443
+ #
444
+ # # The returned object is of type Gapic::Operation. You can use this
445
+ # # object to check the status of an operation, cancel it, or wait
446
+ # # for results. Here is how to block until completion:
447
+ # result.wait_until_done! timeout: 60
448
+ # if result.response?
449
+ # p result.response
450
+ # else
451
+ # puts "Error!"
452
+ # end
453
+ #
378
454
  def create_game_server_cluster request, options = nil
379
455
  raise ::ArgumentError, "request must be provided" if request.nil?
380
456
 
@@ -392,9 +468,11 @@ module Google
392
468
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
393
469
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
394
470
 
395
- header_params = {
396
- "parent" => request.parent
397
- }
471
+ header_params = {}
472
+ if request.parent
473
+ header_params["parent"] = request.parent
474
+ end
475
+
398
476
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
399
477
  metadata[:"x-goog-request-params"] ||= request_params_header
400
478
 
@@ -429,13 +507,13 @@ module Google
429
507
  # @param options [::Gapic::CallOptions, ::Hash]
430
508
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
431
509
  #
432
- # @overload preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil)
510
+ # @overload preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil, view: nil)
433
511
  # Pass arguments to `preview_create_game_server_cluster` via keyword arguments. Note that at
434
512
  # least one keyword argument is required. To specify no parameters, or to keep all
435
513
  # the default parameter values, pass an empty Hash as a request object (see above).
436
514
  #
437
515
  # @param parent [::String]
438
- # Required. The parent resource name. Uses the form:
516
+ # Required. The parent resource name, in the following form:
439
517
  # `projects/{project}/locations/{location}/realms/{realm}`.
440
518
  # @param game_server_cluster_id [::String]
441
519
  # Required. The ID of the game server cluster resource to be created.
@@ -443,6 +521,9 @@ module Google
443
521
  # Required. The game server cluster resource to be created.
444
522
  # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
445
523
  # Optional. The target timestamp to compute the preview.
524
+ # @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
525
+ # Optional. This field is deprecated, preview will always return
526
+ # KubernetesClusterState.
446
527
  #
447
528
  # @yield [response, operation] Access the result along with the RPC operation
448
529
  # @yieldparam response [::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse]
@@ -452,6 +533,21 @@ module Google
452
533
  #
453
534
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
454
535
  #
536
+ # @example Basic example
537
+ # require "google/cloud/gaming/v1"
538
+ #
539
+ # # Create a client object. The client can be reused for multiple calls.
540
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
541
+ #
542
+ # # Create a request. To set request fields, pass in keyword arguments.
543
+ # request = Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterRequest.new
544
+ #
545
+ # # Call the preview_create_game_server_cluster method.
546
+ # result = client.preview_create_game_server_cluster request
547
+ #
548
+ # # The returned object is of type Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse.
549
+ # p result
550
+ #
455
551
  def preview_create_game_server_cluster request, options = nil
456
552
  raise ::ArgumentError, "request must be provided" if request.nil?
457
553
 
@@ -469,9 +565,11 @@ module Google
469
565
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
470
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
471
567
 
472
- header_params = {
473
- "parent" => request.parent
474
- }
568
+ header_params = {}
569
+ if request.parent
570
+ header_params["parent"] = request.parent
571
+ end
572
+
475
573
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
476
574
  metadata[:"x-goog-request-params"] ||= request_params_header
477
575
 
@@ -510,7 +608,7 @@ module Google
510
608
  # the default parameter values, pass an empty Hash as a request object (see above).
511
609
  #
512
610
  # @param name [::String]
513
- # Required. The name of the game server cluster to delete. Uses the form:
611
+ # Required. The name of the game server cluster to delete, in the following form:
514
612
  # `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
515
613
  #
516
614
  # @yield [response, operation] Access the result along with the RPC operation
@@ -521,6 +619,28 @@ module Google
521
619
  #
522
620
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
523
621
  #
622
+ # @example Basic example
623
+ # require "google/cloud/gaming/v1"
624
+ #
625
+ # # Create a client object. The client can be reused for multiple calls.
626
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
627
+ #
628
+ # # Create a request. To set request fields, pass in keyword arguments.
629
+ # request = Google::Cloud::Gaming::V1::DeleteGameServerClusterRequest.new
630
+ #
631
+ # # Call the delete_game_server_cluster method.
632
+ # result = client.delete_game_server_cluster request
633
+ #
634
+ # # The returned object is of type Gapic::Operation. You can use this
635
+ # # object to check the status of an operation, cancel it, or wait
636
+ # # for results. Here is how to block until completion:
637
+ # result.wait_until_done! timeout: 60
638
+ # if result.response?
639
+ # p result.response
640
+ # else
641
+ # puts "Error!"
642
+ # end
643
+ #
524
644
  def delete_game_server_cluster request, options = nil
525
645
  raise ::ArgumentError, "request must be provided" if request.nil?
526
646
 
@@ -538,9 +658,11 @@ module Google
538
658
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
539
659
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
540
660
 
541
- header_params = {
542
- "name" => request.name
543
- }
661
+ header_params = {}
662
+ if request.name
663
+ header_params["name"] = request.name
664
+ end
665
+
544
666
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
545
667
  metadata[:"x-goog-request-params"] ||= request_params_header
546
668
 
@@ -580,7 +702,7 @@ module Google
580
702
  # the default parameter values, pass an empty Hash as a request object (see above).
581
703
  #
582
704
  # @param name [::String]
583
- # Required. The name of the game server cluster to delete. Uses the form:
705
+ # Required. The name of the game server cluster to delete, in the following form:
584
706
  # `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
585
707
  # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
586
708
  # Optional. The target timestamp to compute the preview.
@@ -593,6 +715,21 @@ module Google
593
715
  #
594
716
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
595
717
  #
718
+ # @example Basic example
719
+ # require "google/cloud/gaming/v1"
720
+ #
721
+ # # Create a client object. The client can be reused for multiple calls.
722
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
723
+ #
724
+ # # Create a request. To set request fields, pass in keyword arguments.
725
+ # request = Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterRequest.new
726
+ #
727
+ # # Call the preview_delete_game_server_cluster method.
728
+ # result = client.preview_delete_game_server_cluster request
729
+ #
730
+ # # The returned object is of type Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse.
731
+ # p result
732
+ #
596
733
  def preview_delete_game_server_cluster request, options = nil
597
734
  raise ::ArgumentError, "request must be provided" if request.nil?
598
735
 
@@ -610,9 +747,11 @@ module Google
610
747
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
611
748
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
612
749
 
613
- header_params = {
614
- "name" => request.name
615
- }
750
+ header_params = {}
751
+ if request.name
752
+ header_params["name"] = request.name
753
+ end
754
+
616
755
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
617
756
  metadata[:"x-goog-request-params"] ||= request_params_header
618
757
 
@@ -656,10 +795,7 @@ module Google
656
795
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
657
796
  # Required. Mask of fields to update. At least one path must be supplied in
658
797
  # this field. For the `FieldMask` definition, see
659
- #
660
- # https:
661
- # //developers.google.com/protocol-buffers
662
- # // /docs/reference/google.protobuf#fieldmask
798
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
663
799
  #
664
800
  # @yield [response, operation] Access the result along with the RPC operation
665
801
  # @yieldparam response [::Gapic::Operation]
@@ -669,6 +805,28 @@ module Google
669
805
  #
670
806
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
671
807
  #
808
+ # @example Basic example
809
+ # require "google/cloud/gaming/v1"
810
+ #
811
+ # # Create a client object. The client can be reused for multiple calls.
812
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
813
+ #
814
+ # # Create a request. To set request fields, pass in keyword arguments.
815
+ # request = Google::Cloud::Gaming::V1::UpdateGameServerClusterRequest.new
816
+ #
817
+ # # Call the update_game_server_cluster method.
818
+ # result = client.update_game_server_cluster request
819
+ #
820
+ # # The returned object is of type Gapic::Operation. You can use this
821
+ # # object to check the status of an operation, cancel it, or wait
822
+ # # for results. Here is how to block until completion:
823
+ # result.wait_until_done! timeout: 60
824
+ # if result.response?
825
+ # p result.response
826
+ # else
827
+ # puts "Error!"
828
+ # end
829
+ #
672
830
  def update_game_server_cluster request, options = nil
673
831
  raise ::ArgumentError, "request must be provided" if request.nil?
674
832
 
@@ -686,9 +844,11 @@ module Google
686
844
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
687
845
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
688
846
 
689
- header_params = {
690
- "game_server_cluster.name" => request.game_server_cluster.name
691
- }
847
+ header_params = {}
848
+ if request.game_server_cluster&.name
849
+ header_params["game_server_cluster.name"] = request.game_server_cluster.name
850
+ end
851
+
692
852
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
693
853
  metadata[:"x-goog-request-params"] ||= request_params_header
694
854
 
@@ -733,10 +893,7 @@ module Google
733
893
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
734
894
  # Required. Mask of fields to update. At least one path must be supplied in
735
895
  # this field. For the `FieldMask` definition, see
736
- #
737
- # https:
738
- # //developers.google.com/protocol-buffers
739
- # // /docs/reference/google.protobuf#fieldmask
896
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
740
897
  # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
741
898
  # Optional. The target timestamp to compute the preview.
742
899
  #
@@ -748,6 +905,21 @@ module Google
748
905
  #
749
906
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
750
907
  #
908
+ # @example Basic example
909
+ # require "google/cloud/gaming/v1"
910
+ #
911
+ # # Create a client object. The client can be reused for multiple calls.
912
+ # client = Google::Cloud::Gaming::V1::GameServerClustersService::Client.new
913
+ #
914
+ # # Create a request. To set request fields, pass in keyword arguments.
915
+ # request = Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterRequest.new
916
+ #
917
+ # # Call the preview_update_game_server_cluster method.
918
+ # result = client.preview_update_game_server_cluster request
919
+ #
920
+ # # The returned object is of type Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse.
921
+ # p result
922
+ #
751
923
  def preview_update_game_server_cluster request, options = nil
752
924
  raise ::ArgumentError, "request must be provided" if request.nil?
753
925
 
@@ -765,9 +937,11 @@ module Google
765
937
  gapic_version: ::Google::Cloud::Gaming::V1::VERSION
766
938
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
767
939
 
768
- header_params = {
769
- "game_server_cluster.name" => request.game_server_cluster.name
770
- }
940
+ header_params = {}
941
+ if request.game_server_cluster&.name
942
+ header_params["game_server_cluster.name"] = request.game_server_cluster.name
943
+ end
944
+
771
945
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
772
946
  metadata[:"x-goog-request-params"] ||= request_params_header
773
947