Skip to content

Commit b5a973d

Browse files
docs: Add documentation for enums (#196)
* 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>
1 parent 27471ef commit b5a973d

File tree

3 files changed

+63
-5
lines changed

3 files changed

+63
-5
lines changed

packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,7 @@ def sample_delete_api_config():
23792379
# Done; return the response.
23802380
return response
23812381

2382-
def __enter__(self):
2382+
def __enter__(self) -> "ApiGatewayServiceClient":
23832383
return self
23842384

23852385
def __exit__(self, type, value, traceback):

packages/google-cloud-api-gateway/google/cloud/apigateway_v1/types/apigateway.py

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,22 @@ class Api(proto.Message):
7979
"""
8080

8181
class State(proto.Enum):
82-
r"""All the possible API states."""
82+
r"""All the possible API states.
83+
84+
Values:
85+
STATE_UNSPECIFIED (0):
86+
API does not have a state yet.
87+
CREATING (1):
88+
API is being created.
89+
ACTIVE (2):
90+
API is active.
91+
FAILED (3):
92+
API creation failed.
93+
DELETING (4):
94+
API is being deleted.
95+
UPDATING (5):
96+
API is being updated.
97+
"""
8398
STATE_UNSPECIFIED = 0
8499
CREATING = 1
85100
ACTIVE = 2
@@ -179,7 +194,27 @@ class ApiConfig(proto.Message):
179194
"""
180195

181196
class State(proto.Enum):
182-
r"""All the possible API Config states."""
197+
r"""All the possible API Config states.
198+
199+
Values:
200+
STATE_UNSPECIFIED (0):
201+
API Config does not have a state yet.
202+
CREATING (1):
203+
API Config is being created and deployed to
204+
the API Controller.
205+
ACTIVE (2):
206+
API Config is ready for use by Gateways.
207+
FAILED (3):
208+
API Config creation failed.
209+
DELETING (4):
210+
API Config is being deleted.
211+
UPDATING (5):
212+
API Config is being updated.
213+
ACTIVATING (6):
214+
API Config settings are being activated in
215+
downstream systems. API Configs in this state
216+
cannot be used by Gateways.
217+
"""
183218
STATE_UNSPECIFIED = 0
184219
CREATING = 1
185220
ACTIVE = 2
@@ -341,7 +376,22 @@ class Gateway(proto.Message):
341376
"""
342377

343378
class State(proto.Enum):
344-
r"""All the possible Gateway states."""
379+
r"""All the possible Gateway states.
380+
381+
Values:
382+
STATE_UNSPECIFIED (0):
383+
Gateway does not have a state yet.
384+
CREATING (1):
385+
Gateway is being created.
386+
ACTIVE (2):
387+
Gateway is running and ready for requests.
388+
FAILED (3):
389+
Gateway creation failed.
390+
DELETING (4):
391+
Gateway is being deleted.
392+
UPDATING (5):
393+
Gateway is being updated.
394+
"""
345395
STATE_UNSPECIFIED = 0
346396
CREATING = 1
347397
ACTIVE = 2
@@ -786,6 +836,14 @@ class GetApiConfigRequest(proto.Message):
786836
class ConfigView(proto.Enum):
787837
r"""Enum to control which fields should be included in the
788838
response.
839+
840+
Values:
841+
CONFIG_VIEW_UNSPECIFIED (0):
842+
843+
BASIC (1):
844+
Do not include configuration source files.
845+
FULL (2):
846+
Include configuration source files.
789847
"""
790848
CONFIG_VIEW_UNSPECIFIED = 0
791849
BASIC = 1

packages/google-cloud-api-gateway/samples/generated_samples/snippet_metadata_google.cloud.apigateway.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-api-gateway",
11-
"version": "1.6.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)