Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
chore: re-order methods (via synth) (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Mar 24, 2020
1 parent 4265405 commit 7c1c10c
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 60 deletions.
4 changes: 2 additions & 2 deletions google/cloud/gaming_v1/__init__.py
Expand Up @@ -93,12 +93,12 @@
"FleetConfig",
"GameServerCluster",
"GameServerClusterConnectionInfo",
"GameServerClustersServiceClient",
"GameServerConfig",
"GameServerConfigOverride",
"GameServerConfigsServiceClient",
"GameServerDeployment",
"GameServerDeploymentRollout",
"GameServerDeploymentsServiceClient",
"GetGameServerClusterRequest",
"GetGameServerConfigRequest",
"GetGameServerDeploymentRequest",
Expand Down Expand Up @@ -138,5 +138,5 @@
"UpdateGameServerDeploymentRequest",
"UpdateGameServerDeploymentRolloutRequest",
"UpdateRealmRequest",
"GameServerClustersServiceClient",
"GameServerDeploymentsServiceClient",
)
Expand Up @@ -103,20 +103,20 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
from_service_account_json = from_service_account_file

@staticmethod
def game_server_deployment_path(
def game_server_deployment_rollout_path(
project: str, location: str, deployment: str
) -> str:
"""Return a fully-qualified game_server_deployment string."""
return "projects/{project}/locations/{location}/gameServerDeployments/{deployment}".format(
"""Return a fully-qualified game_server_deployment_rollout string."""
return "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout".format(
project=project, location=location, deployment=deployment
)

@staticmethod
def game_server_deployment_rollout_path(
def game_server_deployment_path(
project: str, location: str, deployment: str
) -> str:
"""Return a fully-qualified game_server_deployment_rollout string."""
return "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout".format(
"""Return a fully-qualified game_server_deployment string."""
return "projects/{project}/locations/{location}/gameServerDeployments/{deployment}".format(
project=project, location=location, deployment=deployment
)

Expand Down
64 changes: 32 additions & 32 deletions google/cloud/gaming_v1/types/__init__.py
Expand Up @@ -36,23 +36,6 @@
FleetConfig,
GameServerConfig,
)
from .game_server_deployments import (
ListGameServerDeploymentsRequest,
ListGameServerDeploymentsResponse,
GetGameServerDeploymentRequest,
GetGameServerDeploymentRolloutRequest,
CreateGameServerDeploymentRequest,
DeleteGameServerDeploymentRequest,
UpdateGameServerDeploymentRequest,
UpdateGameServerDeploymentRolloutRequest,
FetchDeploymentStateRequest,
FetchDeploymentStateResponse,
GameServerDeployment,
GameServerConfigOverride,
GameServerDeploymentRollout,
PreviewGameServerDeploymentRolloutRequest,
PreviewGameServerDeploymentRolloutResponse,
)
from .realms import (
ListRealmsRequest,
ListRealmsResponse,
Expand Down Expand Up @@ -81,6 +64,23 @@
GkeClusterReference,
GameServerCluster,
)
from .game_server_deployments import (
ListGameServerDeploymentsRequest,
ListGameServerDeploymentsResponse,
GetGameServerDeploymentRequest,
GetGameServerDeploymentRolloutRequest,
CreateGameServerDeploymentRequest,
DeleteGameServerDeploymentRequest,
UpdateGameServerDeploymentRequest,
UpdateGameServerDeploymentRolloutRequest,
FetchDeploymentStateRequest,
FetchDeploymentStateResponse,
GameServerDeployment,
GameServerConfigOverride,
GameServerDeploymentRollout,
PreviewGameServerDeploymentRolloutRequest,
PreviewGameServerDeploymentRolloutResponse,
)


__all__ = (
Expand All @@ -101,21 +101,6 @@
"ScalingConfig",
"FleetConfig",
"GameServerConfig",
"ListGameServerDeploymentsRequest",
"ListGameServerDeploymentsResponse",
"GetGameServerDeploymentRequest",
"GetGameServerDeploymentRolloutRequest",
"CreateGameServerDeploymentRequest",
"DeleteGameServerDeploymentRequest",
"UpdateGameServerDeploymentRequest",
"UpdateGameServerDeploymentRolloutRequest",
"FetchDeploymentStateRequest",
"FetchDeploymentStateResponse",
"GameServerDeployment",
"GameServerConfigOverride",
"GameServerDeploymentRollout",
"PreviewGameServerDeploymentRolloutRequest",
"PreviewGameServerDeploymentRolloutResponse",
"ListRealmsRequest",
"ListRealmsResponse",
"GetRealmRequest",
Expand All @@ -140,4 +125,19 @@
"GameServerClusterConnectionInfo",
"GkeClusterReference",
"GameServerCluster",
"ListGameServerDeploymentsRequest",
"ListGameServerDeploymentsResponse",
"GetGameServerDeploymentRequest",
"GetGameServerDeploymentRolloutRequest",
"CreateGameServerDeploymentRequest",
"DeleteGameServerDeploymentRequest",
"UpdateGameServerDeploymentRequest",
"UpdateGameServerDeploymentRolloutRequest",
"FetchDeploymentStateRequest",
"FetchDeploymentStateResponse",
"GameServerDeployment",
"GameServerConfigOverride",
"GameServerDeploymentRollout",
"PreviewGameServerDeploymentRolloutRequest",
"PreviewGameServerDeploymentRolloutResponse",
)
22 changes: 8 additions & 14 deletions synth.metadata
@@ -1,26 +1,20 @@
{
"updateTime": "2020-03-23T19:55:43.225589Z",
"updateTime": "2020-03-24T12:13:52.719294Z",
"sources": [
{
"git": {
"name": ".",
"remote": "git@github.com:googleapis/python-game-servers",
"sha": "63e0243caddd86916391638352d09e1a3e2042a5"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "0be7105dc52590fa9a24e784052298ae37ce53aa",
"internalRef": "302154871"
"sha": "36c0febd0fa7267ab66d14408eec2afd1b6bec4e",
"internalRef": "302639621",
"log": "36c0febd0fa7267ab66d14408eec2afd1b6bec4e\nUpdate GAPIC configurations to v2 .yaml.\n\nPiperOrigin-RevId: 302639621\n\n078f222366ed344509a48f2f084944ef61476613\nFix containeranalysis v1beta1 assembly target name\n\nPiperOrigin-RevId: 302529186\n\n"
}
},
{
"template": {
"name": "python_library",
"origin": "synthtool.gcp",
"version": "2020.2.4"
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "6a17abc7652e2fe563e1288c6e8c23fc260dda97"
}
}
],
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/gaming_v1/test_game_server_deployments_service.py
Expand Up @@ -934,29 +934,29 @@ def test_game_server_deployments_service_grpc_lro_client():
assert transport.operations_client is transport.operations_client


def test_game_server_deployment_path():
def test_game_server_deployment_rollout_path():
project = "squid"
location = "clam"
deployment = "whelk"

expected = "projects/{project}/locations/{location}/gameServerDeployments/{deployment}".format(
expected = "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout".format(
project=project, location=location, deployment=deployment
)
actual = GameServerDeploymentsServiceClient.game_server_deployment_path(
actual = GameServerDeploymentsServiceClient.game_server_deployment_rollout_path(
project, location, deployment
)
assert expected == actual


def test_game_server_deployment_rollout_path():
def test_game_server_deployment_path():
project = "squid"
location = "clam"
deployment = "whelk"

expected = "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout".format(
expected = "projects/{project}/locations/{location}/gameServerDeployments/{deployment}".format(
project=project, location=location, deployment=deployment
)
actual = GameServerDeploymentsServiceClient.game_server_deployment_rollout_path(
actual = GameServerDeploymentsServiceClient.game_server_deployment_path(
project, location, deployment
)
assert expected == actual

0 comments on commit 7c1c10c

Please sign in to comment.