From b5a973d850b0c37cc72f0aa250884eedfb35d651 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 10:42:58 -0500 Subject: [PATCH] docs: Add documentation for enums (#196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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: https://github.com/googleapis/googleapis/commit/a391fd1dac18dfdfa00c18c8404f2c3a6ff8e98e Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 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 --- .../services/api_gateway_service/client.py | 2 +- .../cloud/apigateway_v1/types/apigateway.py | 64 ++++++++++++++++++- ...t_metadata_google.cloud.apigateway.v1.json | 2 +- 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/client.py b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/client.py index eb4204790275..bbc0c584927e 100644 --- a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/client.py +++ b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/client.py @@ -2379,7 +2379,7 @@ def sample_delete_api_config(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ApiGatewayServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/types/apigateway.py b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/types/apigateway.py index 2a22f87bfbe9..e2c3ddbba3e2 100644 --- a/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/types/apigateway.py +++ b/packages/google-cloud-api-gateway/google/cloud/apigateway_v1/types/apigateway.py @@ -79,7 +79,22 @@ class Api(proto.Message): """ class State(proto.Enum): - r"""All the possible API states.""" + r"""All the possible API states. + + Values: + STATE_UNSPECIFIED (0): + API does not have a state yet. + CREATING (1): + API is being created. + ACTIVE (2): + API is active. + FAILED (3): + API creation failed. + DELETING (4): + API is being deleted. + UPDATING (5): + API is being updated. + """ STATE_UNSPECIFIED = 0 CREATING = 1 ACTIVE = 2 @@ -179,7 +194,27 @@ class ApiConfig(proto.Message): """ class State(proto.Enum): - r"""All the possible API Config states.""" + r"""All the possible API Config states. + + Values: + STATE_UNSPECIFIED (0): + API Config does not have a state yet. + CREATING (1): + API Config is being created and deployed to + the API Controller. + ACTIVE (2): + API Config is ready for use by Gateways. + FAILED (3): + API Config creation failed. + DELETING (4): + API Config is being deleted. + UPDATING (5): + API Config is being updated. + ACTIVATING (6): + API Config settings are being activated in + downstream systems. API Configs in this state + cannot be used by Gateways. + """ STATE_UNSPECIFIED = 0 CREATING = 1 ACTIVE = 2 @@ -341,7 +376,22 @@ class Gateway(proto.Message): """ class State(proto.Enum): - r"""All the possible Gateway states.""" + r"""All the possible Gateway states. + + Values: + STATE_UNSPECIFIED (0): + Gateway does not have a state yet. + CREATING (1): + Gateway is being created. + ACTIVE (2): + Gateway is running and ready for requests. + FAILED (3): + Gateway creation failed. + DELETING (4): + Gateway is being deleted. + UPDATING (5): + Gateway is being updated. + """ STATE_UNSPECIFIED = 0 CREATING = 1 ACTIVE = 2 @@ -786,6 +836,14 @@ class GetApiConfigRequest(proto.Message): class ConfigView(proto.Enum): r"""Enum to control which fields should be included in the response. + + Values: + CONFIG_VIEW_UNSPECIFIED (0): + + BASIC (1): + Do not include configuration source files. + FULL (2): + Include configuration source files. """ CONFIG_VIEW_UNSPECIFIED = 0 BASIC = 1 diff --git a/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json b/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json index 3ee3e66ebb82..fdf981856ea3 100644 --- a/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json +++ b/packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-api-gateway", - "version": "1.6.0" + "version": "0.1.0" }, "snippets": [ {