google-cloud-gaming-v1 0.6.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -143
- data/lib/google/cloud/gaming/v1/version.rb +3 -8
- metadata +16 -229
- data/.yardopts +0 -12
- data/AUTHENTICATION.md +0 -151
- data/lib/google/cloud/gaming/v1/common_pb.rb +0 -117
- data/lib/google/cloud/gaming/v1/game_server_clusters_pb.rb +0 -142
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/client.rb +0 -1166
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/credentials.rb +0 -51
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/operations.rb +0 -768
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/paths.rb +0 -73
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest/client.rb +0 -936
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest/operations.rb +0 -793
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest/service_stub.rb +0 -524
- data/lib/google/cloud/gaming/v1/game_server_clusters_service/rest.rb +0 -54
- data/lib/google/cloud/gaming/v1/game_server_clusters_service.rb +0 -57
- data/lib/google/cloud/gaming/v1/game_server_clusters_service_pb.rb +0 -23
- data/lib/google/cloud/gaming/v1/game_server_clusters_service_services_pb.rb +0 -61
- data/lib/google/cloud/gaming/v1/game_server_configs_pb.rb +0 -73
- data/lib/google/cloud/gaming/v1/game_server_configs_service/client.rb +0 -736
- data/lib/google/cloud/gaming/v1/game_server_configs_service/credentials.rb +0 -51
- data/lib/google/cloud/gaming/v1/game_server_configs_service/operations.rb +0 -768
- data/lib/google/cloud/gaming/v1/game_server_configs_service/paths.rb +0 -73
- data/lib/google/cloud/gaming/v1/game_server_configs_service/rest/client.rb +0 -605
- data/lib/google/cloud/gaming/v1/game_server_configs_service/rest/operations.rb +0 -793
- data/lib/google/cloud/gaming/v1/game_server_configs_service/rest/service_stub.rb +0 -285
- data/lib/google/cloud/gaming/v1/game_server_configs_service/rest.rb +0 -53
- data/lib/google/cloud/gaming/v1/game_server_configs_service.rb +0 -56
- data/lib/google/cloud/gaming/v1/game_server_configs_service_pb.rb +0 -23
- data/lib/google/cloud/gaming/v1/game_server_configs_service_services_pb.rb +0 -55
- data/lib/google/cloud/gaming/v1/game_server_deployments_pb.rb +0 -119
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/client.rb +0 -1257
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/credentials.rb +0 -51
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/operations.rb +0 -768
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/paths.rb +0 -88
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest/client.rb +0 -997
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest/operations.rb +0 -793
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest/service_stub.rb +0 -584
- data/lib/google/cloud/gaming/v1/game_server_deployments_service/rest.rb +0 -54
- data/lib/google/cloud/gaming/v1/game_server_deployments_service.rb +0 -57
- data/lib/google/cloud/gaming/v1/game_server_deployments_service_pb.rb +0 -23
- data/lib/google/cloud/gaming/v1/game_server_deployments_service_services_pb.rb +0 -70
- data/lib/google/cloud/gaming/v1/realms_pb.rb +0 -78
- data/lib/google/cloud/gaming/v1/realms_service/client.rb +0 -945
- data/lib/google/cloud/gaming/v1/realms_service/credentials.rb +0 -51
- data/lib/google/cloud/gaming/v1/realms_service/operations.rb +0 -768
- data/lib/google/cloud/gaming/v1/realms_service/paths.rb +0 -69
- data/lib/google/cloud/gaming/v1/realms_service/rest/client.rb +0 -761
- data/lib/google/cloud/gaming/v1/realms_service/rest/operations.rb +0 -793
- data/lib/google/cloud/gaming/v1/realms_service/rest/service_stub.rb +0 -405
- data/lib/google/cloud/gaming/v1/realms_service/rest.rb +0 -54
- data/lib/google/cloud/gaming/v1/realms_service.rb +0 -57
- data/lib/google/cloud/gaming/v1/realms_service_pb.rb +0 -23
- data/lib/google/cloud/gaming/v1/realms_service_services_pb.rb +0 -56
- data/lib/google/cloud/gaming/v1/rest.rb +0 -40
- data/lib/google/cloud/gaming/v1.rb +0 -48
- data/lib/google-cloud-gaming-v1.rb +0 -21
- data/proto_docs/README.md +0 -4
- data/proto_docs/google/api/client.rb +0 -318
- data/proto_docs/google/api/field_behavior.rb +0 -71
- data/proto_docs/google/api/launch_stage.rb +0 -71
- data/proto_docs/google/api/resource.rb +0 -222
- data/proto_docs/google/cloud/gaming/v1/common.rb +0 -302
- data/proto_docs/google/cloud/gaming/v1/game_server_clusters.rb +0 -386
- data/proto_docs/google/cloud/gaming/v1/game_server_configs.rb +0 -180
- data/proto_docs/google/cloud/gaming/v1/game_server_deployments.rb +0 -301
- data/proto_docs/google/cloud/gaming/v1/realms.rb +0 -191
- data/proto_docs/google/longrunning/operations.rb +0 -164
- data/proto_docs/google/protobuf/any.rb +0 -141
- data/proto_docs/google/protobuf/duration.rb +0 -98
- data/proto_docs/google/protobuf/empty.rb +0 -34
- data/proto_docs/google/protobuf/field_mask.rb +0 -229
- data/proto_docs/google/protobuf/timestamp.rb +0 -129
- data/proto_docs/google/rpc/status.rb +0 -48
@@ -1,73 +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
|
-
|
20
|
-
module Google
|
21
|
-
module Cloud
|
22
|
-
module Gaming
|
23
|
-
module V1
|
24
|
-
module GameServerConfigsService
|
25
|
-
# Path helper methods for the GameServerConfigsService API.
|
26
|
-
module Paths
|
27
|
-
##
|
28
|
-
# Create a fully-qualified GameServerConfig resource string.
|
29
|
-
#
|
30
|
-
# The resource will be in the following format:
|
31
|
-
#
|
32
|
-
# `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`
|
33
|
-
#
|
34
|
-
# @param project [String]
|
35
|
-
# @param location [String]
|
36
|
-
# @param deployment [String]
|
37
|
-
# @param config [String]
|
38
|
-
#
|
39
|
-
# @return [::String]
|
40
|
-
def game_server_config_path project:, location:, deployment:, config:
|
41
|
-
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
42
|
-
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
43
|
-
raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/"
|
44
|
-
|
45
|
-
"projects/#{project}/locations/#{location}/gameServerDeployments/#{deployment}/configs/#{config}"
|
46
|
-
end
|
47
|
-
|
48
|
-
##
|
49
|
-
# Create a fully-qualified GameServerDeployment resource string.
|
50
|
-
#
|
51
|
-
# The resource will be in the following format:
|
52
|
-
#
|
53
|
-
# `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`
|
54
|
-
#
|
55
|
-
# @param project [String]
|
56
|
-
# @param location [String]
|
57
|
-
# @param deployment [String]
|
58
|
-
#
|
59
|
-
# @return [::String]
|
60
|
-
def game_server_deployment_path project:, location:, deployment:
|
61
|
-
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
62
|
-
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
63
|
-
|
64
|
-
"projects/#{project}/locations/#{location}/gameServerDeployments/#{deployment}"
|
65
|
-
end
|
66
|
-
|
67
|
-
extend self
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,605 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2023 Google LLC
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
-
|
19
|
-
require "google/cloud/errors"
|
20
|
-
require "google/cloud/gaming/v1/game_server_configs_service_pb"
|
21
|
-
require "google/cloud/gaming/v1/game_server_configs_service/rest/service_stub"
|
22
|
-
|
23
|
-
module Google
|
24
|
-
module Cloud
|
25
|
-
module Gaming
|
26
|
-
module V1
|
27
|
-
module GameServerConfigsService
|
28
|
-
module Rest
|
29
|
-
##
|
30
|
-
# REST client for the GameServerConfigsService service.
|
31
|
-
#
|
32
|
-
# The game server config configures the game servers in an Agones fleet.
|
33
|
-
#
|
34
|
-
class Client
|
35
|
-
include Paths
|
36
|
-
|
37
|
-
# @private
|
38
|
-
attr_reader :game_server_configs_service_stub
|
39
|
-
|
40
|
-
##
|
41
|
-
# Configure the GameServerConfigsService Client class.
|
42
|
-
#
|
43
|
-
# See {::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client::Configuration}
|
44
|
-
# for a description of the configuration fields.
|
45
|
-
#
|
46
|
-
# @example
|
47
|
-
#
|
48
|
-
# # Modify the configuration for all GameServerConfigsService clients
|
49
|
-
# ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client.configure do |config|
|
50
|
-
# config.timeout = 10.0
|
51
|
-
# end
|
52
|
-
#
|
53
|
-
# @yield [config] Configure the Client client.
|
54
|
-
# @yieldparam config [Client::Configuration]
|
55
|
-
#
|
56
|
-
# @return [Client::Configuration]
|
57
|
-
#
|
58
|
-
def self.configure
|
59
|
-
@configure ||= begin
|
60
|
-
namespace = ["Google", "Cloud", "Gaming", "V1"]
|
61
|
-
parent_config = while namespace.any?
|
62
|
-
parent_name = namespace.join "::"
|
63
|
-
parent_const = const_get parent_name
|
64
|
-
break parent_const.configure if parent_const.respond_to? :configure
|
65
|
-
namespace.pop
|
66
|
-
end
|
67
|
-
default_config = Client::Configuration.new parent_config
|
68
|
-
|
69
|
-
default_config.rpcs.list_game_server_configs.timeout = 60.0
|
70
|
-
default_config.rpcs.list_game_server_configs.retry_policy = {
|
71
|
-
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
72
|
-
}
|
73
|
-
|
74
|
-
default_config.rpcs.get_game_server_config.timeout = 60.0
|
75
|
-
default_config.rpcs.get_game_server_config.retry_policy = {
|
76
|
-
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
77
|
-
}
|
78
|
-
|
79
|
-
default_config.rpcs.create_game_server_config.timeout = 60.0
|
80
|
-
|
81
|
-
default_config.rpcs.delete_game_server_config.timeout = 60.0
|
82
|
-
|
83
|
-
default_config
|
84
|
-
end
|
85
|
-
yield @configure if block_given?
|
86
|
-
@configure
|
87
|
-
end
|
88
|
-
|
89
|
-
##
|
90
|
-
# Configure the GameServerConfigsService Client instance.
|
91
|
-
#
|
92
|
-
# The configuration is set to the derived mode, meaning that values can be changed,
|
93
|
-
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
94
|
-
# should be made on {Client.configure}.
|
95
|
-
#
|
96
|
-
# See {::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client::Configuration}
|
97
|
-
# for a description of the configuration fields.
|
98
|
-
#
|
99
|
-
# @yield [config] Configure the Client client.
|
100
|
-
# @yieldparam config [Client::Configuration]
|
101
|
-
#
|
102
|
-
# @return [Client::Configuration]
|
103
|
-
#
|
104
|
-
def configure
|
105
|
-
yield @config if block_given?
|
106
|
-
@config
|
107
|
-
end
|
108
|
-
|
109
|
-
##
|
110
|
-
# Create a new GameServerConfigsService REST client object.
|
111
|
-
#
|
112
|
-
# @example
|
113
|
-
#
|
114
|
-
# # Create a client using the default configuration
|
115
|
-
# client = ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client.new
|
116
|
-
#
|
117
|
-
# # Create a client using a custom configuration
|
118
|
-
# client = ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client.new do |config|
|
119
|
-
# config.timeout = 10.0
|
120
|
-
# end
|
121
|
-
#
|
122
|
-
# @yield [config] Configure the GameServerConfigsService client.
|
123
|
-
# @yieldparam config [Client::Configuration]
|
124
|
-
#
|
125
|
-
def initialize
|
126
|
-
# Create the configuration object
|
127
|
-
@config = Configuration.new Client.configure
|
128
|
-
|
129
|
-
# Yield the configuration if needed
|
130
|
-
yield @config if block_given?
|
131
|
-
|
132
|
-
# Create credentials
|
133
|
-
credentials = @config.credentials
|
134
|
-
# Use self-signed JWT if the endpoint is unchanged from default,
|
135
|
-
# but only if the default endpoint does not have a region prefix.
|
136
|
-
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
137
|
-
!@config.endpoint.split(".").first.include?("-")
|
138
|
-
credentials ||= Credentials.default scope: @config.scope,
|
139
|
-
enable_self_signed_jwt: enable_self_signed_jwt
|
140
|
-
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
141
|
-
credentials = Credentials.new credentials, scope: @config.scope
|
142
|
-
end
|
143
|
-
|
144
|
-
@quota_project_id = @config.quota_project
|
145
|
-
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
146
|
-
|
147
|
-
@operations_client = ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Operations.new do |config|
|
148
|
-
config.credentials = credentials
|
149
|
-
config.quota_project = @quota_project_id
|
150
|
-
config.endpoint = @config.endpoint
|
151
|
-
end
|
152
|
-
|
153
|
-
@game_server_configs_service_stub = ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
154
|
-
end
|
155
|
-
|
156
|
-
##
|
157
|
-
# Get the associated client for long-running operations.
|
158
|
-
#
|
159
|
-
# @return [::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Operations]
|
160
|
-
#
|
161
|
-
attr_reader :operations_client
|
162
|
-
|
163
|
-
# Service calls
|
164
|
-
|
165
|
-
##
|
166
|
-
# Lists game server configs in a given project, location, and game server
|
167
|
-
# deployment.
|
168
|
-
#
|
169
|
-
# @overload list_game_server_configs(request, options = nil)
|
170
|
-
# Pass arguments to `list_game_server_configs` via a request object, either of type
|
171
|
-
# {::Google::Cloud::Gaming::V1::ListGameServerConfigsRequest} or an equivalent Hash.
|
172
|
-
#
|
173
|
-
# @param request [::Google::Cloud::Gaming::V1::ListGameServerConfigsRequest, ::Hash]
|
174
|
-
# A request object representing the call parameters. Required. To specify no
|
175
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
176
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
177
|
-
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
178
|
-
#
|
179
|
-
# @overload list_game_server_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
180
|
-
# Pass arguments to `list_game_server_configs` via keyword arguments. Note that at
|
181
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
182
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
183
|
-
#
|
184
|
-
# @param parent [::String]
|
185
|
-
# Required. The parent resource name, in the following form:
|
186
|
-
# `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
|
187
|
-
# @param page_size [::Integer]
|
188
|
-
# Optional. The maximum number of items to return. If unspecified, server
|
189
|
-
# will pick an appropriate default. Server may return fewer items than
|
190
|
-
# requested. A caller should only rely on response's
|
191
|
-
# {::Google::Cloud::Gaming::V1::ListGameServerConfigsResponse#next_page_token next_page_token} to
|
192
|
-
# determine if there are more GameServerConfigs left to be queried.
|
193
|
-
# @param page_token [::String]
|
194
|
-
# Optional. The next_page_token value returned from a previous list request, if any.
|
195
|
-
# @param filter [::String]
|
196
|
-
# Optional. The filter to apply to list results.
|
197
|
-
# @param order_by [::String]
|
198
|
-
# Optional. Specifies the ordering of results following syntax at
|
199
|
-
# https://cloud.google.com/apis/design/design_patterns#sorting_order.
|
200
|
-
# @yield [result, operation] Access the result along with the TransportOperation object
|
201
|
-
# @yieldparam result [::Google::Cloud::Gaming::V1::ListGameServerConfigsResponse]
|
202
|
-
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
203
|
-
#
|
204
|
-
# @return [::Google::Cloud::Gaming::V1::ListGameServerConfigsResponse]
|
205
|
-
#
|
206
|
-
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
207
|
-
def list_game_server_configs request, options = nil
|
208
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
209
|
-
|
210
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::ListGameServerConfigsRequest
|
211
|
-
|
212
|
-
# Converts hash and nil to an options object
|
213
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
214
|
-
|
215
|
-
# Customize the options with defaults
|
216
|
-
call_metadata = @config.rpcs.list_game_server_configs.metadata.to_h
|
217
|
-
|
218
|
-
# Set x-goog-api-client and x-goog-user-project headers
|
219
|
-
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
220
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
221
|
-
gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
|
222
|
-
transports_version_send: [:rest]
|
223
|
-
|
224
|
-
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
225
|
-
|
226
|
-
options.apply_defaults timeout: @config.rpcs.list_game_server_configs.timeout,
|
227
|
-
metadata: call_metadata,
|
228
|
-
retry_policy: @config.rpcs.list_game_server_configs.retry_policy
|
229
|
-
|
230
|
-
options.apply_defaults timeout: @config.timeout,
|
231
|
-
metadata: @config.metadata,
|
232
|
-
retry_policy: @config.retry_policy
|
233
|
-
|
234
|
-
@game_server_configs_service_stub.list_game_server_configs request, options do |result, operation|
|
235
|
-
yield result, operation if block_given?
|
236
|
-
return result
|
237
|
-
end
|
238
|
-
rescue ::Gapic::Rest::Error => e
|
239
|
-
raise ::Google::Cloud::Error.from_error(e)
|
240
|
-
end
|
241
|
-
|
242
|
-
##
|
243
|
-
# Gets details of a single game server config.
|
244
|
-
#
|
245
|
-
# @overload get_game_server_config(request, options = nil)
|
246
|
-
# Pass arguments to `get_game_server_config` via a request object, either of type
|
247
|
-
# {::Google::Cloud::Gaming::V1::GetGameServerConfigRequest} or an equivalent Hash.
|
248
|
-
#
|
249
|
-
# @param request [::Google::Cloud::Gaming::V1::GetGameServerConfigRequest, ::Hash]
|
250
|
-
# A request object representing the call parameters. Required. To specify no
|
251
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
252
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
253
|
-
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
254
|
-
#
|
255
|
-
# @overload get_game_server_config(name: nil)
|
256
|
-
# Pass arguments to `get_game_server_config` via keyword arguments. Note that at
|
257
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
258
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
259
|
-
#
|
260
|
-
# @param name [::String]
|
261
|
-
# Required. The name of the game server config to retrieve, in the following form:
|
262
|
-
# `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
|
263
|
-
# @yield [result, operation] Access the result along with the TransportOperation object
|
264
|
-
# @yieldparam result [::Google::Cloud::Gaming::V1::GameServerConfig]
|
265
|
-
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
266
|
-
#
|
267
|
-
# @return [::Google::Cloud::Gaming::V1::GameServerConfig]
|
268
|
-
#
|
269
|
-
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
270
|
-
def get_game_server_config request, options = nil
|
271
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
|
-
|
273
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::GetGameServerConfigRequest
|
274
|
-
|
275
|
-
# Converts hash and nil to an options object
|
276
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
277
|
-
|
278
|
-
# Customize the options with defaults
|
279
|
-
call_metadata = @config.rpcs.get_game_server_config.metadata.to_h
|
280
|
-
|
281
|
-
# Set x-goog-api-client and x-goog-user-project headers
|
282
|
-
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
283
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
284
|
-
gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
|
285
|
-
transports_version_send: [:rest]
|
286
|
-
|
287
|
-
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
288
|
-
|
289
|
-
options.apply_defaults timeout: @config.rpcs.get_game_server_config.timeout,
|
290
|
-
metadata: call_metadata,
|
291
|
-
retry_policy: @config.rpcs.get_game_server_config.retry_policy
|
292
|
-
|
293
|
-
options.apply_defaults timeout: @config.timeout,
|
294
|
-
metadata: @config.metadata,
|
295
|
-
retry_policy: @config.retry_policy
|
296
|
-
|
297
|
-
@game_server_configs_service_stub.get_game_server_config request, options do |result, operation|
|
298
|
-
yield result, operation if block_given?
|
299
|
-
return result
|
300
|
-
end
|
301
|
-
rescue ::Gapic::Rest::Error => e
|
302
|
-
raise ::Google::Cloud::Error.from_error(e)
|
303
|
-
end
|
304
|
-
|
305
|
-
##
|
306
|
-
# Creates a new game server config in a given project, location, and game
|
307
|
-
# server deployment. Game server configs are immutable, and are not applied
|
308
|
-
# until referenced in the game server deployment rollout resource.
|
309
|
-
#
|
310
|
-
# @overload create_game_server_config(request, options = nil)
|
311
|
-
# Pass arguments to `create_game_server_config` via a request object, either of type
|
312
|
-
# {::Google::Cloud::Gaming::V1::CreateGameServerConfigRequest} or an equivalent Hash.
|
313
|
-
#
|
314
|
-
# @param request [::Google::Cloud::Gaming::V1::CreateGameServerConfigRequest, ::Hash]
|
315
|
-
# A request object representing the call parameters. Required. To specify no
|
316
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
317
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
318
|
-
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
319
|
-
#
|
320
|
-
# @overload create_game_server_config(parent: nil, config_id: nil, game_server_config: nil)
|
321
|
-
# Pass arguments to `create_game_server_config` via keyword arguments. Note that at
|
322
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
323
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
324
|
-
#
|
325
|
-
# @param parent [::String]
|
326
|
-
# Required. The parent resource name, in the following form:
|
327
|
-
# `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
|
328
|
-
# @param config_id [::String]
|
329
|
-
# Required. The ID of the game server config resource to be created.
|
330
|
-
# @param game_server_config [::Google::Cloud::Gaming::V1::GameServerConfig, ::Hash]
|
331
|
-
# Required. The game server config resource to be created.
|
332
|
-
# @yield [result, operation] Access the result along with the TransportOperation object
|
333
|
-
# @yieldparam result [::Gapic::Operation]
|
334
|
-
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
335
|
-
#
|
336
|
-
# @return [::Gapic::Operation]
|
337
|
-
#
|
338
|
-
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
339
|
-
def create_game_server_config request, options = nil
|
340
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
341
|
-
|
342
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::CreateGameServerConfigRequest
|
343
|
-
|
344
|
-
# Converts hash and nil to an options object
|
345
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
346
|
-
|
347
|
-
# Customize the options with defaults
|
348
|
-
call_metadata = @config.rpcs.create_game_server_config.metadata.to_h
|
349
|
-
|
350
|
-
# Set x-goog-api-client and x-goog-user-project headers
|
351
|
-
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
352
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
353
|
-
gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
|
354
|
-
transports_version_send: [:rest]
|
355
|
-
|
356
|
-
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
357
|
-
|
358
|
-
options.apply_defaults timeout: @config.rpcs.create_game_server_config.timeout,
|
359
|
-
metadata: call_metadata,
|
360
|
-
retry_policy: @config.rpcs.create_game_server_config.retry_policy
|
361
|
-
|
362
|
-
options.apply_defaults timeout: @config.timeout,
|
363
|
-
metadata: @config.metadata,
|
364
|
-
retry_policy: @config.retry_policy
|
365
|
-
|
366
|
-
@game_server_configs_service_stub.create_game_server_config request, options do |result, operation|
|
367
|
-
result = ::Gapic::Operation.new result, @operations_client, options: options
|
368
|
-
yield result, operation if block_given?
|
369
|
-
return result
|
370
|
-
end
|
371
|
-
rescue ::Gapic::Rest::Error => e
|
372
|
-
raise ::Google::Cloud::Error.from_error(e)
|
373
|
-
end
|
374
|
-
|
375
|
-
##
|
376
|
-
# Deletes a single game server config. The deletion will fail if the game
|
377
|
-
# server config is referenced in a game server deployment rollout.
|
378
|
-
#
|
379
|
-
# @overload delete_game_server_config(request, options = nil)
|
380
|
-
# Pass arguments to `delete_game_server_config` via a request object, either of type
|
381
|
-
# {::Google::Cloud::Gaming::V1::DeleteGameServerConfigRequest} or an equivalent Hash.
|
382
|
-
#
|
383
|
-
# @param request [::Google::Cloud::Gaming::V1::DeleteGameServerConfigRequest, ::Hash]
|
384
|
-
# A request object representing the call parameters. Required. To specify no
|
385
|
-
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
386
|
-
# @param options [::Gapic::CallOptions, ::Hash]
|
387
|
-
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
388
|
-
#
|
389
|
-
# @overload delete_game_server_config(name: nil)
|
390
|
-
# Pass arguments to `delete_game_server_config` via keyword arguments. Note that at
|
391
|
-
# least one keyword argument is required. To specify no parameters, or to keep all
|
392
|
-
# the default parameter values, pass an empty Hash as a request object (see above).
|
393
|
-
#
|
394
|
-
# @param name [::String]
|
395
|
-
# Required. The name of the game server config to delete, in the following form:
|
396
|
-
# `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
|
397
|
-
# @yield [result, operation] Access the result along with the TransportOperation object
|
398
|
-
# @yieldparam result [::Gapic::Operation]
|
399
|
-
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
400
|
-
#
|
401
|
-
# @return [::Gapic::Operation]
|
402
|
-
#
|
403
|
-
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
404
|
-
def delete_game_server_config request, options = nil
|
405
|
-
raise ::ArgumentError, "request must be provided" if request.nil?
|
406
|
-
|
407
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Gaming::V1::DeleteGameServerConfigRequest
|
408
|
-
|
409
|
-
# Converts hash and nil to an options object
|
410
|
-
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
411
|
-
|
412
|
-
# Customize the options with defaults
|
413
|
-
call_metadata = @config.rpcs.delete_game_server_config.metadata.to_h
|
414
|
-
|
415
|
-
# Set x-goog-api-client and x-goog-user-project headers
|
416
|
-
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
417
|
-
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
418
|
-
gapic_version: ::Google::Cloud::Gaming::V1::VERSION,
|
419
|
-
transports_version_send: [:rest]
|
420
|
-
|
421
|
-
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
422
|
-
|
423
|
-
options.apply_defaults timeout: @config.rpcs.delete_game_server_config.timeout,
|
424
|
-
metadata: call_metadata,
|
425
|
-
retry_policy: @config.rpcs.delete_game_server_config.retry_policy
|
426
|
-
|
427
|
-
options.apply_defaults timeout: @config.timeout,
|
428
|
-
metadata: @config.metadata,
|
429
|
-
retry_policy: @config.retry_policy
|
430
|
-
|
431
|
-
@game_server_configs_service_stub.delete_game_server_config request, options do |result, operation|
|
432
|
-
result = ::Gapic::Operation.new result, @operations_client, options: options
|
433
|
-
yield result, operation if block_given?
|
434
|
-
return result
|
435
|
-
end
|
436
|
-
rescue ::Gapic::Rest::Error => e
|
437
|
-
raise ::Google::Cloud::Error.from_error(e)
|
438
|
-
end
|
439
|
-
|
440
|
-
##
|
441
|
-
# Configuration class for the GameServerConfigsService REST API.
|
442
|
-
#
|
443
|
-
# This class represents the configuration for GameServerConfigsService REST,
|
444
|
-
# providing control over timeouts, retry behavior, logging, transport
|
445
|
-
# parameters, and other low-level controls. Certain parameters can also be
|
446
|
-
# applied individually to specific RPCs. See
|
447
|
-
# {::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client::Configuration::Rpcs}
|
448
|
-
# for a list of RPCs that can be configured independently.
|
449
|
-
#
|
450
|
-
# Configuration can be applied globally to all clients, or to a single client
|
451
|
-
# on construction.
|
452
|
-
#
|
453
|
-
# @example
|
454
|
-
#
|
455
|
-
# # Modify the global config, setting the timeout for
|
456
|
-
# # list_game_server_configs to 20 seconds,
|
457
|
-
# # and all remaining timeouts to 10 seconds.
|
458
|
-
# ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client.configure do |config|
|
459
|
-
# config.timeout = 10.0
|
460
|
-
# config.rpcs.list_game_server_configs.timeout = 20.0
|
461
|
-
# end
|
462
|
-
#
|
463
|
-
# # Apply the above configuration only to a new client.
|
464
|
-
# client = ::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client.new do |config|
|
465
|
-
# config.timeout = 10.0
|
466
|
-
# config.rpcs.list_game_server_configs.timeout = 20.0
|
467
|
-
# end
|
468
|
-
#
|
469
|
-
# @!attribute [rw] endpoint
|
470
|
-
# The hostname or hostname:port of the service endpoint.
|
471
|
-
# Defaults to `"gameservices.googleapis.com"`.
|
472
|
-
# @return [::String]
|
473
|
-
# @!attribute [rw] credentials
|
474
|
-
# Credentials to send with calls. You may provide any of the following types:
|
475
|
-
# * (`String`) The path to a service account key file in JSON format
|
476
|
-
# * (`Hash`) A service account key as a Hash
|
477
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
478
|
-
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
479
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
480
|
-
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
481
|
-
# * (`nil`) indicating no credentials
|
482
|
-
# @return [::Object]
|
483
|
-
# @!attribute [rw] scope
|
484
|
-
# The OAuth scopes
|
485
|
-
# @return [::Array<::String>]
|
486
|
-
# @!attribute [rw] lib_name
|
487
|
-
# The library name as recorded in instrumentation and logging
|
488
|
-
# @return [::String]
|
489
|
-
# @!attribute [rw] lib_version
|
490
|
-
# The library version as recorded in instrumentation and logging
|
491
|
-
# @return [::String]
|
492
|
-
# @!attribute [rw] timeout
|
493
|
-
# The call timeout in seconds.
|
494
|
-
# @return [::Numeric]
|
495
|
-
# @!attribute [rw] metadata
|
496
|
-
# Additional headers to be sent with the call.
|
497
|
-
# @return [::Hash{::Symbol=>::String}]
|
498
|
-
# @!attribute [rw] retry_policy
|
499
|
-
# The retry policy. The value is a hash with the following keys:
|
500
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
501
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
502
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
503
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
504
|
-
# trigger a retry.
|
505
|
-
# @return [::Hash]
|
506
|
-
# @!attribute [rw] quota_project
|
507
|
-
# A separate project against which to charge quota.
|
508
|
-
# @return [::String]
|
509
|
-
#
|
510
|
-
class Configuration
|
511
|
-
extend ::Gapic::Config
|
512
|
-
|
513
|
-
config_attr :endpoint, "gameservices.googleapis.com", ::String
|
514
|
-
config_attr :credentials, nil do |value|
|
515
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
516
|
-
allowed.any? { |klass| klass === value }
|
517
|
-
end
|
518
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
519
|
-
config_attr :lib_name, nil, ::String, nil
|
520
|
-
config_attr :lib_version, nil, ::String, nil
|
521
|
-
config_attr :timeout, nil, ::Numeric, nil
|
522
|
-
config_attr :metadata, nil, ::Hash, nil
|
523
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
524
|
-
config_attr :quota_project, nil, ::String, nil
|
525
|
-
|
526
|
-
# @private
|
527
|
-
def initialize parent_config = nil
|
528
|
-
@parent_config = parent_config unless parent_config.nil?
|
529
|
-
|
530
|
-
yield self if block_given?
|
531
|
-
end
|
532
|
-
|
533
|
-
##
|
534
|
-
# Configurations for individual RPCs
|
535
|
-
# @return [Rpcs]
|
536
|
-
#
|
537
|
-
def rpcs
|
538
|
-
@rpcs ||= begin
|
539
|
-
parent_rpcs = nil
|
540
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
541
|
-
Rpcs.new parent_rpcs
|
542
|
-
end
|
543
|
-
end
|
544
|
-
|
545
|
-
##
|
546
|
-
# Configuration RPC class for the GameServerConfigsService API.
|
547
|
-
#
|
548
|
-
# Includes fields providing the configuration for each RPC in this service.
|
549
|
-
# Each configuration object is of type `Gapic::Config::Method` and includes
|
550
|
-
# the following configuration fields:
|
551
|
-
#
|
552
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
553
|
-
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
554
|
-
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
555
|
-
# include the following keys:
|
556
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
557
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
558
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
559
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
560
|
-
# trigger a retry.
|
561
|
-
#
|
562
|
-
class Rpcs
|
563
|
-
##
|
564
|
-
# RPC-specific configuration for `list_game_server_configs`
|
565
|
-
# @return [::Gapic::Config::Method]
|
566
|
-
#
|
567
|
-
attr_reader :list_game_server_configs
|
568
|
-
##
|
569
|
-
# RPC-specific configuration for `get_game_server_config`
|
570
|
-
# @return [::Gapic::Config::Method]
|
571
|
-
#
|
572
|
-
attr_reader :get_game_server_config
|
573
|
-
##
|
574
|
-
# RPC-specific configuration for `create_game_server_config`
|
575
|
-
# @return [::Gapic::Config::Method]
|
576
|
-
#
|
577
|
-
attr_reader :create_game_server_config
|
578
|
-
##
|
579
|
-
# RPC-specific configuration for `delete_game_server_config`
|
580
|
-
# @return [::Gapic::Config::Method]
|
581
|
-
#
|
582
|
-
attr_reader :delete_game_server_config
|
583
|
-
|
584
|
-
# @private
|
585
|
-
def initialize parent_rpcs = nil
|
586
|
-
list_game_server_configs_config = parent_rpcs.list_game_server_configs if parent_rpcs.respond_to? :list_game_server_configs
|
587
|
-
@list_game_server_configs = ::Gapic::Config::Method.new list_game_server_configs_config
|
588
|
-
get_game_server_config_config = parent_rpcs.get_game_server_config if parent_rpcs.respond_to? :get_game_server_config
|
589
|
-
@get_game_server_config = ::Gapic::Config::Method.new get_game_server_config_config
|
590
|
-
create_game_server_config_config = parent_rpcs.create_game_server_config if parent_rpcs.respond_to? :create_game_server_config
|
591
|
-
@create_game_server_config = ::Gapic::Config::Method.new create_game_server_config_config
|
592
|
-
delete_game_server_config_config = parent_rpcs.delete_game_server_config if parent_rpcs.respond_to? :delete_game_server_config
|
593
|
-
@delete_game_server_config = ::Gapic::Config::Method.new delete_game_server_config_config
|
594
|
-
|
595
|
-
yield self if block_given?
|
596
|
-
end
|
597
|
-
end
|
598
|
-
end
|
599
|
-
end
|
600
|
-
end
|
601
|
-
end
|
602
|
-
end
|
603
|
-
end
|
604
|
-
end
|
605
|
-
end
|