google-cloud-gaming-v1 0.7.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -143
  3. data/lib/google/cloud/gaming/v1/version.rb +3 -8
  4. metadata +16 -229
  5. data/.yardopts +0 -12
  6. data/AUTHENTICATION.md +0 -151
  7. data/lib/google/cloud/gaming/v1/common_pb.rb +0 -63
  8. data/lib/google/cloud/gaming/v1/game_server_clusters_pb.rb +0 -68
  9. data/lib/google/cloud/gaming/v1/game_server_clusters_service/client.rb +0 -1168
  10. data/lib/google/cloud/gaming/v1/game_server_clusters_service/credentials.rb +0 -51
  11. data/lib/google/cloud/gaming/v1/game_server_clusters_service/operations.rb +0 -770
  12. data/lib/google/cloud/gaming/v1/game_server_clusters_service/paths.rb +0 -73
  13. data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest/client.rb +0 -938
  14. data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest/operations.rb +0 -795
  15. data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest/service_stub.rb +0 -524
  16. data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest.rb +0 -54
  17. data/lib/google/cloud/gaming/v1/game_server_clusters_service.rb +0 -57
  18. data/lib/google/cloud/gaming/v1/game_server_clusters_service_pb.rb +0 -46
  19. data/lib/google/cloud/gaming/v1/game_server_clusters_service_services_pb.rb +0 -61
  20. data/lib/google/cloud/gaming/v1/game_server_configs_pb.rb +0 -56
  21. data/lib/google/cloud/gaming/v1/game_server_configs_service/client.rb +0 -738
  22. data/lib/google/cloud/gaming/v1/game_server_configs_service/credentials.rb +0 -51
  23. data/lib/google/cloud/gaming/v1/game_server_configs_service/operations.rb +0 -770
  24. data/lib/google/cloud/gaming/v1/game_server_configs_service/paths.rb +0 -73
  25. data/lib/google/cloud/gaming/v1/game_server_configs_service/rest/client.rb +0 -607
  26. data/lib/google/cloud/gaming/v1/game_server_configs_service/rest/operations.rb +0 -795
  27. data/lib/google/cloud/gaming/v1/game_server_configs_service/rest/service_stub.rb +0 -285
  28. data/lib/google/cloud/gaming/v1/game_server_configs_service/rest.rb +0 -53
  29. data/lib/google/cloud/gaming/v1/game_server_configs_service.rb +0 -56
  30. data/lib/google/cloud/gaming/v1/game_server_configs_service_pb.rb +0 -46
  31. data/lib/google/cloud/gaming/v1/game_server_configs_service_services_pb.rb +0 -55
  32. data/lib/google/cloud/gaming/v1/game_server_deployments_pb.rb +0 -66
  33. data/lib/google/cloud/gaming/v1/game_server_deployments_service/client.rb +0 -1259
  34. data/lib/google/cloud/gaming/v1/game_server_deployments_service/credentials.rb +0 -51
  35. data/lib/google/cloud/gaming/v1/game_server_deployments_service/operations.rb +0 -770
  36. data/lib/google/cloud/gaming/v1/game_server_deployments_service/paths.rb +0 -88
  37. data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest/client.rb +0 -999
  38. data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest/operations.rb +0 -795
  39. data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest/service_stub.rb +0 -584
  40. data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest.rb +0 -54
  41. data/lib/google/cloud/gaming/v1/game_server_deployments_service.rb +0 -57
  42. data/lib/google/cloud/gaming/v1/game_server_deployments_service_pb.rb +0 -46
  43. data/lib/google/cloud/gaming/v1/game_server_deployments_service_services_pb.rb +0 -70
  44. data/lib/google/cloud/gaming/v1/realms_pb.rb +0 -59
  45. data/lib/google/cloud/gaming/v1/realms_service/client.rb +0 -947
  46. data/lib/google/cloud/gaming/v1/realms_service/credentials.rb +0 -51
  47. data/lib/google/cloud/gaming/v1/realms_service/operations.rb +0 -770
  48. data/lib/google/cloud/gaming/v1/realms_service/paths.rb +0 -69
  49. data/lib/google/cloud/gaming/v1/realms_service/rest/client.rb +0 -763
  50. data/lib/google/cloud/gaming/v1/realms_service/rest/operations.rb +0 -795
  51. data/lib/google/cloud/gaming/v1/realms_service/rest/service_stub.rb +0 -405
  52. data/lib/google/cloud/gaming/v1/realms_service/rest.rb +0 -54
  53. data/lib/google/cloud/gaming/v1/realms_service.rb +0 -57
  54. data/lib/google/cloud/gaming/v1/realms_service_pb.rb +0 -46
  55. data/lib/google/cloud/gaming/v1/realms_service_services_pb.rb +0 -56
  56. data/lib/google/cloud/gaming/v1/rest.rb +0 -40
  57. data/lib/google/cloud/gaming/v1.rb +0 -48
  58. data/lib/google-cloud-gaming-v1.rb +0 -21
  59. data/proto_docs/README.md +0 -4
  60. data/proto_docs/google/api/client.rb +0 -381
  61. data/proto_docs/google/api/field_behavior.rb +0 -71
  62. data/proto_docs/google/api/launch_stage.rb +0 -71
  63. data/proto_docs/google/api/resource.rb +0 -222
  64. data/proto_docs/google/cloud/gaming/v1/common.rb +0 -302
  65. data/proto_docs/google/cloud/gaming/v1/game_server_clusters.rb +0 -386
  66. data/proto_docs/google/cloud/gaming/v1/game_server_configs.rb +0 -180
  67. data/proto_docs/google/cloud/gaming/v1/game_server_deployments.rb +0 -301
  68. data/proto_docs/google/cloud/gaming/v1/realms.rb +0 -191
  69. data/proto_docs/google/longrunning/operations.rb +0 -164
  70. data/proto_docs/google/protobuf/any.rb +0 -144
  71. data/proto_docs/google/protobuf/duration.rb +0 -98
  72. data/proto_docs/google/protobuf/empty.rb +0 -34
  73. data/proto_docs/google/protobuf/field_mask.rb +0 -229
  74. data/proto_docs/google/protobuf/timestamp.rb +0 -127
  75. data/proto_docs/google/rpc/status.rb +0 -48
@@ -1,938 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2023 Google LLC
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # https://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
-
19
- require "google/cloud/errors"
20
- require "google/cloud/gaming/v1/game_server_clusters_service_pb"
21
- require "google/cloud/gaming/v1/game_server_clusters_service/rest/service_stub"
22
-
23
- module Google
24
- module Cloud
25
- module Gaming
26
- module V1
27
- module GameServerClustersService
28
- module Rest
29
- ##
30
- # REST client for the GameServerClustersService service.
31
- #
32
- # The game server cluster maps to Kubernetes clusters running Agones and is
33
- # used to manage fleets within clusters.
34
- #
35
- class Client
36
- include Paths
37
-
38
- # @private
39
- attr_reader :game_server_clusters_service_stub
40
-
41
- ##
42
- # Configure the GameServerClustersService Client class.
43
- #
44
- # See {::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client::Configuration}
45
- # for a description of the configuration fields.
46
- #
47
- # @example
48
- #
49
- # # Modify the configuration for all GameServerClustersService clients
50
- # ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client.configure do |config|
51
- # config.timeout = 10.0
52
- # end
53
- #
54
- # @yield [config] Configure the Client client.
55
- # @yieldparam config [Client::Configuration]
56
- #
57
- # @return [Client::Configuration]
58
- #
59
- def self.configure
60
- @configure ||= begin
61
- namespace = ["Google", "Cloud", "Gaming", "V1"]
62
- parent_config = while namespace.any?
63
- parent_name = namespace.join "::"
64
- parent_const = const_get parent_name
65
- break parent_const.configure if parent_const.respond_to? :configure
66
- namespace.pop
67
- end
68
- default_config = Client::Configuration.new parent_config
69
-
70
- default_config.rpcs.list_game_server_clusters.timeout = 60.0
71
- default_config.rpcs.list_game_server_clusters.retry_policy = {
72
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
73
- }
74
-
75
- default_config.rpcs.get_game_server_cluster.timeout = 60.0
76
- default_config.rpcs.get_game_server_cluster.retry_policy = {
77
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
- }
79
-
80
- default_config.rpcs.create_game_server_cluster.timeout = 120.0
81
-
82
- default_config.rpcs.preview_create_game_server_cluster.timeout = 60.0
83
- default_config.rpcs.preview_create_game_server_cluster.retry_policy = {
84
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
85
- }
86
-
87
- default_config.rpcs.delete_game_server_cluster.timeout = 60.0
88
-
89
- default_config.rpcs.preview_delete_game_server_cluster.timeout = 60.0
90
- default_config.rpcs.preview_delete_game_server_cluster.retry_policy = {
91
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
92
- }
93
-
94
- default_config.rpcs.update_game_server_cluster.timeout = 60.0
95
-
96
- default_config.rpcs.preview_update_game_server_cluster.timeout = 60.0
97
- default_config.rpcs.preview_update_game_server_cluster.retry_policy = {
98
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
- }
100
-
101
- default_config
102
- end
103
- yield @configure if block_given?
104
- @configure
105
- end
106
-
107
- ##
108
- # Configure the GameServerClustersService Client instance.
109
- #
110
- # The configuration is set to the derived mode, meaning that values can be changed,
111
- # but structural changes (adding new fields, etc.) are not allowed. Structural changes
112
- # should be made on {Client.configure}.
113
- #
114
- # See {::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client::Configuration}
115
- # for a description of the configuration fields.
116
- #
117
- # @yield [config] Configure the Client client.
118
- # @yieldparam config [Client::Configuration]
119
- #
120
- # @return [Client::Configuration]
121
- #
122
- def configure
123
- yield @config if block_given?
124
- @config
125
- end
126
-
127
- ##
128
- # Create a new GameServerClustersService REST client object.
129
- #
130
- # @example
131
- #
132
- # # Create a client using the default configuration
133
- # client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client.new
134
- #
135
- # # Create a client using a custom configuration
136
- # client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client.new do |config|
137
- # config.timeout = 10.0
138
- # end
139
- #
140
- # @yield [config] Configure the GameServerClustersService client.
141
- # @yieldparam config [Client::Configuration]
142
- #
143
- def initialize
144
- # Create the configuration object
145
- @config = Configuration.new Client.configure
146
-
147
- # Yield the configuration if needed
148
- yield @config if block_given?
149
-
150
- # Create credentials
151
- credentials = @config.credentials
152
- # Use self-signed JWT if the endpoint is unchanged from default,
153
- # but only if the default endpoint does not have a region prefix.
154
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
155
- !@config.endpoint.split(".").first.include?("-")
156
- credentials ||= Credentials.default scope: @config.scope,
157
- enable_self_signed_jwt: enable_self_signed_jwt
158
- if credentials.is_a?(::String) || credentials.is_a?(::Hash)
159
- credentials = Credentials.new credentials, scope: @config.scope
160
- end
161
-
162
- @quota_project_id = @config.quota_project
163
- @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
164
-
165
- @operations_client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Operations.new do |config|
166
- config.credentials = credentials
167
- config.quota_project = @quota_project_id
168
- config.endpoint = @config.endpoint
169
- end
170
-
171
- @game_server_clusters_service_stub = ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
172
- end
173
-
174
- ##
175
- # Get the associated client for long-running operations.
176
- #
177
- # @return [::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Operations]
178
- #
179
- attr_reader :operations_client
180
-
181
- # Service calls
182
-
183
- ##
184
- # Lists game server clusters in a given project and location.
185
- #
186
- # @overload list_game_server_clusters(request, options = nil)
187
- # Pass arguments to `list_game_server_clusters` via a request object, either of type
188
- # {::Google::Cloud::Gaming::V1::ListGameServerClustersRequest} or an equivalent Hash.
189
- #
190
- # @param request [::Google::Cloud::Gaming::V1::ListGameServerClustersRequest, ::Hash]
191
- # A request object representing the call parameters. Required. To specify no
192
- # parameters, or to keep all the default parameter values, pass an empty Hash.
193
- # @param options [::Gapic::CallOptions, ::Hash]
194
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
195
- #
196
- # @overload list_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
197
- # Pass arguments to `list_game_server_clusters` via keyword arguments. Note that at
198
- # least one keyword argument is required. To specify no parameters, or to keep all
199
- # the default parameter values, pass an empty Hash as a request object (see above).
200
- #
201
- # @param parent [::String]
202
- # Required. The parent resource name, in the following form:
203
- # "projects/\\{project}/locations/\\{location}/realms/\\{realm}".
204
- # @param page_size [::Integer]
205
- # Optional. The maximum number of items to return. If unspecified, the server
206
- # will pick an appropriate default. The server may return fewer items than
207
- # requested. A caller should only rely on response's
208
- # {::Google::Cloud::Gaming::V1::ListGameServerClustersResponse#next_page_token next_page_token} to
209
- # determine if there are more GameServerClusters left to be queried.
210
- # @param page_token [::String]
211
- # Optional. The next_page_token value returned from a previous List request, if any.
212
- # @param filter [::String]
213
- # Optional. The filter to apply to list results.
214
- # @param order_by [::String]
215
- # Optional. Specifies the ordering of results following syntax at
216
- # https://cloud.google.com/apis/design/design_patterns#sorting_order.
217
- # @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
218
- # Optional. View for the returned GameServerCluster objects. When `FULL` is
219
- # specified, the `cluster_state` field is also returned in the
220
- # GameServerCluster object, which includes the state of the referenced
221
- # Kubernetes cluster such as versions and provider info. The default/unset
222
- # value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
223
- # not return the `cluster_state` field.
224
- # @yield [result, operation] Access the result along with the TransportOperation object
225
- # @yieldparam result [::Google::Cloud::Gaming::V1::ListGameServerClustersResponse]
226
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
227
- #
228
- # @return [::Google::Cloud::Gaming::V1::ListGameServerClustersResponse]
229
- #
230
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
231
- def list_game_server_clusters request, options = nil
232
- raise ::ArgumentError, "request must be provided" if request.nil?
233
-
234
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::ListGameServerClustersRequest
235
-
236
- # Converts hash and nil to an options object
237
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
238
-
239
- # Customize the options with defaults
240
- call_metadata = @config.rpcs.list_game_server_clusters.metadata.to_h
241
-
242
- # Set x-goog-api-client and x-goog-user-project headers
243
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
244
- lib_name: @config.lib_name, lib_version: @config.lib_version,
245
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
246
- transports_version_send: [:rest]
247
-
248
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
249
-
250
- options.apply_defaults timeout: @config.rpcs.list_game_server_clusters.timeout,
251
- metadata: call_metadata,
252
- retry_policy: @config.rpcs.list_game_server_clusters.retry_policy
253
-
254
- options.apply_defaults timeout: @config.timeout,
255
- metadata: @config.metadata,
256
- retry_policy: @config.retry_policy
257
-
258
- @game_server_clusters_service_stub.list_game_server_clusters request, options do |result, operation|
259
- yield result, operation if block_given?
260
- return result
261
- end
262
- rescue ::Gapic::Rest::Error => e
263
- raise ::Google::Cloud::Error.from_error(e)
264
- end
265
-
266
- ##
267
- # Gets details of a single game server cluster.
268
- #
269
- # @overload get_game_server_cluster(request, options = nil)
270
- # Pass arguments to `get_game_server_cluster` via a request object, either of type
271
- # {::Google::Cloud::Gaming::V1::GetGameServerClusterRequest} or an equivalent Hash.
272
- #
273
- # @param request [::Google::Cloud::Gaming::V1::GetGameServerClusterRequest, ::Hash]
274
- # A request object representing the call parameters. Required. To specify no
275
- # parameters, or to keep all the default parameter values, pass an empty Hash.
276
- # @param options [::Gapic::CallOptions, ::Hash]
277
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
278
- #
279
- # @overload get_game_server_cluster(name: nil, view: nil)
280
- # Pass arguments to `get_game_server_cluster` via keyword arguments. Note that at
281
- # least one keyword argument is required. To specify no parameters, or to keep all
282
- # the default parameter values, pass an empty Hash as a request object (see above).
283
- #
284
- # @param name [::String]
285
- # Required. The name of the game server cluster to retrieve, in the following form:
286
- # `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
287
- # @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
288
- # Optional. View for the returned GameServerCluster objects. When `FULL` is
289
- # specified, the `cluster_state` field is also returned in the
290
- # GameServerCluster object, which includes the state of the referenced
291
- # Kubernetes cluster such as versions and provider info. The default/unset
292
- # value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
293
- # not return the `cluster_state` field.
294
- # @yield [result, operation] Access the result along with the TransportOperation object
295
- # @yieldparam result [::Google::Cloud::Gaming::V1::GameServerCluster]
296
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
297
- #
298
- # @return [::Google::Cloud::Gaming::V1::GameServerCluster]
299
- #
300
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
301
- def get_game_server_cluster request, options = nil
302
- raise ::ArgumentError, "request must be provided" if request.nil?
303
-
304
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::GetGameServerClusterRequest
305
-
306
- # Converts hash and nil to an options object
307
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
308
-
309
- # Customize the options with defaults
310
- call_metadata = @config.rpcs.get_game_server_cluster.metadata.to_h
311
-
312
- # Set x-goog-api-client and x-goog-user-project headers
313
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
314
- lib_name: @config.lib_name, lib_version: @config.lib_version,
315
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
316
- transports_version_send: [:rest]
317
-
318
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
319
-
320
- options.apply_defaults timeout: @config.rpcs.get_game_server_cluster.timeout,
321
- metadata: call_metadata,
322
- retry_policy: @config.rpcs.get_game_server_cluster.retry_policy
323
-
324
- options.apply_defaults timeout: @config.timeout,
325
- metadata: @config.metadata,
326
- retry_policy: @config.retry_policy
327
-
328
- @game_server_clusters_service_stub.get_game_server_cluster request, options do |result, operation|
329
- yield result, operation if block_given?
330
- return result
331
- end
332
- rescue ::Gapic::Rest::Error => e
333
- raise ::Google::Cloud::Error.from_error(e)
334
- end
335
-
336
- ##
337
- # Creates a new game server cluster in a given project and location.
338
- #
339
- # @overload create_game_server_cluster(request, options = nil)
340
- # Pass arguments to `create_game_server_cluster` via a request object, either of type
341
- # {::Google::Cloud::Gaming::V1::CreateGameServerClusterRequest} or an equivalent Hash.
342
- #
343
- # @param request [::Google::Cloud::Gaming::V1::CreateGameServerClusterRequest, ::Hash]
344
- # A request object representing the call parameters. Required. To specify no
345
- # parameters, or to keep all the default parameter values, pass an empty Hash.
346
- # @param options [::Gapic::CallOptions, ::Hash]
347
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
348
- #
349
- # @overload create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil)
350
- # Pass arguments to `create_game_server_cluster` via keyword arguments. Note that at
351
- # least one keyword argument is required. To specify no parameters, or to keep all
352
- # the default parameter values, pass an empty Hash as a request object (see above).
353
- #
354
- # @param parent [::String]
355
- # Required. The parent resource name, in the following form:
356
- # `projects/{project}/locations/{location}/realms/{realm-id}`.
357
- # @param game_server_cluster_id [::String]
358
- # Required. The ID of the game server cluster resource to be created.
359
- # @param game_server_cluster [::Google::Cloud::Gaming::V1::GameServerCluster, ::Hash]
360
- # Required. The game server cluster resource to be created.
361
- # @yield [result, operation] Access the result along with the TransportOperation object
362
- # @yieldparam result [::Gapic::Operation]
363
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
364
- #
365
- # @return [::Gapic::Operation]
366
- #
367
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
368
- def create_game_server_cluster request, options = nil
369
- raise ::ArgumentError, "request must be provided" if request.nil?
370
-
371
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::CreateGameServerClusterRequest
372
-
373
- # Converts hash and nil to an options object
374
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
375
-
376
- # Customize the options with defaults
377
- call_metadata = @config.rpcs.create_game_server_cluster.metadata.to_h
378
-
379
- # Set x-goog-api-client and x-goog-user-project headers
380
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
381
- lib_name: @config.lib_name, lib_version: @config.lib_version,
382
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
383
- transports_version_send: [:rest]
384
-
385
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
386
-
387
- options.apply_defaults timeout: @config.rpcs.create_game_server_cluster.timeout,
388
- metadata: call_metadata,
389
- retry_policy: @config.rpcs.create_game_server_cluster.retry_policy
390
-
391
- options.apply_defaults timeout: @config.timeout,
392
- metadata: @config.metadata,
393
- retry_policy: @config.retry_policy
394
-
395
- @game_server_clusters_service_stub.create_game_server_cluster request, options do |result, operation|
396
- result = ::Gapic::Operation.new result, @operations_client, options: options
397
- yield result, operation if block_given?
398
- return result
399
- end
400
- rescue ::Gapic::Rest::Error => e
401
- raise ::Google::Cloud::Error.from_error(e)
402
- end
403
-
404
- ##
405
- # Previews creation of a new game server cluster in a given project and
406
- # location.
407
- #
408
- # @overload preview_create_game_server_cluster(request, options = nil)
409
- # Pass arguments to `preview_create_game_server_cluster` via a request object, either of type
410
- # {::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterRequest} or an equivalent Hash.
411
- #
412
- # @param request [::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterRequest, ::Hash]
413
- # A request object representing the call parameters. Required. To specify no
414
- # parameters, or to keep all the default parameter values, pass an empty Hash.
415
- # @param options [::Gapic::CallOptions, ::Hash]
416
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
417
- #
418
- # @overload preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil, view: nil)
419
- # Pass arguments to `preview_create_game_server_cluster` via keyword arguments. Note that at
420
- # least one keyword argument is required. To specify no parameters, or to keep all
421
- # the default parameter values, pass an empty Hash as a request object (see above).
422
- #
423
- # @param parent [::String]
424
- # Required. The parent resource name, in the following form:
425
- # `projects/{project}/locations/{location}/realms/{realm}`.
426
- # @param game_server_cluster_id [::String]
427
- # Required. The ID of the game server cluster resource to be created.
428
- # @param game_server_cluster [::Google::Cloud::Gaming::V1::GameServerCluster, ::Hash]
429
- # Required. The game server cluster resource to be created.
430
- # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
431
- # Optional. The target timestamp to compute the preview.
432
- # @param view [::Google::Cloud::Gaming::V1::GameServerClusterView]
433
- # Optional. This field is deprecated, preview will always return
434
- # KubernetesClusterState.
435
- # @yield [result, operation] Access the result along with the TransportOperation object
436
- # @yieldparam result [::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse]
437
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
438
- #
439
- # @return [::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse]
440
- #
441
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
442
- def preview_create_game_server_cluster request, options = nil
443
- raise ::ArgumentError, "request must be provided" if request.nil?
444
-
445
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterRequest
446
-
447
- # Converts hash and nil to an options object
448
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
449
-
450
- # Customize the options with defaults
451
- call_metadata = @config.rpcs.preview_create_game_server_cluster.metadata.to_h
452
-
453
- # Set x-goog-api-client and x-goog-user-project headers
454
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
455
- lib_name: @config.lib_name, lib_version: @config.lib_version,
456
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
457
- transports_version_send: [:rest]
458
-
459
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
460
-
461
- options.apply_defaults timeout: @config.rpcs.preview_create_game_server_cluster.timeout,
462
- metadata: call_metadata,
463
- retry_policy: @config.rpcs.preview_create_game_server_cluster.retry_policy
464
-
465
- options.apply_defaults timeout: @config.timeout,
466
- metadata: @config.metadata,
467
- retry_policy: @config.retry_policy
468
-
469
- @game_server_clusters_service_stub.preview_create_game_server_cluster request, options do |result, operation|
470
- yield result, operation if block_given?
471
- return result
472
- end
473
- rescue ::Gapic::Rest::Error => e
474
- raise ::Google::Cloud::Error.from_error(e)
475
- end
476
-
477
- ##
478
- # Deletes a single game server cluster.
479
- #
480
- # @overload delete_game_server_cluster(request, options = nil)
481
- # Pass arguments to `delete_game_server_cluster` via a request object, either of type
482
- # {::Google::Cloud::Gaming::V1::DeleteGameServerClusterRequest} or an equivalent Hash.
483
- #
484
- # @param request [::Google::Cloud::Gaming::V1::DeleteGameServerClusterRequest, ::Hash]
485
- # A request object representing the call parameters. Required. To specify no
486
- # parameters, or to keep all the default parameter values, pass an empty Hash.
487
- # @param options [::Gapic::CallOptions, ::Hash]
488
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
489
- #
490
- # @overload delete_game_server_cluster(name: nil)
491
- # Pass arguments to `delete_game_server_cluster` via keyword arguments. Note that at
492
- # least one keyword argument is required. To specify no parameters, or to keep all
493
- # the default parameter values, pass an empty Hash as a request object (see above).
494
- #
495
- # @param name [::String]
496
- # Required. The name of the game server cluster to delete, in the following form:
497
- # `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
498
- # @yield [result, operation] Access the result along with the TransportOperation object
499
- # @yieldparam result [::Gapic::Operation]
500
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
501
- #
502
- # @return [::Gapic::Operation]
503
- #
504
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
505
- def delete_game_server_cluster request, options = nil
506
- raise ::ArgumentError, "request must be provided" if request.nil?
507
-
508
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::DeleteGameServerClusterRequest
509
-
510
- # Converts hash and nil to an options object
511
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
512
-
513
- # Customize the options with defaults
514
- call_metadata = @config.rpcs.delete_game_server_cluster.metadata.to_h
515
-
516
- # Set x-goog-api-client and x-goog-user-project headers
517
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
518
- lib_name: @config.lib_name, lib_version: @config.lib_version,
519
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
520
- transports_version_send: [:rest]
521
-
522
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
523
-
524
- options.apply_defaults timeout: @config.rpcs.delete_game_server_cluster.timeout,
525
- metadata: call_metadata,
526
- retry_policy: @config.rpcs.delete_game_server_cluster.retry_policy
527
-
528
- options.apply_defaults timeout: @config.timeout,
529
- metadata: @config.metadata,
530
- retry_policy: @config.retry_policy
531
-
532
- @game_server_clusters_service_stub.delete_game_server_cluster request, options do |result, operation|
533
- result = ::Gapic::Operation.new result, @operations_client, options: options
534
- yield result, operation if block_given?
535
- return result
536
- end
537
- rescue ::Gapic::Rest::Error => e
538
- raise ::Google::Cloud::Error.from_error(e)
539
- end
540
-
541
- ##
542
- # Previews deletion of a single game server cluster.
543
- #
544
- # @overload preview_delete_game_server_cluster(request, options = nil)
545
- # Pass arguments to `preview_delete_game_server_cluster` via a request object, either of type
546
- # {::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterRequest} or an equivalent Hash.
547
- #
548
- # @param request [::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterRequest, ::Hash]
549
- # A request object representing the call parameters. Required. To specify no
550
- # parameters, or to keep all the default parameter values, pass an empty Hash.
551
- # @param options [::Gapic::CallOptions, ::Hash]
552
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
553
- #
554
- # @overload preview_delete_game_server_cluster(name: nil, preview_time: nil)
555
- # Pass arguments to `preview_delete_game_server_cluster` via keyword arguments. Note that at
556
- # least one keyword argument is required. To specify no parameters, or to keep all
557
- # the default parameter values, pass an empty Hash as a request object (see above).
558
- #
559
- # @param name [::String]
560
- # Required. The name of the game server cluster to delete, in the following form:
561
- # `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
562
- # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
563
- # Optional. The target timestamp to compute the preview.
564
- # @yield [result, operation] Access the result along with the TransportOperation object
565
- # @yieldparam result [::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse]
566
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
567
- #
568
- # @return [::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse]
569
- #
570
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
571
- def preview_delete_game_server_cluster request, options = nil
572
- raise ::ArgumentError, "request must be provided" if request.nil?
573
-
574
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterRequest
575
-
576
- # Converts hash and nil to an options object
577
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
578
-
579
- # Customize the options with defaults
580
- call_metadata = @config.rpcs.preview_delete_game_server_cluster.metadata.to_h
581
-
582
- # Set x-goog-api-client and x-goog-user-project headers
583
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
584
- lib_name: @config.lib_name, lib_version: @config.lib_version,
585
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
586
- transports_version_send: [:rest]
587
-
588
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
589
-
590
- options.apply_defaults timeout: @config.rpcs.preview_delete_game_server_cluster.timeout,
591
- metadata: call_metadata,
592
- retry_policy: @config.rpcs.preview_delete_game_server_cluster.retry_policy
593
-
594
- options.apply_defaults timeout: @config.timeout,
595
- metadata: @config.metadata,
596
- retry_policy: @config.retry_policy
597
-
598
- @game_server_clusters_service_stub.preview_delete_game_server_cluster request, options do |result, operation|
599
- yield result, operation if block_given?
600
- return result
601
- end
602
- rescue ::Gapic::Rest::Error => e
603
- raise ::Google::Cloud::Error.from_error(e)
604
- end
605
-
606
- ##
607
- # Patches a single game server cluster.
608
- #
609
- # @overload update_game_server_cluster(request, options = nil)
610
- # Pass arguments to `update_game_server_cluster` via a request object, either of type
611
- # {::Google::Cloud::Gaming::V1::UpdateGameServerClusterRequest} or an equivalent Hash.
612
- #
613
- # @param request [::Google::Cloud::Gaming::V1::UpdateGameServerClusterRequest, ::Hash]
614
- # A request object representing the call parameters. Required. To specify no
615
- # parameters, or to keep all the default parameter values, pass an empty Hash.
616
- # @param options [::Gapic::CallOptions, ::Hash]
617
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
618
- #
619
- # @overload update_game_server_cluster(game_server_cluster: nil, update_mask: nil)
620
- # Pass arguments to `update_game_server_cluster` via keyword arguments. Note that at
621
- # least one keyword argument is required. To specify no parameters, or to keep all
622
- # the default parameter values, pass an empty Hash as a request object (see above).
623
- #
624
- # @param game_server_cluster [::Google::Cloud::Gaming::V1::GameServerCluster, ::Hash]
625
- # Required. The game server cluster to be updated.
626
- # Only fields specified in update_mask are updated.
627
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
628
- # Required. Mask of fields to update. At least one path must be supplied in
629
- # this field. For the `FieldMask` definition, see
630
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
631
- # @yield [result, operation] Access the result along with the TransportOperation object
632
- # @yieldparam result [::Gapic::Operation]
633
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
634
- #
635
- # @return [::Gapic::Operation]
636
- #
637
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
638
- def update_game_server_cluster request, options = nil
639
- raise ::ArgumentError, "request must be provided" if request.nil?
640
-
641
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::UpdateGameServerClusterRequest
642
-
643
- # Converts hash and nil to an options object
644
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
645
-
646
- # Customize the options with defaults
647
- call_metadata = @config.rpcs.update_game_server_cluster.metadata.to_h
648
-
649
- # Set x-goog-api-client and x-goog-user-project headers
650
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
651
- lib_name: @config.lib_name, lib_version: @config.lib_version,
652
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
653
- transports_version_send: [:rest]
654
-
655
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
656
-
657
- options.apply_defaults timeout: @config.rpcs.update_game_server_cluster.timeout,
658
- metadata: call_metadata,
659
- retry_policy: @config.rpcs.update_game_server_cluster.retry_policy
660
-
661
- options.apply_defaults timeout: @config.timeout,
662
- metadata: @config.metadata,
663
- retry_policy: @config.retry_policy
664
-
665
- @game_server_clusters_service_stub.update_game_server_cluster request, options do |result, operation|
666
- result = ::Gapic::Operation.new result, @operations_client, options: options
667
- yield result, operation if block_given?
668
- return result
669
- end
670
- rescue ::Gapic::Rest::Error => e
671
- raise ::Google::Cloud::Error.from_error(e)
672
- end
673
-
674
- ##
675
- # Previews updating a GameServerCluster.
676
- #
677
- # @overload preview_update_game_server_cluster(request, options = nil)
678
- # Pass arguments to `preview_update_game_server_cluster` via a request object, either of type
679
- # {::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterRequest} or an equivalent Hash.
680
- #
681
- # @param request [::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterRequest, ::Hash]
682
- # A request object representing the call parameters. Required. To specify no
683
- # parameters, or to keep all the default parameter values, pass an empty Hash.
684
- # @param options [::Gapic::CallOptions, ::Hash]
685
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
686
- #
687
- # @overload preview_update_game_server_cluster(game_server_cluster: nil, update_mask: nil, preview_time: nil)
688
- # Pass arguments to `preview_update_game_server_cluster` via keyword arguments. Note that at
689
- # least one keyword argument is required. To specify no parameters, or to keep all
690
- # the default parameter values, pass an empty Hash as a request object (see above).
691
- #
692
- # @param game_server_cluster [::Google::Cloud::Gaming::V1::GameServerCluster, ::Hash]
693
- # Required. The game server cluster to be updated.
694
- # Only fields specified in update_mask are updated.
695
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
696
- # Required. Mask of fields to update. At least one path must be supplied in
697
- # this field. For the `FieldMask` definition, see
698
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
699
- # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
700
- # Optional. The target timestamp to compute the preview.
701
- # @yield [result, operation] Access the result along with the TransportOperation object
702
- # @yieldparam result [::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse]
703
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
704
- #
705
- # @return [::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse]
706
- #
707
- # @raise [::Google::Cloud::Error] if the REST call is aborted.
708
- def preview_update_game_server_cluster request, options = nil
709
- raise ::ArgumentError, "request must be provided" if request.nil?
710
-
711
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterRequest
712
-
713
- # Converts hash and nil to an options object
714
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
715
-
716
- # Customize the options with defaults
717
- call_metadata = @config.rpcs.preview_update_game_server_cluster.metadata.to_h
718
-
719
- # Set x-goog-api-client and x-goog-user-project headers
720
- call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
721
- lib_name: @config.lib_name, lib_version: @config.lib_version,
722
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
723
- transports_version_send: [:rest]
724
-
725
- call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
726
-
727
- options.apply_defaults timeout: @config.rpcs.preview_update_game_server_cluster.timeout,
728
- metadata: call_metadata,
729
- retry_policy: @config.rpcs.preview_update_game_server_cluster.retry_policy
730
-
731
- options.apply_defaults timeout: @config.timeout,
732
- metadata: @config.metadata,
733
- retry_policy: @config.retry_policy
734
-
735
- @game_server_clusters_service_stub.preview_update_game_server_cluster request, options do |result, operation|
736
- yield result, operation if block_given?
737
- return result
738
- end
739
- rescue ::Gapic::Rest::Error => e
740
- raise ::Google::Cloud::Error.from_error(e)
741
- end
742
-
743
- ##
744
- # Configuration class for the GameServerClustersService REST API.
745
- #
746
- # This class represents the configuration for GameServerClustersService REST,
747
- # providing control over timeouts, retry behavior, logging, transport
748
- # parameters, and other low-level controls. Certain parameters can also be
749
- # applied individually to specific RPCs. See
750
- # {::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client::Configuration::Rpcs}
751
- # for a list of RPCs that can be configured independently.
752
- #
753
- # Configuration can be applied globally to all clients, or to a single client
754
- # on construction.
755
- #
756
- # @example
757
- #
758
- # # Modify the global config, setting the timeout for
759
- # # list_game_server_clusters to 20 seconds,
760
- # # and all remaining timeouts to 10 seconds.
761
- # ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client.configure do |config|
762
- # config.timeout = 10.0
763
- # config.rpcs.list_game_server_clusters.timeout = 20.0
764
- # end
765
- #
766
- # # Apply the above configuration only to a new client.
767
- # client = ::Google::Cloud::Gaming::V1::GameServerClustersService::Rest::Client.new do |config|
768
- # config.timeout = 10.0
769
- # config.rpcs.list_game_server_clusters.timeout = 20.0
770
- # end
771
- #
772
- # @!attribute [rw] endpoint
773
- # The hostname or hostname:port of the service endpoint.
774
- # Defaults to `"gameservices.googleapis.com"`.
775
- # @return [::String]
776
- # @!attribute [rw] credentials
777
- # Credentials to send with calls. You may provide any of the following types:
778
- # * (`String`) The path to a service account key file in JSON format
779
- # * (`Hash`) A service account key as a Hash
780
- # * (`Google::Auth::Credentials`) A googleauth credentials object
781
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
782
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
783
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
784
- # * (`nil`) indicating no credentials
785
- # @return [::Object]
786
- # @!attribute [rw] scope
787
- # The OAuth scopes
788
- # @return [::Array<::String>]
789
- # @!attribute [rw] lib_name
790
- # The library name as recorded in instrumentation and logging
791
- # @return [::String]
792
- # @!attribute [rw] lib_version
793
- # The library version as recorded in instrumentation and logging
794
- # @return [::String]
795
- # @!attribute [rw] timeout
796
- # The call timeout in seconds.
797
- # @return [::Numeric]
798
- # @!attribute [rw] metadata
799
- # Additional headers to be sent with the call.
800
- # @return [::Hash{::Symbol=>::String}]
801
- # @!attribute [rw] retry_policy
802
- # The retry policy. The value is a hash with the following keys:
803
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
804
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
805
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
806
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
807
- # trigger a retry.
808
- # @return [::Hash]
809
- # @!attribute [rw] quota_project
810
- # A separate project against which to charge quota.
811
- # @return [::String]
812
- #
813
- class Configuration
814
- extend ::Gapic::Config
815
-
816
- DEFAULT_ENDPOINT = "gameservices.googleapis.com"
817
-
818
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
819
- config_attr :credentials, nil do |value|
820
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
821
- allowed.any? { |klass| klass === value }
822
- end
823
- config_attr :scope, nil, ::String, ::Array, nil
824
- config_attr :lib_name, nil, ::String, nil
825
- config_attr :lib_version, nil, ::String, nil
826
- config_attr :timeout, nil, ::Numeric, nil
827
- config_attr :metadata, nil, ::Hash, nil
828
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
829
- config_attr :quota_project, nil, ::String, nil
830
-
831
- # @private
832
- def initialize parent_config = nil
833
- @parent_config = parent_config unless parent_config.nil?
834
-
835
- yield self if block_given?
836
- end
837
-
838
- ##
839
- # Configurations for individual RPCs
840
- # @return [Rpcs]
841
- #
842
- def rpcs
843
- @rpcs ||= begin
844
- parent_rpcs = nil
845
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
846
- Rpcs.new parent_rpcs
847
- end
848
- end
849
-
850
- ##
851
- # Configuration RPC class for the GameServerClustersService API.
852
- #
853
- # Includes fields providing the configuration for each RPC in this service.
854
- # Each configuration object is of type `Gapic::Config::Method` and includes
855
- # the following configuration fields:
856
- #
857
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
858
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
859
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
860
- # include the following keys:
861
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
862
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
863
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
864
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
865
- # trigger a retry.
866
- #
867
- class Rpcs
868
- ##
869
- # RPC-specific configuration for `list_game_server_clusters`
870
- # @return [::Gapic::Config::Method]
871
- #
872
- attr_reader :list_game_server_clusters
873
- ##
874
- # RPC-specific configuration for `get_game_server_cluster`
875
- # @return [::Gapic::Config::Method]
876
- #
877
- attr_reader :get_game_server_cluster
878
- ##
879
- # RPC-specific configuration for `create_game_server_cluster`
880
- # @return [::Gapic::Config::Method]
881
- #
882
- attr_reader :create_game_server_cluster
883
- ##
884
- # RPC-specific configuration for `preview_create_game_server_cluster`
885
- # @return [::Gapic::Config::Method]
886
- #
887
- attr_reader :preview_create_game_server_cluster
888
- ##
889
- # RPC-specific configuration for `delete_game_server_cluster`
890
- # @return [::Gapic::Config::Method]
891
- #
892
- attr_reader :delete_game_server_cluster
893
- ##
894
- # RPC-specific configuration for `preview_delete_game_server_cluster`
895
- # @return [::Gapic::Config::Method]
896
- #
897
- attr_reader :preview_delete_game_server_cluster
898
- ##
899
- # RPC-specific configuration for `update_game_server_cluster`
900
- # @return [::Gapic::Config::Method]
901
- #
902
- attr_reader :update_game_server_cluster
903
- ##
904
- # RPC-specific configuration for `preview_update_game_server_cluster`
905
- # @return [::Gapic::Config::Method]
906
- #
907
- attr_reader :preview_update_game_server_cluster
908
-
909
- # @private
910
- def initialize parent_rpcs = nil
911
- list_game_server_clusters_config = parent_rpcs.list_game_server_clusters if parent_rpcs.respond_to? :list_game_server_clusters
912
- @list_game_server_clusters = ::Gapic::Config::Method.new list_game_server_clusters_config
913
- get_game_server_cluster_config = parent_rpcs.get_game_server_cluster if parent_rpcs.respond_to? :get_game_server_cluster
914
- @get_game_server_cluster = ::Gapic::Config::Method.new get_game_server_cluster_config
915
- create_game_server_cluster_config = parent_rpcs.create_game_server_cluster if parent_rpcs.respond_to? :create_game_server_cluster
916
- @create_game_server_cluster = ::Gapic::Config::Method.new create_game_server_cluster_config
917
- preview_create_game_server_cluster_config = parent_rpcs.preview_create_game_server_cluster if parent_rpcs.respond_to? :preview_create_game_server_cluster
918
- @preview_create_game_server_cluster = ::Gapic::Config::Method.new preview_create_game_server_cluster_config
919
- delete_game_server_cluster_config = parent_rpcs.delete_game_server_cluster if parent_rpcs.respond_to? :delete_game_server_cluster
920
- @delete_game_server_cluster = ::Gapic::Config::Method.new delete_game_server_cluster_config
921
- preview_delete_game_server_cluster_config = parent_rpcs.preview_delete_game_server_cluster if parent_rpcs.respond_to? :preview_delete_game_server_cluster
922
- @preview_delete_game_server_cluster = ::Gapic::Config::Method.new preview_delete_game_server_cluster_config
923
- update_game_server_cluster_config = parent_rpcs.update_game_server_cluster if parent_rpcs.respond_to? :update_game_server_cluster
924
- @update_game_server_cluster = ::Gapic::Config::Method.new update_game_server_cluster_config
925
- preview_update_game_server_cluster_config = parent_rpcs.preview_update_game_server_cluster if parent_rpcs.respond_to? :preview_update_game_server_cluster
926
- @preview_update_game_server_cluster = ::Gapic::Config::Method.new preview_update_game_server_cluster_config
927
-
928
- yield self if block_given?
929
- end
930
- end
931
- end
932
- end
933
- end
934
- end
935
- end
936
- end
937
- end
938
- end