From 3c28ff7c610caf58df0dfbd4b3acd2954ae7f019 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 12:31:38 -0800 Subject: [PATCH] fix(browser): check for fetch on window (#136) --- protos/protos.json | 831 ++++++++++++++++-- .../game_server_clusters_service_client.ts | 100 ++- .../game_server_configs_service_client.ts | 60 +- .../game_server_deployments_service_client.ts | 110 +-- src/v1beta/realms_service_client.ts | 80 +- synth.metadata | 8 +- 6 files changed, 967 insertions(+), 222 deletions(-) diff --git a/protos/protos.json b/protos/protos.json index edf735d..5c0baf5 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -623,7 +623,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetGameServerCluster": { "requestType": "GetGameServerClusterRequest", @@ -631,7 +641,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGameServerCluster": { "requestType": "CreateGameServerClusterRequest", @@ -642,7 +662,24 @@ "(google.api.method_signature)": "parent,game_server_cluster,game_server_cluster_id", "(google.longrunning.operation_info).response_type": "GameServerCluster", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters", + "body": "game_server_cluster" + } + }, + { + "(google.api.method_signature)": "parent,game_server_cluster,game_server_cluster_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerCluster", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewCreateGameServerCluster": { "requestType": "PreviewCreateGameServerClusterRequest", @@ -650,7 +687,15 @@ "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate", "(google.api.http).body": "game_server_cluster" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate", + "body": "game_server_cluster" + } + } + ] }, "DeleteGameServerCluster": { "requestType": "DeleteGameServerClusterRequest", @@ -660,14 +705,37 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewDeleteGameServerCluster": { "requestType": "PreviewDeleteGameServerClusterRequest", "responseType": "PreviewDeleteGameServerClusterResponse", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete" + } + } + ] }, "UpdateGameServerCluster": { "requestType": "UpdateGameServerClusterRequest", @@ -678,7 +746,24 @@ "(google.api.method_signature)": "game_server_cluster,update_mask", "(google.longrunning.operation_info).response_type": "GameServerCluster", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}", + "body": "game_server_cluster" + } + }, + { + "(google.api.method_signature)": "game_server_cluster,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerCluster", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewUpdateGameServerCluster": { "requestType": "PreviewUpdateGameServerClusterRequest", @@ -686,7 +771,15 @@ "options": { "(google.api.http).patch": "/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate", "(google.api.http).body": "game_server_cluster" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate", + "body": "game_server_cluster" + } + } + ] } } }, @@ -895,7 +988,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetGameServerConfig": { "requestType": "GetGameServerConfigRequest", @@ -903,7 +1006,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGameServerConfig": { "requestType": "CreateGameServerConfigRequest", @@ -914,7 +1027,24 @@ "(google.api.method_signature)": "parent,game_server_config", "(google.longrunning.operation_info).response_type": "GameServerConfig", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs", + "body": "game_server_config" + } + }, + { + "(google.api.method_signature)": "parent,game_server_config" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerConfig", + "metadata_type": "OperationMetadata" + } + } + ] }, "DeleteGameServerConfig": { "requestType": "DeleteGameServerConfigRequest", @@ -924,7 +1054,23 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] } } }, @@ -1280,7 +1426,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/gameServerDeployments", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/gameServerDeployments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetGameServerDeployment": { "requestType": "GetGameServerDeploymentRequest", @@ -1288,7 +1444,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGameServerDeployment": { "requestType": "CreateGameServerDeploymentRequest", @@ -1299,7 +1465,24 @@ "(google.api.method_signature)": "parent,game_server_deployment", "(google.longrunning.operation_info).response_type": "GameServerDeployment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/gameServerDeployments", + "body": "game_server_deployment" + } + }, + { + "(google.api.method_signature)": "parent,game_server_deployment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerDeployment", + "metadata_type": "OperationMetadata" + } + } + ] }, "DeleteGameServerDeployment": { "requestType": "DeleteGameServerDeploymentRequest", @@ -1309,7 +1492,23 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, "UpdateGameServerDeployment": { "requestType": "UpdateGameServerDeploymentRequest", @@ -1320,7 +1519,24 @@ "(google.api.method_signature)": "game_server_deployment,update_mask", "(google.longrunning.operation_info).response_type": "GameServerDeployment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{game_server_deployment.name=projects/*/locations/*/gameServerDeployments/*}", + "body": "game_server_deployment" + } + }, + { + "(google.api.method_signature)": "game_server_deployment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerDeployment", + "metadata_type": "OperationMetadata" + } + } + ] }, "GetGameServerDeploymentRollout": { "requestType": "GetGameServerDeploymentRolloutRequest", @@ -1328,7 +1544,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}/rollout", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}/rollout" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateGameServerDeploymentRollout": { "requestType": "UpdateGameServerDeploymentRolloutRequest", @@ -1339,7 +1565,24 @@ "(google.api.method_signature)": "rollout,update_mask", "(google.longrunning.operation_info).response_type": "GameServerDeployment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout", + "body": "rollout" + } + }, + { + "(google.api.method_signature)": "rollout,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerDeployment", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewGameServerDeploymentRollout": { "requestType": "PreviewGameServerDeploymentRolloutRequest", @@ -1347,7 +1590,15 @@ "options": { "(google.api.http).patch": "/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview", "(google.api.http).body": "rollout" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview", + "body": "rollout" + } + } + ] }, "FetchDeploymentState": { "requestType": "FetchDeploymentStateRequest", @@ -1355,7 +1606,15 @@ "options": { "(google.api.http).post": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState", + "body": "*" + } + } + ] } } }, @@ -1580,7 +1839,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/realms", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/realms" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetRealm": { "requestType": "GetRealmRequest", @@ -1588,7 +1857,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/realms/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/realms/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateRealm": { "requestType": "CreateRealmRequest", @@ -1599,7 +1878,24 @@ "(google.api.method_signature)": "parent,realm,realm_id", "(google.longrunning.operation_info).response_type": "Realm", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/realms", + "body": "realm" + } + }, + { + "(google.api.method_signature)": "parent,realm,realm_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Realm", + "metadata_type": "OperationMetadata" + } + } + ] }, "DeleteRealm": { "requestType": "DeleteRealmRequest", @@ -1609,7 +1905,23 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/realms/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, "UpdateRealm": { "requestType": "UpdateRealmRequest", @@ -1620,7 +1932,24 @@ "(google.api.method_signature)": "realm,update_mask", "(google.longrunning.operation_info).response_type": "Realm", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{realm.name=projects/*/locations/*/realms/*}", + "body": "realm" + } + }, + { + "(google.api.method_signature)": "realm,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Realm", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewRealmUpdate": { "requestType": "PreviewRealmUpdateRequest", @@ -1628,7 +1957,15 @@ "options": { "(google.api.http).patch": "/v1/{realm.name=projects/*/locations/*/realms/*}:previewUpdate", "(google.api.http).body": "realm" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{realm.name=projects/*/locations/*/realms/*}:previewUpdate", + "body": "realm" + } + } + ] } } } @@ -2251,7 +2588,17 @@ "options": { "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetGameServerCluster": { "requestType": "GetGameServerClusterRequest", @@ -2259,7 +2606,17 @@ "options": { "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGameServerCluster": { "requestType": "CreateGameServerClusterRequest", @@ -2270,7 +2627,24 @@ "(google.api.method_signature)": "parent,game_server_cluster,game_server_cluster_id", "(google.longrunning.operation_info).response_type": "GameServerCluster", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters", + "body": "game_server_cluster" + } + }, + { + "(google.api.method_signature)": "parent,game_server_cluster,game_server_cluster_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerCluster", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewCreateGameServerCluster": { "requestType": "PreviewCreateGameServerClusterRequest", @@ -2278,7 +2652,15 @@ "options": { "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate", "(google.api.http).body": "game_server_cluster" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate", + "body": "game_server_cluster" + } + } + ] }, "DeleteGameServerCluster": { "requestType": "DeleteGameServerClusterRequest", @@ -2288,14 +2670,37 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewDeleteGameServerCluster": { "requestType": "PreviewDeleteGameServerClusterRequest", "responseType": "PreviewDeleteGameServerClusterResponse", "options": { "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete" + } + } + ] }, "UpdateGameServerCluster": { "requestType": "UpdateGameServerClusterRequest", @@ -2306,7 +2711,24 @@ "(google.api.method_signature)": "game_server_cluster,update_mask", "(google.longrunning.operation_info).response_type": "GameServerCluster", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}", + "body": "game_server_cluster" + } + }, + { + "(google.api.method_signature)": "game_server_cluster,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerCluster", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewUpdateGameServerCluster": { "requestType": "PreviewUpdateGameServerClusterRequest", @@ -2314,7 +2736,15 @@ "options": { "(google.api.http).patch": "/v1beta/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate", "(google.api.http).body": "game_server_cluster" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate", + "body": "game_server_cluster" + } + } + ] } } }, @@ -2523,7 +2953,17 @@ "options": { "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/gameServerDeployments/*}/configs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/gameServerDeployments/*}/configs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetGameServerConfig": { "requestType": "GetGameServerConfigRequest", @@ -2531,7 +2971,17 @@ "options": { "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGameServerConfig": { "requestType": "CreateGameServerConfigRequest", @@ -2542,7 +2992,24 @@ "(google.api.method_signature)": "parent,game_server_config", "(google.longrunning.operation_info).response_type": "GameServerConfig", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/gameServerDeployments/*}/configs", + "body": "game_server_config" + } + }, + { + "(google.api.method_signature)": "parent,game_server_config" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerConfig", + "metadata_type": "OperationMetadata" + } + } + ] }, "DeleteGameServerConfig": { "requestType": "DeleteGameServerConfigRequest", @@ -2552,7 +3019,23 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] } } }, @@ -2908,7 +3391,17 @@ "options": { "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/gameServerDeployments", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/gameServerDeployments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetGameServerDeployment": { "requestType": "GetGameServerDeploymentRequest", @@ -2916,7 +3409,17 @@ "options": { "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateGameServerDeployment": { "requestType": "CreateGameServerDeploymentRequest", @@ -2927,7 +3430,24 @@ "(google.api.method_signature)": "parent,game_server_deployment", "(google.longrunning.operation_info).response_type": "GameServerDeployment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/gameServerDeployments", + "body": "game_server_deployment" + } + }, + { + "(google.api.method_signature)": "parent,game_server_deployment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerDeployment", + "metadata_type": "OperationMetadata" + } + } + ] }, "DeleteGameServerDeployment": { "requestType": "DeleteGameServerDeploymentRequest", @@ -2937,7 +3457,23 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, "UpdateGameServerDeployment": { "requestType": "UpdateGameServerDeploymentRequest", @@ -2948,7 +3484,24 @@ "(google.api.method_signature)": "game_server_deployment,update_mask", "(google.longrunning.operation_info).response_type": "GameServerDeployment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{game_server_deployment.name=projects/*/locations/*/gameServerDeployments/*}", + "body": "game_server_deployment" + } + }, + { + "(google.api.method_signature)": "game_server_deployment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerDeployment", + "metadata_type": "OperationMetadata" + } + } + ] }, "GetGameServerDeploymentRollout": { "requestType": "GetGameServerDeploymentRolloutRequest", @@ -2956,7 +3509,17 @@ "options": { "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}/rollout", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}/rollout" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateGameServerDeploymentRollout": { "requestType": "UpdateGameServerDeploymentRolloutRequest", @@ -2967,7 +3530,24 @@ "(google.api.method_signature)": "rollout,update_mask", "(google.longrunning.operation_info).response_type": "GameServerDeployment", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout", + "body": "rollout" + } + }, + { + "(google.api.method_signature)": "rollout,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GameServerDeployment", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewGameServerDeploymentRollout": { "requestType": "PreviewGameServerDeploymentRolloutRequest", @@ -2975,7 +3555,15 @@ "options": { "(google.api.http).patch": "/v1beta/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview", "(google.api.http).body": "rollout" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview", + "body": "rollout" + } + } + ] }, "FetchDeploymentState": { "requestType": "FetchDeploymentStateRequest", @@ -2983,7 +3571,15 @@ "options": { "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState", + "body": "*" + } + } + ] } } }, @@ -3208,7 +3804,17 @@ "options": { "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/realms", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/realms" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetRealm": { "requestType": "GetRealmRequest", @@ -3216,7 +3822,17 @@ "options": { "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/realms/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/realms/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateRealm": { "requestType": "CreateRealmRequest", @@ -3227,7 +3843,24 @@ "(google.api.method_signature)": "parent,realm,realm_id", "(google.longrunning.operation_info).response_type": "Realm", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/realms", + "body": "realm" + } + }, + { + "(google.api.method_signature)": "parent,realm,realm_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Realm", + "metadata_type": "OperationMetadata" + } + } + ] }, "DeleteRealm": { "requestType": "DeleteRealmRequest", @@ -3237,7 +3870,23 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/realms/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, "UpdateRealm": { "requestType": "UpdateRealmRequest", @@ -3248,7 +3897,24 @@ "(google.api.method_signature)": "realm,update_mask", "(google.longrunning.operation_info).response_type": "Realm", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{realm.name=projects/*/locations/*/realms/*}", + "body": "realm" + } + }, + { + "(google.api.method_signature)": "realm,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Realm", + "metadata_type": "OperationMetadata" + } + } + ] }, "PreviewRealmUpdate": { "requestType": "PreviewRealmUpdateRequest", @@ -3256,7 +3922,15 @@ "options": { "(google.api.http).patch": "/v1beta/{realm.name=projects/*/locations/*/realms/*}:previewUpdate", "(google.api.http).body": "realm" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{realm.name=projects/*/locations/*/realms/*}:previewUpdate", + "body": "realm" + } + } + ] } } } @@ -4435,7 +5109,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations}", "(google.api.method_signature)": "name,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] }, "GetOperation": { "requestType": "GetOperationRequest", @@ -4443,7 +5127,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteOperation": { "requestType": "DeleteOperationRequest", @@ -4451,7 +5145,17 @@ "options": { "(google.api.http).delete": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CancelOperation": { "requestType": "CancelOperationRequest", @@ -4460,7 +5164,18 @@ "(google.api.http).post": "/v1/{name=operations/**}:cancel", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "WaitOperation": { "requestType": "WaitOperationRequest", diff --git a/src/v1beta/game_server_clusters_service_client.ts b/src/v1beta/game_server_clusters_service_client.ts index 9c3b138..552482b 100644 --- a/src/v1beta/game_server_clusters_service_client.ts +++ b/src/v1beta/game_server_clusters_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -31,6 +32,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta/game_server_clusters_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './game_server_clusters_service_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -86,9 +92,9 @@ export class GameServerClustersServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -102,7 +108,9 @@ export class GameServerClustersServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -396,7 +404,7 @@ export class GameServerClustersServiceClient { // ------------------- getGameServerCluster( request: protos.google.cloud.gaming.v1beta.IGetGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerCluster, @@ -409,7 +417,7 @@ export class GameServerClustersServiceClient { >; getGameServerCluster( request: protos.google.cloud.gaming.v1beta.IGetGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IGameServerCluster, | protos.google.cloud.gaming.v1beta.IGetGameServerClusterRequest @@ -450,7 +458,7 @@ export class GameServerClustersServiceClient { getGameServerCluster( request: protos.google.cloud.gaming.v1beta.IGetGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IGameServerCluster, | protos.google.cloud.gaming.v1beta.IGetGameServerClusterRequest @@ -476,12 +484,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -496,7 +504,7 @@ export class GameServerClustersServiceClient { } previewCreateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterResponse, @@ -509,7 +517,7 @@ export class GameServerClustersServiceClient { >; previewCreateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterResponse, | protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterRequest @@ -556,7 +564,7 @@ export class GameServerClustersServiceClient { previewCreateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterResponse, | protos.google.cloud.gaming.v1beta.IPreviewCreateGameServerClusterRequest @@ -582,12 +590,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -606,7 +614,7 @@ export class GameServerClustersServiceClient { } previewDeleteGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterResponse, @@ -619,7 +627,7 @@ export class GameServerClustersServiceClient { >; previewDeleteGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterResponse, | protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterRequest @@ -661,7 +669,7 @@ export class GameServerClustersServiceClient { previewDeleteGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterResponse, | protos.google.cloud.gaming.v1beta.IPreviewDeleteGameServerClusterRequest @@ -687,12 +695,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -711,7 +719,7 @@ export class GameServerClustersServiceClient { } previewUpdateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterResponse, @@ -724,7 +732,7 @@ export class GameServerClustersServiceClient { >; previewUpdateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterResponse, | protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterRequest @@ -773,7 +781,7 @@ export class GameServerClustersServiceClient { previewUpdateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterResponse, | protos.google.cloud.gaming.v1beta.IPreviewUpdateGameServerClusterRequest @@ -799,12 +807,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -824,7 +832,7 @@ export class GameServerClustersServiceClient { createGameServerCluster( request: protos.google.cloud.gaming.v1beta.ICreateGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -837,7 +845,7 @@ export class GameServerClustersServiceClient { >; createGameServerCluster( request: protos.google.cloud.gaming.v1beta.ICreateGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerCluster, @@ -886,7 +894,7 @@ export class GameServerClustersServiceClient { createGameServerCluster( request: protos.google.cloud.gaming.v1beta.ICreateGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerCluster, @@ -914,12 +922,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -975,7 +983,7 @@ export class GameServerClustersServiceClient { } deleteGameServerCluster( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -988,7 +996,7 @@ export class GameServerClustersServiceClient { >; deleteGameServerCluster( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.protobuf.IEmpty, @@ -1033,7 +1041,7 @@ export class GameServerClustersServiceClient { deleteGameServerCluster( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.protobuf.IEmpty, @@ -1061,12 +1069,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1122,7 +1130,7 @@ export class GameServerClustersServiceClient { } updateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1135,7 +1143,7 @@ export class GameServerClustersServiceClient { >; updateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerCluster, @@ -1187,7 +1195,7 @@ export class GameServerClustersServiceClient { updateGameServerCluster( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerCluster, @@ -1215,12 +1223,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1276,7 +1284,7 @@ export class GameServerClustersServiceClient { } listGameServerClusters( request: protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerCluster[], @@ -1286,7 +1294,7 @@ export class GameServerClustersServiceClient { >; listGameServerClusters( request: protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, | protos.google.cloud.gaming.v1beta.IListGameServerClustersResponse @@ -1342,7 +1350,7 @@ export class GameServerClustersServiceClient { listGameServerClusters( request: protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, | protos.google.cloud.gaming.v1beta.IListGameServerClustersResponse @@ -1365,12 +1373,12 @@ export class GameServerClustersServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1422,7 +1430,7 @@ export class GameServerClustersServiceClient { */ listGameServerClustersStream( request?: protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1482,7 +1490,7 @@ export class GameServerClustersServiceClient { */ listGameServerClustersAsync( request?: protos.google.cloud.gaming.v1beta.IListGameServerClustersRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v1beta/game_server_configs_service_client.ts b/src/v1beta/game_server_configs_service_client.ts index 2f08d55..f92ff6e 100644 --- a/src/v1beta/game_server_configs_service_client.ts +++ b/src/v1beta/game_server_configs_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -31,6 +32,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta/game_server_configs_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './game_server_configs_service_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -85,9 +91,9 @@ export class GameServerConfigsServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -101,7 +107,9 @@ export class GameServerConfigsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -376,7 +384,7 @@ export class GameServerConfigsServiceClient { // ------------------- getGameServerConfig( request: protos.google.cloud.gaming.v1beta.IGetGameServerConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerConfig, @@ -386,7 +394,7 @@ export class GameServerConfigsServiceClient { >; getGameServerConfig( request: protos.google.cloud.gaming.v1beta.IGetGameServerConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IGameServerConfig, | protos.google.cloud.gaming.v1beta.IGetGameServerConfigRequest @@ -427,7 +435,7 @@ export class GameServerConfigsServiceClient { getGameServerConfig( request: protos.google.cloud.gaming.v1beta.IGetGameServerConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IGameServerConfig, | protos.google.cloud.gaming.v1beta.IGetGameServerConfigRequest @@ -450,12 +458,12 @@ export class GameServerConfigsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -471,7 +479,7 @@ export class GameServerConfigsServiceClient { createGameServerConfig( request: protos.google.cloud.gaming.v1beta.ICreateGameServerConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -484,7 +492,7 @@ export class GameServerConfigsServiceClient { >; createGameServerConfig( request: protos.google.cloud.gaming.v1beta.ICreateGameServerConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerConfig, @@ -536,7 +544,7 @@ export class GameServerConfigsServiceClient { createGameServerConfig( request: protos.google.cloud.gaming.v1beta.ICreateGameServerConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerConfig, @@ -564,12 +572,12 @@ export class GameServerConfigsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -625,7 +633,7 @@ export class GameServerConfigsServiceClient { } deleteGameServerConfig( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -638,7 +646,7 @@ export class GameServerConfigsServiceClient { >; deleteGameServerConfig( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.protobuf.IEmpty, @@ -685,7 +693,7 @@ export class GameServerConfigsServiceClient { deleteGameServerConfig( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.protobuf.IEmpty, @@ -713,12 +721,12 @@ export class GameServerConfigsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -774,7 +782,7 @@ export class GameServerConfigsServiceClient { } listGameServerConfigs( request: protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerConfig[], @@ -784,7 +792,7 @@ export class GameServerConfigsServiceClient { >; listGameServerConfigs( request: protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, | protos.google.cloud.gaming.v1beta.IListGameServerConfigsResponse @@ -842,7 +850,7 @@ export class GameServerConfigsServiceClient { listGameServerConfigs( request: protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, | protos.google.cloud.gaming.v1beta.IListGameServerConfigsResponse @@ -865,12 +873,12 @@ export class GameServerConfigsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -919,7 +927,7 @@ export class GameServerConfigsServiceClient { */ listGameServerConfigsStream( request?: protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -980,7 +988,7 @@ export class GameServerConfigsServiceClient { */ listGameServerConfigsAsync( request?: protos.google.cloud.gaming.v1beta.IListGameServerConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v1beta/game_server_deployments_service_client.ts b/src/v1beta/game_server_deployments_service_client.ts index 5048aef..595304c 100644 --- a/src/v1beta/game_server_deployments_service_client.ts +++ b/src/v1beta/game_server_deployments_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -31,6 +32,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta/game_server_deployments_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './game_server_deployments_service_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -86,9 +92,9 @@ export class GameServerDeploymentsServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -102,7 +108,9 @@ export class GameServerDeploymentsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -412,7 +420,7 @@ export class GameServerDeploymentsServiceClient { // ------------------- getGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -425,7 +433,7 @@ export class GameServerDeploymentsServiceClient { >; getGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IGameServerDeployment, | protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest @@ -466,7 +474,7 @@ export class GameServerDeploymentsServiceClient { getGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IGameServerDeployment, | protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest @@ -492,12 +500,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -516,7 +524,7 @@ export class GameServerDeploymentsServiceClient { } getGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, @@ -529,7 +537,7 @@ export class GameServerDeploymentsServiceClient { >; getGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, | protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest @@ -570,7 +578,7 @@ export class GameServerDeploymentsServiceClient { getGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, | protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest @@ -596,12 +604,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -620,7 +628,7 @@ export class GameServerDeploymentsServiceClient { } previewGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, @@ -633,7 +641,7 @@ export class GameServerDeploymentsServiceClient { >; previewGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, | protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest @@ -684,7 +692,7 @@ export class GameServerDeploymentsServiceClient { previewGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, | protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest @@ -710,12 +718,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -734,7 +742,7 @@ export class GameServerDeploymentsServiceClient { } fetchDeploymentState( request: protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, @@ -747,7 +755,7 @@ export class GameServerDeploymentsServiceClient { >; fetchDeploymentState( request: protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, | protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest @@ -790,7 +798,7 @@ export class GameServerDeploymentsServiceClient { fetchDeploymentState( request: protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, | protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest @@ -816,12 +824,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -837,7 +845,7 @@ export class GameServerDeploymentsServiceClient { createGameServerDeployment( request: protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -850,7 +858,7 @@ export class GameServerDeploymentsServiceClient { >; createGameServerDeployment( request: protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -899,7 +907,7 @@ export class GameServerDeploymentsServiceClient { createGameServerDeployment( request: protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -927,12 +935,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -988,7 +996,7 @@ export class GameServerDeploymentsServiceClient { } deleteGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1001,7 +1009,7 @@ export class GameServerDeploymentsServiceClient { >; deleteGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.protobuf.IEmpty, @@ -1047,7 +1055,7 @@ export class GameServerDeploymentsServiceClient { deleteGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.protobuf.IEmpty, @@ -1075,12 +1083,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1136,7 +1144,7 @@ export class GameServerDeploymentsServiceClient { } updateGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1149,7 +1157,7 @@ export class GameServerDeploymentsServiceClient { >; updateGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -1201,7 +1209,7 @@ export class GameServerDeploymentsServiceClient { updateGameServerDeployment( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -1229,12 +1237,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1290,7 +1298,7 @@ export class GameServerDeploymentsServiceClient { } updateGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1303,7 +1311,7 @@ export class GameServerDeploymentsServiceClient { >; updateGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -1360,7 +1368,7 @@ export class GameServerDeploymentsServiceClient { updateGameServerDeploymentRollout( request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IGameServerDeployment, @@ -1388,12 +1396,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1449,7 +1457,7 @@ export class GameServerDeploymentsServiceClient { } listGameServerDeployments( request: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IGameServerDeployment[], @@ -1459,7 +1467,7 @@ export class GameServerDeploymentsServiceClient { >; listGameServerDeployments( request: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, | protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse @@ -1516,7 +1524,7 @@ export class GameServerDeploymentsServiceClient { listGameServerDeployments( request: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, | protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse @@ -1539,12 +1547,12 @@ export class GameServerDeploymentsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1597,7 +1605,7 @@ export class GameServerDeploymentsServiceClient { */ listGameServerDeploymentsStream( request?: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1658,7 +1666,7 @@ export class GameServerDeploymentsServiceClient { */ listGameServerDeploymentsAsync( request?: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v1beta/realms_service_client.ts b/src/v1beta/realms_service_client.ts index 4f744d4..467cc80 100644 --- a/src/v1beta/realms_service_client.ts +++ b/src/v1beta/realms_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -31,6 +32,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta/realms_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './realms_service_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -86,9 +92,9 @@ export class RealmsServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -101,7 +107,9 @@ export class RealmsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -380,7 +388,7 @@ export class RealmsServiceClient { // ------------------- getRealm( request: protos.google.cloud.gaming.v1beta.IGetRealmRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IRealm, @@ -390,7 +398,7 @@ export class RealmsServiceClient { >; getRealm( request: protos.google.cloud.gaming.v1beta.IGetRealmRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IGetRealmRequest | null | undefined, @@ -426,7 +434,7 @@ export class RealmsServiceClient { getRealm( request: protos.google.cloud.gaming.v1beta.IGetRealmRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IGetRealmRequest | null | undefined, @@ -445,12 +453,12 @@ export class RealmsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -465,7 +473,7 @@ export class RealmsServiceClient { } previewRealmUpdate( request: protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, @@ -475,7 +483,7 @@ export class RealmsServiceClient { >; previewRealmUpdate( request: protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, | protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest @@ -524,7 +532,7 @@ export class RealmsServiceClient { previewRealmUpdate( request: protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, | protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest @@ -547,12 +555,12 @@ export class RealmsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -568,7 +576,7 @@ export class RealmsServiceClient { createRealm( request: protos.google.cloud.gaming.v1beta.ICreateRealmRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -581,7 +589,7 @@ export class RealmsServiceClient { >; createRealm( request: protos.google.cloud.gaming.v1beta.ICreateRealmRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IRealm, @@ -630,7 +638,7 @@ export class RealmsServiceClient { createRealm( request: protos.google.cloud.gaming.v1beta.ICreateRealmRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IRealm, @@ -658,12 +666,12 @@ export class RealmsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -715,7 +723,7 @@ export class RealmsServiceClient { } deleteRealm( request: protos.google.cloud.gaming.v1beta.IDeleteRealmRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -728,7 +736,7 @@ export class RealmsServiceClient { >; deleteRealm( request: protos.google.cloud.gaming.v1beta.IDeleteRealmRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.protobuf.IEmpty, @@ -773,7 +781,7 @@ export class RealmsServiceClient { deleteRealm( request: protos.google.cloud.gaming.v1beta.IDeleteRealmRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.protobuf.IEmpty, @@ -801,12 +809,12 @@ export class RealmsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -858,7 +866,7 @@ export class RealmsServiceClient { } updateRealm( request: protos.google.cloud.gaming.v1beta.IUpdateRealmRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -871,7 +879,7 @@ export class RealmsServiceClient { >; updateRealm( request: protos.google.cloud.gaming.v1beta.IUpdateRealmRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.gaming.v1beta.IRealm, @@ -923,7 +931,7 @@ export class RealmsServiceClient { updateRealm( request: protos.google.cloud.gaming.v1beta.IUpdateRealmRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.gaming.v1beta.IRealm, @@ -951,12 +959,12 @@ export class RealmsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1008,7 +1016,7 @@ export class RealmsServiceClient { } listRealms( request: protos.google.cloud.gaming.v1beta.IListRealmsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.gaming.v1beta.IRealm[], @@ -1018,7 +1026,7 @@ export class RealmsServiceClient { >; listRealms( request: protos.google.cloud.gaming.v1beta.IListRealmsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.gaming.v1beta.IListRealmsRequest, protos.google.cloud.gaming.v1beta.IListRealmsResponse | null | undefined, @@ -1071,7 +1079,7 @@ export class RealmsServiceClient { listRealms( request: protos.google.cloud.gaming.v1beta.IListRealmsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.gaming.v1beta.IListRealmsRequest, | protos.google.cloud.gaming.v1beta.IListRealmsResponse @@ -1092,12 +1100,12 @@ export class RealmsServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1146,7 +1154,7 @@ export class RealmsServiceClient { */ listRealmsStream( request?: protos.google.cloud.gaming.v1beta.IListRealmsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1207,7 +1215,7 @@ export class RealmsServiceClient { */ listRealmsAsync( request?: protos.google.cloud.gaming.v1beta.IListRealmsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/synth.metadata b/synth.metadata index 5b3f78b..64c6f2c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-game-servers.git", - "sha": "ee22980eb2c0af179d4e3cee35d13b99f9af2c32" + "sha": "2329129d18747e90074682649e86229ee43bce33" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { @@ -96,7 +96,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.742240568", "protos/google/cloud/gaming/v1beta/common.proto", "protos/google/cloud/gaming/v1beta/game_server_clusters.proto", "protos/google/cloud/gaming/v1beta/game_server_clusters_service.proto", @@ -111,7 +110,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.3225038820", "src/index.ts", "src/v1beta/game_server_clusters_service_client.ts", "src/v1beta/game_server_clusters_service_client_config.json",