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,1259 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2020 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
-
22
- module Google
23
- module Cloud
24
- module Gaming
25
- module V1
26
- module GameServerDeploymentsService
27
- ##
28
- # Client for the GameServerDeploymentsService service.
29
- #
30
- # The game server deployment is used to control the deployment of Agones
31
- # fleets.
32
- #
33
- class Client
34
- include Paths
35
-
36
- # @private
37
- attr_reader :game_server_deployments_service_stub
38
-
39
- ##
40
- # Configure the GameServerDeploymentsService Client class.
41
- #
42
- # See {::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client::Configuration}
43
- # for a description of the configuration fields.
44
- #
45
- # @example
46
- #
47
- # # Modify the configuration for all GameServerDeploymentsService clients
48
- # ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
51
- #
52
- # @yield [config] Configure the Client client.
53
- # @yieldparam config [Client::Configuration]
54
- #
55
- # @return [Client::Configuration]
56
- #
57
- def self.configure
58
- @configure ||= begin
59
- namespace = ["Google", "Cloud", "Gaming", "V1"]
60
- parent_config = while namespace.any?
61
- parent_name = namespace.join "::"
62
- parent_const = const_get parent_name
63
- break parent_const.configure if parent_const.respond_to? :configure
64
- namespace.pop
65
- end
66
- default_config = Client::Configuration.new parent_config
67
-
68
- default_config.rpcs.list_game_server_deployments.timeout = 60.0
69
- default_config.rpcs.list_game_server_deployments.retry_policy = {
70
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
71
- }
72
-
73
- default_config.rpcs.get_game_server_deployment.timeout = 60.0
74
- default_config.rpcs.get_game_server_deployment.retry_policy = {
75
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
76
- }
77
-
78
- default_config.rpcs.create_game_server_deployment.timeout = 60.0
79
-
80
- default_config.rpcs.delete_game_server_deployment.timeout = 60.0
81
-
82
- default_config.rpcs.update_game_server_deployment.timeout = 60.0
83
-
84
- default_config.rpcs.get_game_server_deployment_rollout.timeout = 60.0
85
- default_config.rpcs.get_game_server_deployment_rollout.retry_policy = {
86
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
87
- }
88
-
89
- default_config.rpcs.update_game_server_deployment_rollout.timeout = 60.0
90
-
91
- default_config.rpcs.preview_game_server_deployment_rollout.timeout = 60.0
92
- default_config.rpcs.preview_game_server_deployment_rollout.retry_policy = {
93
- initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
- }
95
-
96
- default_config.rpcs.fetch_deployment_state.timeout = 60.0
97
- default_config.rpcs.fetch_deployment_state.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 GameServerDeploymentsService 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::GameServerDeploymentsService::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 GameServerDeploymentsService client object.
129
- #
130
- # @example
131
- #
132
- # # Create a client using the default configuration
133
- # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
134
- #
135
- # # Create a client using a custom configuration
136
- # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new do |config|
137
- # config.timeout = 10.0
138
- # end
139
- #
140
- # @yield [config] Configure the GameServerDeploymentsService client.
141
- # @yieldparam config [Client::Configuration]
142
- #
143
- def initialize
144
- # These require statements are intentionally placed here to initialize
145
- # the gRPC module only when it's required.
146
- # See https://github.com/googleapis/toolkit/issues/446
147
- require "gapic/grpc"
148
- require "google/cloud/gaming/v1/game_server_deployments_service_services_pb"
149
-
150
- # Create the configuration object
151
- @config = Configuration.new Client.configure
152
-
153
- # Yield the configuration if needed
154
- yield @config if block_given?
155
-
156
- # Create credentials
157
- credentials = @config.credentials
158
- # Use self-signed JWT if the endpoint is unchanged from default,
159
- # but only if the default endpoint does not have a region prefix.
160
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
161
- !@config.endpoint.split(".").first.include?("-")
162
- credentials ||= Credentials.default scope: @config.scope,
163
- enable_self_signed_jwt: enable_self_signed_jwt
164
- if credentials.is_a?(::String) || credentials.is_a?(::Hash)
165
- credentials = Credentials.new credentials, scope: @config.scope
166
- end
167
- @quota_project_id = @config.quota_project
168
- @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
169
-
170
- @operations_client = Operations.new do |config|
171
- config.credentials = credentials
172
- config.quota_project = @quota_project_id
173
- config.endpoint = @config.endpoint
174
- end
175
-
176
- @game_server_deployments_service_stub = ::Gapic::ServiceStub.new(
177
- ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Stub,
178
- credentials: credentials,
179
- endpoint: @config.endpoint,
180
- channel_args: @config.channel_args,
181
- interceptors: @config.interceptors
182
- )
183
- end
184
-
185
- ##
186
- # Get the associated client for long-running operations.
187
- #
188
- # @return [::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Operations]
189
- #
190
- attr_reader :operations_client
191
-
192
- # Service calls
193
-
194
- ##
195
- # Lists game server deployments in a given project and location.
196
- #
197
- # @overload list_game_server_deployments(request, options = nil)
198
- # Pass arguments to `list_game_server_deployments` via a request object, either of type
199
- # {::Google::Cloud::Gaming::V1::ListGameServerDeploymentsRequest} or an equivalent Hash.
200
- #
201
- # @param request [::Google::Cloud::Gaming::V1::ListGameServerDeploymentsRequest, ::Hash]
202
- # A request object representing the call parameters. Required. To specify no
203
- # parameters, or to keep all the default parameter values, pass an empty Hash.
204
- # @param options [::Gapic::CallOptions, ::Hash]
205
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
206
- #
207
- # @overload list_game_server_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
208
- # Pass arguments to `list_game_server_deployments` via keyword arguments. Note that at
209
- # least one keyword argument is required. To specify no parameters, or to keep all
210
- # the default parameter values, pass an empty Hash as a request object (see above).
211
- #
212
- # @param parent [::String]
213
- # Required. The parent resource name, in the following form:
214
- # `projects/{project}/locations/{location}`.
215
- # @param page_size [::Integer]
216
- # Optional. The maximum number of items to return. If unspecified, the server
217
- # will pick an appropriate default. The server may return fewer items than
218
- # requested. A caller should only rely on response's
219
- # {::Google::Cloud::Gaming::V1::ListGameServerDeploymentsResponse#next_page_token next_page_token} to
220
- # determine if there are more GameServerDeployments left to be queried.
221
- # @param page_token [::String]
222
- # Optional. The next_page_token value returned from a previous List request,
223
- # if any.
224
- # @param filter [::String]
225
- # Optional. The filter to apply to list results.
226
- # @param order_by [::String]
227
- # Optional. Specifies the ordering of results following syntax at
228
- # https://cloud.google.com/apis/design/design_patterns#sorting_order.
229
- #
230
- # @yield [response, operation] Access the result along with the RPC operation
231
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerDeployment>]
232
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
233
- #
234
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerDeployment>]
235
- #
236
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
237
- #
238
- # @example Basic example
239
- # require "google/cloud/gaming/v1"
240
- #
241
- # # Create a client object. The client can be reused for multiple calls.
242
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
243
- #
244
- # # Create a request. To set request fields, pass in keyword arguments.
245
- # request = Google::Cloud::Gaming::V1::ListGameServerDeploymentsRequest.new
246
- #
247
- # # Call the list_game_server_deployments method.
248
- # result = client.list_game_server_deployments request
249
- #
250
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
251
- # # over elements, and API calls will be issued to fetch pages as needed.
252
- # result.each do |item|
253
- # # Each element is of type ::Google::Cloud::Gaming::V1::GameServerDeployment.
254
- # p item
255
- # end
256
- #
257
- def list_game_server_deployments request, options = nil
258
- raise ::ArgumentError, "request must be provided" if request.nil?
259
-
260
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::ListGameServerDeploymentsRequest
261
-
262
- # Converts hash and nil to an options object
263
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
264
-
265
- # Customize the options with defaults
266
- metadata = @config.rpcs.list_game_server_deployments.metadata.to_h
267
-
268
- # Set x-goog-api-client and x-goog-user-project headers
269
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
270
- lib_name: @config.lib_name, lib_version: @config.lib_version,
271
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
272
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
273
-
274
- header_params = {}
275
- if request.parent
276
- header_params["parent"] = request.parent
277
- end
278
-
279
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
280
- metadata[:"x-goog-request-params"] ||= request_params_header
281
-
282
- options.apply_defaults timeout: @config.rpcs.list_game_server_deployments.timeout,
283
- metadata: metadata,
284
- retry_policy: @config.rpcs.list_game_server_deployments.retry_policy
285
-
286
- options.apply_defaults timeout: @config.timeout,
287
- metadata: @config.metadata,
288
- retry_policy: @config.retry_policy
289
-
290
- @game_server_deployments_service_stub.call_rpc :list_game_server_deployments, request, options: options do |response, operation|
291
- response = ::Gapic::PagedEnumerable.new @game_server_deployments_service_stub, :list_game_server_deployments, request, response, operation, options
292
- yield response, operation if block_given?
293
- return response
294
- end
295
- rescue ::GRPC::BadStatus => e
296
- raise ::Google::Cloud::Error.from_error(e)
297
- end
298
-
299
- ##
300
- # Gets details of a single game server deployment.
301
- #
302
- # @overload get_game_server_deployment(request, options = nil)
303
- # Pass arguments to `get_game_server_deployment` via a request object, either of type
304
- # {::Google::Cloud::Gaming::V1::GetGameServerDeploymentRequest} or an equivalent Hash.
305
- #
306
- # @param request [::Google::Cloud::Gaming::V1::GetGameServerDeploymentRequest, ::Hash]
307
- # A request object representing the call parameters. Required. To specify no
308
- # parameters, or to keep all the default parameter values, pass an empty Hash.
309
- # @param options [::Gapic::CallOptions, ::Hash]
310
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
311
- #
312
- # @overload get_game_server_deployment(name: nil)
313
- # Pass arguments to `get_game_server_deployment` via keyword arguments. Note that at
314
- # least one keyword argument is required. To specify no parameters, or to keep all
315
- # the default parameter values, pass an empty Hash as a request object (see above).
316
- #
317
- # @param name [::String]
318
- # Required. The name of the game server delpoyment to retrieve, in the following form:
319
- # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
320
- #
321
- # @yield [response, operation] Access the result along with the RPC operation
322
- # @yieldparam response [::Google::Cloud::Gaming::V1::GameServerDeployment]
323
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
324
- #
325
- # @return [::Google::Cloud::Gaming::V1::GameServerDeployment]
326
- #
327
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
328
- #
329
- # @example Basic example
330
- # require "google/cloud/gaming/v1"
331
- #
332
- # # Create a client object. The client can be reused for multiple calls.
333
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
334
- #
335
- # # Create a request. To set request fields, pass in keyword arguments.
336
- # request = Google::Cloud::Gaming::V1::GetGameServerDeploymentRequest.new
337
- #
338
- # # Call the get_game_server_deployment method.
339
- # result = client.get_game_server_deployment request
340
- #
341
- # # The returned object is of type Google::Cloud::Gaming::V1::GameServerDeployment.
342
- # p result
343
- #
344
- def get_game_server_deployment request, options = nil
345
- raise ::ArgumentError, "request must be provided" if request.nil?
346
-
347
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::GetGameServerDeploymentRequest
348
-
349
- # Converts hash and nil to an options object
350
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
351
-
352
- # Customize the options with defaults
353
- metadata = @config.rpcs.get_game_server_deployment.metadata.to_h
354
-
355
- # Set x-goog-api-client and x-goog-user-project headers
356
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
357
- lib_name: @config.lib_name, lib_version: @config.lib_version,
358
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
359
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
-
361
- header_params = {}
362
- if request.name
363
- header_params["name"] = request.name
364
- end
365
-
366
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
367
- metadata[:"x-goog-request-params"] ||= request_params_header
368
-
369
- options.apply_defaults timeout: @config.rpcs.get_game_server_deployment.timeout,
370
- metadata: metadata,
371
- retry_policy: @config.rpcs.get_game_server_deployment.retry_policy
372
-
373
- options.apply_defaults timeout: @config.timeout,
374
- metadata: @config.metadata,
375
- retry_policy: @config.retry_policy
376
-
377
- @game_server_deployments_service_stub.call_rpc :get_game_server_deployment, request, options: options do |response, operation|
378
- yield response, operation if block_given?
379
- return response
380
- end
381
- rescue ::GRPC::BadStatus => e
382
- raise ::Google::Cloud::Error.from_error(e)
383
- end
384
-
385
- ##
386
- # Creates a new game server deployment in a given project and location.
387
- #
388
- # @overload create_game_server_deployment(request, options = nil)
389
- # Pass arguments to `create_game_server_deployment` via a request object, either of type
390
- # {::Google::Cloud::Gaming::V1::CreateGameServerDeploymentRequest} or an equivalent Hash.
391
- #
392
- # @param request [::Google::Cloud::Gaming::V1::CreateGameServerDeploymentRequest, ::Hash]
393
- # A request object representing the call parameters. Required. To specify no
394
- # parameters, or to keep all the default parameter values, pass an empty Hash.
395
- # @param options [::Gapic::CallOptions, ::Hash]
396
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
397
- #
398
- # @overload create_game_server_deployment(parent: nil, deployment_id: nil, game_server_deployment: nil)
399
- # Pass arguments to `create_game_server_deployment` via keyword arguments. Note that at
400
- # least one keyword argument is required. To specify no parameters, or to keep all
401
- # the default parameter values, pass an empty Hash as a request object (see above).
402
- #
403
- # @param parent [::String]
404
- # Required. The parent resource name, in the following form:
405
- # `projects/{project}/locations/{location}`.
406
- # @param deployment_id [::String]
407
- # Required. The ID of the game server delpoyment resource to be created.
408
- # @param game_server_deployment [::Google::Cloud::Gaming::V1::GameServerDeployment, ::Hash]
409
- # Required. The game server delpoyment resource to be created.
410
- #
411
- # @yield [response, operation] Access the result along with the RPC operation
412
- # @yieldparam response [::Gapic::Operation]
413
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
414
- #
415
- # @return [::Gapic::Operation]
416
- #
417
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
418
- #
419
- # @example Basic example
420
- # require "google/cloud/gaming/v1"
421
- #
422
- # # Create a client object. The client can be reused for multiple calls.
423
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
424
- #
425
- # # Create a request. To set request fields, pass in keyword arguments.
426
- # request = Google::Cloud::Gaming::V1::CreateGameServerDeploymentRequest.new
427
- #
428
- # # Call the create_game_server_deployment method.
429
- # result = client.create_game_server_deployment request
430
- #
431
- # # The returned object is of type Gapic::Operation. You can use it to
432
- # # check the status of an operation, cancel it, or wait for results.
433
- # # Here is how to wait for a response.
434
- # result.wait_until_done! timeout: 60
435
- # if result.response?
436
- # p result.response
437
- # else
438
- # puts "No response received."
439
- # end
440
- #
441
- def create_game_server_deployment request, options = nil
442
- raise ::ArgumentError, "request must be provided" if request.nil?
443
-
444
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::CreateGameServerDeploymentRequest
445
-
446
- # Converts hash and nil to an options object
447
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
448
-
449
- # Customize the options with defaults
450
- metadata = @config.rpcs.create_game_server_deployment.metadata.to_h
451
-
452
- # Set x-goog-api-client and x-goog-user-project headers
453
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
- lib_name: @config.lib_name, lib_version: @config.lib_version,
455
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
456
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
-
458
- header_params = {}
459
- if request.parent
460
- header_params["parent"] = request.parent
461
- end
462
-
463
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
464
- metadata[:"x-goog-request-params"] ||= request_params_header
465
-
466
- options.apply_defaults timeout: @config.rpcs.create_game_server_deployment.timeout,
467
- metadata: metadata,
468
- retry_policy: @config.rpcs.create_game_server_deployment.retry_policy
469
-
470
- options.apply_defaults timeout: @config.timeout,
471
- metadata: @config.metadata,
472
- retry_policy: @config.retry_policy
473
-
474
- @game_server_deployments_service_stub.call_rpc :create_game_server_deployment, request, options: options do |response, operation|
475
- response = ::Gapic::Operation.new response, @operations_client, options: options
476
- yield response, operation if block_given?
477
- return response
478
- end
479
- rescue ::GRPC::BadStatus => e
480
- raise ::Google::Cloud::Error.from_error(e)
481
- end
482
-
483
- ##
484
- # Deletes a single game server deployment.
485
- #
486
- # @overload delete_game_server_deployment(request, options = nil)
487
- # Pass arguments to `delete_game_server_deployment` via a request object, either of type
488
- # {::Google::Cloud::Gaming::V1::DeleteGameServerDeploymentRequest} or an equivalent Hash.
489
- #
490
- # @param request [::Google::Cloud::Gaming::V1::DeleteGameServerDeploymentRequest, ::Hash]
491
- # A request object representing the call parameters. Required. To specify no
492
- # parameters, or to keep all the default parameter values, pass an empty Hash.
493
- # @param options [::Gapic::CallOptions, ::Hash]
494
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
495
- #
496
- # @overload delete_game_server_deployment(name: nil)
497
- # Pass arguments to `delete_game_server_deployment` via keyword arguments. Note that at
498
- # least one keyword argument is required. To specify no parameters, or to keep all
499
- # the default parameter values, pass an empty Hash as a request object (see above).
500
- #
501
- # @param name [::String]
502
- # Required. The name of the game server delpoyment to delete, in the following form:
503
- # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
504
- #
505
- # @yield [response, operation] Access the result along with the RPC operation
506
- # @yieldparam response [::Gapic::Operation]
507
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
508
- #
509
- # @return [::Gapic::Operation]
510
- #
511
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
512
- #
513
- # @example Basic example
514
- # require "google/cloud/gaming/v1"
515
- #
516
- # # Create a client object. The client can be reused for multiple calls.
517
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
518
- #
519
- # # Create a request. To set request fields, pass in keyword arguments.
520
- # request = Google::Cloud::Gaming::V1::DeleteGameServerDeploymentRequest.new
521
- #
522
- # # Call the delete_game_server_deployment method.
523
- # result = client.delete_game_server_deployment request
524
- #
525
- # # The returned object is of type Gapic::Operation. You can use it to
526
- # # check the status of an operation, cancel it, or wait for results.
527
- # # Here is how to wait for a response.
528
- # result.wait_until_done! timeout: 60
529
- # if result.response?
530
- # p result.response
531
- # else
532
- # puts "No response received."
533
- # end
534
- #
535
- def delete_game_server_deployment request, options = nil
536
- raise ::ArgumentError, "request must be provided" if request.nil?
537
-
538
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::DeleteGameServerDeploymentRequest
539
-
540
- # Converts hash and nil to an options object
541
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
542
-
543
- # Customize the options with defaults
544
- metadata = @config.rpcs.delete_game_server_deployment.metadata.to_h
545
-
546
- # Set x-goog-api-client and x-goog-user-project headers
547
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
548
- lib_name: @config.lib_name, lib_version: @config.lib_version,
549
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
550
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
551
-
552
- header_params = {}
553
- if request.name
554
- header_params["name"] = request.name
555
- end
556
-
557
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
558
- metadata[:"x-goog-request-params"] ||= request_params_header
559
-
560
- options.apply_defaults timeout: @config.rpcs.delete_game_server_deployment.timeout,
561
- metadata: metadata,
562
- retry_policy: @config.rpcs.delete_game_server_deployment.retry_policy
563
-
564
- options.apply_defaults timeout: @config.timeout,
565
- metadata: @config.metadata,
566
- retry_policy: @config.retry_policy
567
-
568
- @game_server_deployments_service_stub.call_rpc :delete_game_server_deployment, request, options: options do |response, operation|
569
- response = ::Gapic::Operation.new response, @operations_client, options: options
570
- yield response, operation if block_given?
571
- return response
572
- end
573
- rescue ::GRPC::BadStatus => e
574
- raise ::Google::Cloud::Error.from_error(e)
575
- end
576
-
577
- ##
578
- # Patches a game server deployment.
579
- #
580
- # @overload update_game_server_deployment(request, options = nil)
581
- # Pass arguments to `update_game_server_deployment` via a request object, either of type
582
- # {::Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRequest} or an equivalent Hash.
583
- #
584
- # @param request [::Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRequest, ::Hash]
585
- # A request object representing the call parameters. Required. To specify no
586
- # parameters, or to keep all the default parameter values, pass an empty Hash.
587
- # @param options [::Gapic::CallOptions, ::Hash]
588
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
589
- #
590
- # @overload update_game_server_deployment(game_server_deployment: nil, update_mask: nil)
591
- # Pass arguments to `update_game_server_deployment` via keyword arguments. Note that at
592
- # least one keyword argument is required. To specify no parameters, or to keep all
593
- # the default parameter values, pass an empty Hash as a request object (see above).
594
- #
595
- # @param game_server_deployment [::Google::Cloud::Gaming::V1::GameServerDeployment, ::Hash]
596
- # Required. The game server delpoyment to be updated.
597
- # Only fields specified in update_mask are updated.
598
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
599
- # Required. Mask of fields to update. At least one path must be supplied in
600
- # this field. For the `FieldMask` definition, see
601
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
602
- #
603
- # @yield [response, operation] Access the result along with the RPC operation
604
- # @yieldparam response [::Gapic::Operation]
605
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
606
- #
607
- # @return [::Gapic::Operation]
608
- #
609
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
610
- #
611
- # @example Basic example
612
- # require "google/cloud/gaming/v1"
613
- #
614
- # # Create a client object. The client can be reused for multiple calls.
615
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
616
- #
617
- # # Create a request. To set request fields, pass in keyword arguments.
618
- # request = Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRequest.new
619
- #
620
- # # Call the update_game_server_deployment method.
621
- # result = client.update_game_server_deployment request
622
- #
623
- # # The returned object is of type Gapic::Operation. You can use it to
624
- # # check the status of an operation, cancel it, or wait for results.
625
- # # Here is how to wait for a response.
626
- # result.wait_until_done! timeout: 60
627
- # if result.response?
628
- # p result.response
629
- # else
630
- # puts "No response received."
631
- # end
632
- #
633
- def update_game_server_deployment request, options = nil
634
- raise ::ArgumentError, "request must be provided" if request.nil?
635
-
636
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRequest
637
-
638
- # Converts hash and nil to an options object
639
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
640
-
641
- # Customize the options with defaults
642
- metadata = @config.rpcs.update_game_server_deployment.metadata.to_h
643
-
644
- # Set x-goog-api-client and x-goog-user-project headers
645
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
646
- lib_name: @config.lib_name, lib_version: @config.lib_version,
647
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
648
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
649
-
650
- header_params = {}
651
- if request.game_server_deployment&.name
652
- header_params["game_server_deployment.name"] = request.game_server_deployment.name
653
- end
654
-
655
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
656
- metadata[:"x-goog-request-params"] ||= request_params_header
657
-
658
- options.apply_defaults timeout: @config.rpcs.update_game_server_deployment.timeout,
659
- metadata: metadata,
660
- retry_policy: @config.rpcs.update_game_server_deployment.retry_policy
661
-
662
- options.apply_defaults timeout: @config.timeout,
663
- metadata: @config.metadata,
664
- retry_policy: @config.retry_policy
665
-
666
- @game_server_deployments_service_stub.call_rpc :update_game_server_deployment, request, options: options do |response, operation|
667
- response = ::Gapic::Operation.new response, @operations_client, options: options
668
- yield response, operation if block_given?
669
- return response
670
- end
671
- rescue ::GRPC::BadStatus => e
672
- raise ::Google::Cloud::Error.from_error(e)
673
- end
674
-
675
- ##
676
- # Gets details a single game server deployment rollout.
677
- #
678
- # @overload get_game_server_deployment_rollout(request, options = nil)
679
- # Pass arguments to `get_game_server_deployment_rollout` via a request object, either of type
680
- # {::Google::Cloud::Gaming::V1::GetGameServerDeploymentRolloutRequest} or an equivalent Hash.
681
- #
682
- # @param request [::Google::Cloud::Gaming::V1::GetGameServerDeploymentRolloutRequest, ::Hash]
683
- # A request object representing the call parameters. Required. To specify no
684
- # parameters, or to keep all the default parameter values, pass an empty Hash.
685
- # @param options [::Gapic::CallOptions, ::Hash]
686
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
687
- #
688
- # @overload get_game_server_deployment_rollout(name: nil)
689
- # Pass arguments to `get_game_server_deployment_rollout` via keyword arguments. Note that at
690
- # least one keyword argument is required. To specify no parameters, or to keep all
691
- # the default parameter values, pass an empty Hash as a request object (see above).
692
- #
693
- # @param name [::String]
694
- # Required. The name of the game server delpoyment to retrieve, in the following form:
695
- # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
696
- #
697
- # @yield [response, operation] Access the result along with the RPC operation
698
- # @yieldparam response [::Google::Cloud::Gaming::V1::GameServerDeploymentRollout]
699
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
700
- #
701
- # @return [::Google::Cloud::Gaming::V1::GameServerDeploymentRollout]
702
- #
703
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
704
- #
705
- # @example Basic example
706
- # require "google/cloud/gaming/v1"
707
- #
708
- # # Create a client object. The client can be reused for multiple calls.
709
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
710
- #
711
- # # Create a request. To set request fields, pass in keyword arguments.
712
- # request = Google::Cloud::Gaming::V1::GetGameServerDeploymentRolloutRequest.new
713
- #
714
- # # Call the get_game_server_deployment_rollout method.
715
- # result = client.get_game_server_deployment_rollout request
716
- #
717
- # # The returned object is of type Google::Cloud::Gaming::V1::GameServerDeploymentRollout.
718
- # p result
719
- #
720
- def get_game_server_deployment_rollout request, options = nil
721
- raise ::ArgumentError, "request must be provided" if request.nil?
722
-
723
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::GetGameServerDeploymentRolloutRequest
724
-
725
- # Converts hash and nil to an options object
726
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
727
-
728
- # Customize the options with defaults
729
- metadata = @config.rpcs.get_game_server_deployment_rollout.metadata.to_h
730
-
731
- # Set x-goog-api-client and x-goog-user-project headers
732
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
733
- lib_name: @config.lib_name, lib_version: @config.lib_version,
734
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
735
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
736
-
737
- header_params = {}
738
- if request.name
739
- header_params["name"] = request.name
740
- end
741
-
742
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
743
- metadata[:"x-goog-request-params"] ||= request_params_header
744
-
745
- options.apply_defaults timeout: @config.rpcs.get_game_server_deployment_rollout.timeout,
746
- metadata: metadata,
747
- retry_policy: @config.rpcs.get_game_server_deployment_rollout.retry_policy
748
-
749
- options.apply_defaults timeout: @config.timeout,
750
- metadata: @config.metadata,
751
- retry_policy: @config.retry_policy
752
-
753
- @game_server_deployments_service_stub.call_rpc :get_game_server_deployment_rollout, request, options: options do |response, operation|
754
- yield response, operation if block_given?
755
- return response
756
- end
757
- rescue ::GRPC::BadStatus => e
758
- raise ::Google::Cloud::Error.from_error(e)
759
- end
760
-
761
- ##
762
- # Patches a single game server deployment rollout.
763
- # The method will not return an error if the update does not affect any
764
- # existing realms. For example - if the default_game_server_config is changed
765
- # but all existing realms use the override, that is valid. Similarly, if a
766
- # non existing realm is explicitly called out in game_server_config_overrides
767
- # field, that will also not result in an error.
768
- #
769
- # @overload update_game_server_deployment_rollout(request, options = nil)
770
- # Pass arguments to `update_game_server_deployment_rollout` via a request object, either of type
771
- # {::Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRolloutRequest} or an equivalent Hash.
772
- #
773
- # @param request [::Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRolloutRequest, ::Hash]
774
- # A request object representing the call parameters. Required. To specify no
775
- # parameters, or to keep all the default parameter values, pass an empty Hash.
776
- # @param options [::Gapic::CallOptions, ::Hash]
777
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
778
- #
779
- # @overload update_game_server_deployment_rollout(rollout: nil, update_mask: nil)
780
- # Pass arguments to `update_game_server_deployment_rollout` via keyword arguments. Note that at
781
- # least one keyword argument is required. To specify no parameters, or to keep all
782
- # the default parameter values, pass an empty Hash as a request object (see above).
783
- #
784
- # @param rollout [::Google::Cloud::Gaming::V1::GameServerDeploymentRollout, ::Hash]
785
- # Required. The game server delpoyment rollout to be updated.
786
- # Only fields specified in update_mask are updated.
787
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
788
- # Required. Mask of fields to update. At least one path must be supplied in
789
- # this field. For the `FieldMask` definition, see
790
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
791
- #
792
- # @yield [response, operation] Access the result along with the RPC operation
793
- # @yieldparam response [::Gapic::Operation]
794
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
795
- #
796
- # @return [::Gapic::Operation]
797
- #
798
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
799
- #
800
- # @example Basic example
801
- # require "google/cloud/gaming/v1"
802
- #
803
- # # Create a client object. The client can be reused for multiple calls.
804
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
805
- #
806
- # # Create a request. To set request fields, pass in keyword arguments.
807
- # request = Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRolloutRequest.new
808
- #
809
- # # Call the update_game_server_deployment_rollout method.
810
- # result = client.update_game_server_deployment_rollout request
811
- #
812
- # # The returned object is of type Gapic::Operation. You can use it to
813
- # # check the status of an operation, cancel it, or wait for results.
814
- # # Here is how to wait for a response.
815
- # result.wait_until_done! timeout: 60
816
- # if result.response?
817
- # p result.response
818
- # else
819
- # puts "No response received."
820
- # end
821
- #
822
- def update_game_server_deployment_rollout request, options = nil
823
- raise ::ArgumentError, "request must be provided" if request.nil?
824
-
825
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::UpdateGameServerDeploymentRolloutRequest
826
-
827
- # Converts hash and nil to an options object
828
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
829
-
830
- # Customize the options with defaults
831
- metadata = @config.rpcs.update_game_server_deployment_rollout.metadata.to_h
832
-
833
- # Set x-goog-api-client and x-goog-user-project headers
834
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
835
- lib_name: @config.lib_name, lib_version: @config.lib_version,
836
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
837
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
838
-
839
- header_params = {}
840
- if request.rollout&.name
841
- header_params["rollout.name"] = request.rollout.name
842
- end
843
-
844
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
845
- metadata[:"x-goog-request-params"] ||= request_params_header
846
-
847
- options.apply_defaults timeout: @config.rpcs.update_game_server_deployment_rollout.timeout,
848
- metadata: metadata,
849
- retry_policy: @config.rpcs.update_game_server_deployment_rollout.retry_policy
850
-
851
- options.apply_defaults timeout: @config.timeout,
852
- metadata: @config.metadata,
853
- retry_policy: @config.retry_policy
854
-
855
- @game_server_deployments_service_stub.call_rpc :update_game_server_deployment_rollout, request, options: options do |response, operation|
856
- response = ::Gapic::Operation.new response, @operations_client, options: options
857
- yield response, operation if block_given?
858
- return response
859
- end
860
- rescue ::GRPC::BadStatus => e
861
- raise ::Google::Cloud::Error.from_error(e)
862
- end
863
-
864
- ##
865
- # Previews the game server deployment rollout. This API does not mutate the
866
- # rollout resource.
867
- #
868
- # @overload preview_game_server_deployment_rollout(request, options = nil)
869
- # Pass arguments to `preview_game_server_deployment_rollout` via a request object, either of type
870
- # {::Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutRequest} or an equivalent Hash.
871
- #
872
- # @param request [::Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutRequest, ::Hash]
873
- # A request object representing the call parameters. Required. To specify no
874
- # parameters, or to keep all the default parameter values, pass an empty Hash.
875
- # @param options [::Gapic::CallOptions, ::Hash]
876
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
877
- #
878
- # @overload preview_game_server_deployment_rollout(rollout: nil, update_mask: nil, preview_time: nil)
879
- # Pass arguments to `preview_game_server_deployment_rollout` via keyword arguments. Note that at
880
- # least one keyword argument is required. To specify no parameters, or to keep all
881
- # the default parameter values, pass an empty Hash as a request object (see above).
882
- #
883
- # @param rollout [::Google::Cloud::Gaming::V1::GameServerDeploymentRollout, ::Hash]
884
- # Required. The game server deployment rollout to be updated.
885
- # Only fields specified in update_mask are updated.
886
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
887
- # Optional. Mask of fields to update. At least one path must be supplied in
888
- # this field. For the `FieldMask` definition, see
889
- # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
890
- # @param preview_time [::Google::Protobuf::Timestamp, ::Hash]
891
- # Optional. The target timestamp to compute the preview. Defaults to the immediately
892
- # after the proposed rollout completes.
893
- #
894
- # @yield [response, operation] Access the result along with the RPC operation
895
- # @yieldparam response [::Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutResponse]
896
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
897
- #
898
- # @return [::Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutResponse]
899
- #
900
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
901
- #
902
- # @example Basic example
903
- # require "google/cloud/gaming/v1"
904
- #
905
- # # Create a client object. The client can be reused for multiple calls.
906
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
907
- #
908
- # # Create a request. To set request fields, pass in keyword arguments.
909
- # request = Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutRequest.new
910
- #
911
- # # Call the preview_game_server_deployment_rollout method.
912
- # result = client.preview_game_server_deployment_rollout request
913
- #
914
- # # The returned object is of type Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutResponse.
915
- # p result
916
- #
917
- def preview_game_server_deployment_rollout request, options = nil
918
- raise ::ArgumentError, "request must be provided" if request.nil?
919
-
920
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::PreviewGameServerDeploymentRolloutRequest
921
-
922
- # Converts hash and nil to an options object
923
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
924
-
925
- # Customize the options with defaults
926
- metadata = @config.rpcs.preview_game_server_deployment_rollout.metadata.to_h
927
-
928
- # Set x-goog-api-client and x-goog-user-project headers
929
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
930
- lib_name: @config.lib_name, lib_version: @config.lib_version,
931
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
932
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
933
-
934
- header_params = {}
935
- if request.rollout&.name
936
- header_params["rollout.name"] = request.rollout.name
937
- end
938
-
939
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
940
- metadata[:"x-goog-request-params"] ||= request_params_header
941
-
942
- options.apply_defaults timeout: @config.rpcs.preview_game_server_deployment_rollout.timeout,
943
- metadata: metadata,
944
- retry_policy: @config.rpcs.preview_game_server_deployment_rollout.retry_policy
945
-
946
- options.apply_defaults timeout: @config.timeout,
947
- metadata: @config.metadata,
948
- retry_policy: @config.retry_policy
949
-
950
- @game_server_deployments_service_stub.call_rpc :preview_game_server_deployment_rollout, request, options: options do |response, operation|
951
- yield response, operation if block_given?
952
- return response
953
- end
954
- rescue ::GRPC::BadStatus => e
955
- raise ::Google::Cloud::Error.from_error(e)
956
- end
957
-
958
- ##
959
- # Retrieves information about the current state of the game server
960
- # deployment. Gathers all the Agones fleets and Agones autoscalers,
961
- # including fleets running an older version of the game server deployment.
962
- #
963
- # @overload fetch_deployment_state(request, options = nil)
964
- # Pass arguments to `fetch_deployment_state` via a request object, either of type
965
- # {::Google::Cloud::Gaming::V1::FetchDeploymentStateRequest} or an equivalent Hash.
966
- #
967
- # @param request [::Google::Cloud::Gaming::V1::FetchDeploymentStateRequest, ::Hash]
968
- # A request object representing the call parameters. Required. To specify no
969
- # parameters, or to keep all the default parameter values, pass an empty Hash.
970
- # @param options [::Gapic::CallOptions, ::Hash]
971
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
972
- #
973
- # @overload fetch_deployment_state(name: nil)
974
- # Pass arguments to `fetch_deployment_state` via keyword arguments. Note that at
975
- # least one keyword argument is required. To specify no parameters, or to keep all
976
- # the default parameter values, pass an empty Hash as a request object (see above).
977
- #
978
- # @param name [::String]
979
- # Required. The name of the game server delpoyment, in the following form:
980
- # `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
981
- #
982
- # @yield [response, operation] Access the result along with the RPC operation
983
- # @yieldparam response [::Google::Cloud::Gaming::V1::FetchDeploymentStateResponse]
984
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
985
- #
986
- # @return [::Google::Cloud::Gaming::V1::FetchDeploymentStateResponse]
987
- #
988
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
989
- #
990
- # @example Basic example
991
- # require "google/cloud/gaming/v1"
992
- #
993
- # # Create a client object. The client can be reused for multiple calls.
994
- # client = Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new
995
- #
996
- # # Create a request. To set request fields, pass in keyword arguments.
997
- # request = Google::Cloud::Gaming::V1::FetchDeploymentStateRequest.new
998
- #
999
- # # Call the fetch_deployment_state method.
1000
- # result = client.fetch_deployment_state request
1001
- #
1002
- # # The returned object is of type Google::Cloud::Gaming::V1::FetchDeploymentStateResponse.
1003
- # p result
1004
- #
1005
- def fetch_deployment_state request, options = nil
1006
- raise ::ArgumentError, "request must be provided" if request.nil?
1007
-
1008
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::FetchDeploymentStateRequest
1009
-
1010
- # Converts hash and nil to an options object
1011
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1012
-
1013
- # Customize the options with defaults
1014
- metadata = @config.rpcs.fetch_deployment_state.metadata.to_h
1015
-
1016
- # Set x-goog-api-client and x-goog-user-project headers
1017
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1018
- lib_name: @config.lib_name, lib_version: @config.lib_version,
1019
- gapic_version: ::Google::Cloud::Gaming::V1::VERSION
1020
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1021
-
1022
- header_params = {}
1023
- if request.name
1024
- header_params["name"] = request.name
1025
- end
1026
-
1027
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1028
- metadata[:"x-goog-request-params"] ||= request_params_header
1029
-
1030
- options.apply_defaults timeout: @config.rpcs.fetch_deployment_state.timeout,
1031
- metadata: metadata,
1032
- retry_policy: @config.rpcs.fetch_deployment_state.retry_policy
1033
-
1034
- options.apply_defaults timeout: @config.timeout,
1035
- metadata: @config.metadata,
1036
- retry_policy: @config.retry_policy
1037
-
1038
- @game_server_deployments_service_stub.call_rpc :fetch_deployment_state, request, options: options do |response, operation|
1039
- yield response, operation if block_given?
1040
- return response
1041
- end
1042
- rescue ::GRPC::BadStatus => e
1043
- raise ::Google::Cloud::Error.from_error(e)
1044
- end
1045
-
1046
- ##
1047
- # Configuration class for the GameServerDeploymentsService API.
1048
- #
1049
- # This class represents the configuration for GameServerDeploymentsService,
1050
- # providing control over timeouts, retry behavior, logging, transport
1051
- # parameters, and other low-level controls. Certain parameters can also be
1052
- # applied individually to specific RPCs. See
1053
- # {::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client::Configuration::Rpcs}
1054
- # for a list of RPCs that can be configured independently.
1055
- #
1056
- # Configuration can be applied globally to all clients, or to a single client
1057
- # on construction.
1058
- #
1059
- # @example
1060
- #
1061
- # # Modify the global config, setting the timeout for
1062
- # # list_game_server_deployments to 20 seconds,
1063
- # # and all remaining timeouts to 10 seconds.
1064
- # ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.configure do |config|
1065
- # config.timeout = 10.0
1066
- # config.rpcs.list_game_server_deployments.timeout = 20.0
1067
- # end
1068
- #
1069
- # # Apply the above configuration only to a new client.
1070
- # client = ::Google::Cloud::Gaming::V1::GameServerDeploymentsService::Client.new do |config|
1071
- # config.timeout = 10.0
1072
- # config.rpcs.list_game_server_deployments.timeout = 20.0
1073
- # end
1074
- #
1075
- # @!attribute [rw] endpoint
1076
- # The hostname or hostname:port of the service endpoint.
1077
- # Defaults to `"gameservices.googleapis.com"`.
1078
- # @return [::String]
1079
- # @!attribute [rw] credentials
1080
- # Credentials to send with calls. You may provide any of the following types:
1081
- # * (`String`) The path to a service account key file in JSON format
1082
- # * (`Hash`) A service account key as a Hash
1083
- # * (`Google::Auth::Credentials`) A googleauth credentials object
1084
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1085
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1086
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1087
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1088
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1089
- # * (`nil`) indicating no credentials
1090
- # @return [::Object]
1091
- # @!attribute [rw] scope
1092
- # The OAuth scopes
1093
- # @return [::Array<::String>]
1094
- # @!attribute [rw] lib_name
1095
- # The library name as recorded in instrumentation and logging
1096
- # @return [::String]
1097
- # @!attribute [rw] lib_version
1098
- # The library version as recorded in instrumentation and logging
1099
- # @return [::String]
1100
- # @!attribute [rw] channel_args
1101
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1102
- # `GRPC::Core::Channel` object is provided as the credential.
1103
- # @return [::Hash]
1104
- # @!attribute [rw] interceptors
1105
- # An array of interceptors that are run before calls are executed.
1106
- # @return [::Array<::GRPC::ClientInterceptor>]
1107
- # @!attribute [rw] timeout
1108
- # The call timeout in seconds.
1109
- # @return [::Numeric]
1110
- # @!attribute [rw] metadata
1111
- # Additional gRPC headers to be sent with the call.
1112
- # @return [::Hash{::Symbol=>::String}]
1113
- # @!attribute [rw] retry_policy
1114
- # The retry policy. The value is a hash with the following keys:
1115
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1116
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1117
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1118
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1119
- # trigger a retry.
1120
- # @return [::Hash]
1121
- # @!attribute [rw] quota_project
1122
- # A separate project against which to charge quota.
1123
- # @return [::String]
1124
- #
1125
- class Configuration
1126
- extend ::Gapic::Config
1127
-
1128
- DEFAULT_ENDPOINT = "gameservices.googleapis.com"
1129
-
1130
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1131
- config_attr :credentials, nil do |value|
1132
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1133
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1134
- allowed.any? { |klass| klass === value }
1135
- end
1136
- config_attr :scope, nil, ::String, ::Array, nil
1137
- config_attr :lib_name, nil, ::String, nil
1138
- config_attr :lib_version, nil, ::String, nil
1139
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1140
- config_attr :interceptors, nil, ::Array, nil
1141
- config_attr :timeout, nil, ::Numeric, nil
1142
- config_attr :metadata, nil, ::Hash, nil
1143
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1144
- config_attr :quota_project, nil, ::String, nil
1145
-
1146
- # @private
1147
- def initialize parent_config = nil
1148
- @parent_config = parent_config unless parent_config.nil?
1149
-
1150
- yield self if block_given?
1151
- end
1152
-
1153
- ##
1154
- # Configurations for individual RPCs
1155
- # @return [Rpcs]
1156
- #
1157
- def rpcs
1158
- @rpcs ||= begin
1159
- parent_rpcs = nil
1160
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1161
- Rpcs.new parent_rpcs
1162
- end
1163
- end
1164
-
1165
- ##
1166
- # Configuration RPC class for the GameServerDeploymentsService API.
1167
- #
1168
- # Includes fields providing the configuration for each RPC in this service.
1169
- # Each configuration object is of type `Gapic::Config::Method` and includes
1170
- # the following configuration fields:
1171
- #
1172
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1173
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1174
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1175
- # include the following keys:
1176
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1177
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1178
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1179
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1180
- # trigger a retry.
1181
- #
1182
- class Rpcs
1183
- ##
1184
- # RPC-specific configuration for `list_game_server_deployments`
1185
- # @return [::Gapic::Config::Method]
1186
- #
1187
- attr_reader :list_game_server_deployments
1188
- ##
1189
- # RPC-specific configuration for `get_game_server_deployment`
1190
- # @return [::Gapic::Config::Method]
1191
- #
1192
- attr_reader :get_game_server_deployment
1193
- ##
1194
- # RPC-specific configuration for `create_game_server_deployment`
1195
- # @return [::Gapic::Config::Method]
1196
- #
1197
- attr_reader :create_game_server_deployment
1198
- ##
1199
- # RPC-specific configuration for `delete_game_server_deployment`
1200
- # @return [::Gapic::Config::Method]
1201
- #
1202
- attr_reader :delete_game_server_deployment
1203
- ##
1204
- # RPC-specific configuration for `update_game_server_deployment`
1205
- # @return [::Gapic::Config::Method]
1206
- #
1207
- attr_reader :update_game_server_deployment
1208
- ##
1209
- # RPC-specific configuration for `get_game_server_deployment_rollout`
1210
- # @return [::Gapic::Config::Method]
1211
- #
1212
- attr_reader :get_game_server_deployment_rollout
1213
- ##
1214
- # RPC-specific configuration for `update_game_server_deployment_rollout`
1215
- # @return [::Gapic::Config::Method]
1216
- #
1217
- attr_reader :update_game_server_deployment_rollout
1218
- ##
1219
- # RPC-specific configuration for `preview_game_server_deployment_rollout`
1220
- # @return [::Gapic::Config::Method]
1221
- #
1222
- attr_reader :preview_game_server_deployment_rollout
1223
- ##
1224
- # RPC-specific configuration for `fetch_deployment_state`
1225
- # @return [::Gapic::Config::Method]
1226
- #
1227
- attr_reader :fetch_deployment_state
1228
-
1229
- # @private
1230
- def initialize parent_rpcs = nil
1231
- list_game_server_deployments_config = parent_rpcs.list_game_server_deployments if parent_rpcs.respond_to? :list_game_server_deployments
1232
- @list_game_server_deployments = ::Gapic::Config::Method.new list_game_server_deployments_config
1233
- get_game_server_deployment_config = parent_rpcs.get_game_server_deployment if parent_rpcs.respond_to? :get_game_server_deployment
1234
- @get_game_server_deployment = ::Gapic::Config::Method.new get_game_server_deployment_config
1235
- create_game_server_deployment_config = parent_rpcs.create_game_server_deployment if parent_rpcs.respond_to? :create_game_server_deployment
1236
- @create_game_server_deployment = ::Gapic::Config::Method.new create_game_server_deployment_config
1237
- delete_game_server_deployment_config = parent_rpcs.delete_game_server_deployment if parent_rpcs.respond_to? :delete_game_server_deployment
1238
- @delete_game_server_deployment = ::Gapic::Config::Method.new delete_game_server_deployment_config
1239
- update_game_server_deployment_config = parent_rpcs.update_game_server_deployment if parent_rpcs.respond_to? :update_game_server_deployment
1240
- @update_game_server_deployment = ::Gapic::Config::Method.new update_game_server_deployment_config
1241
- get_game_server_deployment_rollout_config = parent_rpcs.get_game_server_deployment_rollout if parent_rpcs.respond_to? :get_game_server_deployment_rollout
1242
- @get_game_server_deployment_rollout = ::Gapic::Config::Method.new get_game_server_deployment_rollout_config
1243
- update_game_server_deployment_rollout_config = parent_rpcs.update_game_server_deployment_rollout if parent_rpcs.respond_to? :update_game_server_deployment_rollout
1244
- @update_game_server_deployment_rollout = ::Gapic::Config::Method.new update_game_server_deployment_rollout_config
1245
- preview_game_server_deployment_rollout_config = parent_rpcs.preview_game_server_deployment_rollout if parent_rpcs.respond_to? :preview_game_server_deployment_rollout
1246
- @preview_game_server_deployment_rollout = ::Gapic::Config::Method.new preview_game_server_deployment_rollout_config
1247
- fetch_deployment_state_config = parent_rpcs.fetch_deployment_state if parent_rpcs.respond_to? :fetch_deployment_state
1248
- @fetch_deployment_state = ::Gapic::Config::Method.new fetch_deployment_state_config
1249
-
1250
- yield self if block_given?
1251
- end
1252
- end
1253
- end
1254
- end
1255
- end
1256
- end
1257
- end
1258
- end
1259
- end