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