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

Commit

Permalink
docs: Add documentation for enums (#385)
Browse files Browse the repository at this point in the history
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: googleapis/googleapis-gen@0080f83
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 20, 2023
1 parent 6a1268d commit 7d5b75a
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ def sample_preview_update_game_server_cluster():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GameServerClustersServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def sample_delete_game_server_config():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GameServerConfigsServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ def sample_fetch_deployment_state():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GameServerDeploymentsServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/gaming_v1/services/realms_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def sample_preview_realm_update():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "RealmsServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
13 changes: 12 additions & 1 deletion google/cloud/gaming_v1/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,18 @@ class OperationStatus(proto.Message):
"""

class ErrorCode(proto.Enum):
r""""""
r"""
Values:
ERROR_CODE_UNSPECIFIED (0):
INTERNAL_ERROR (1):
PERMISSION_DENIED (2):
CLUSTER_CONNECTION (3):
"""
ERROR_CODE_UNSPECIFIED = 0
INTERNAL_ERROR = 1
PERMISSION_DENIED = 2
Expand Down
46 changes: 45 additions & 1 deletion google/cloud/gaming_v1/types/game_server_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,20 @@


class GameServerClusterView(proto.Enum):
r"""A view for GameServerCluster objects."""
r"""A view for GameServerCluster objects.
Values:
GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED (0):
The default / unset value.
The API will default to the BASIC view.
BASIC (1):
Include basic information of a GameServerCluster resource
and omit ``cluster_state``. This is the default value (for
ListGameServerClusters, GetGameServerCluster and
PreviewCreateGameServerCluster).
FULL (2):
Include everything.
"""
GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0
BASIC = 1
FULL = 2
Expand Down Expand Up @@ -592,6 +605,37 @@ class InstallationState(proto.Enum):
r"""The state of the installed versions of Agones/Kubernetes. See
also
https://cloud.google.com/game-servers/docs/versions-and-upgrades.
Values:
INSTALLATION_STATE_UNSPECIFIED (0):
The default value. This value is used if the
state is omitted.
AGONES_KUBERNETES_VERSION_SUPPORTED (1):
The combination of Agones and Kubernetes
versions is supported by Google Cloud Game
Servers.
AGONES_VERSION_UNSUPPORTED (2):
The installed version of Agones is not
supported by Google Cloud Game Servers.
AGONES_KUBERNETES_VERSION_UNSUPPORTED (3):
The installed version of Agones is supported
by Google Cloud Game Servers, but the installed
version of Kubernetes is not recommended or
supported by the version of Agones.
AGONES_VERSION_UNRECOGNIZED (4):
The installed version of Agones is not
recognized because the Agones controller's image
name does not have a version string reported as
{major}.{minor}(.{patch}).
KUBERNETES_VERSION_UNRECOGNIZED (5):
The server version of Kubernetes cluster is
not recognized because the API server didn't
return parsable version info on path/version.
VERSION_VERIFICATION_FAILED (6):
Failed to read or verify the version of Agones or
Kubernetes. See version_installed_error_message for details.
AGONES_NOT_INSTALLED (7):
Agones is not installed.
"""
INSTALLATION_STATE_UNSPECIFIED = 0
AGONES_KUBERNETES_VERSION_SUPPORTED = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ def sample_preview_update_game_server_cluster():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GameServerClustersServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def sample_delete_game_server_config():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GameServerConfigsServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ def sample_fetch_deployment_state():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GameServerDeploymentsServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ def sample_preview_realm_update():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "RealmsServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
13 changes: 12 additions & 1 deletion google/cloud/gaming_v1beta/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,18 @@ class OperationStatus(proto.Message):
"""

class ErrorCode(proto.Enum):
r""""""
r"""
Values:
ERROR_CODE_UNSPECIFIED (0):
INTERNAL_ERROR (1):
PERMISSION_DENIED (2):
CLUSTER_CONNECTION (3):
"""
ERROR_CODE_UNSPECIFIED = 0
INTERNAL_ERROR = 1
PERMISSION_DENIED = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-game-servers",
"version": "1.7.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-game-servers",
"version": "1.7.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 7d5b75a

Please sign in to comment.