google-cloud-gaming-v1 0.5.0 → 0.7.0

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