From 4b55f23387c1572ca64031cccb9045e6ab8c05c6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:10:24 -0500 Subject: [PATCH] docs: Add documentation for enums (#186) 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/service_manager/client.py | 2 +- .../servicemanagement_v1/types/resources.py | 80 ++++++++++++++++++- .../types/servicemanager.py | 14 +++- ...adata_google.api.servicemanagement.v1.json | 2 +- 4 files changed, 92 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/services/service_manager/client.py b/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/services/service_manager/client.py index e0c95d404a3c..914428b0b233 100644 --- a/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/services/service_manager/client.py +++ b/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/services/service_manager/client.py @@ -2192,7 +2192,7 @@ def sample_generate_config_report(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ServiceManagerClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/resources.py b/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/resources.py index adb62a97c0aa..1e4b80b80cf2 100644 --- a/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/resources.py +++ b/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/resources.py @@ -79,6 +79,24 @@ class OperationMetadata(proto.Message): class Status(proto.Enum): r"""Code describes the status of the operation (or one of its steps). + + Values: + STATUS_UNSPECIFIED (0): + Unspecifed code. + DONE (1): + The operation or step has completed without + errors. + NOT_STARTED (2): + The operation or step has not started yet. + IN_PROGRESS (3): + The operation or step is in progress. + FAILED (4): + The operation or step has completed with + errors. If the operation is rollbackable, the + rollback completed with errors too. + CANCELLED (5): + The operation or step has completed with + cancellation. """ STATUS_UNSPECIFIED = 0 DONE = 1 @@ -141,7 +159,14 @@ class Diagnostic(proto.Message): """ class Kind(proto.Enum): - r"""The kind of diagnostic information possible.""" + r"""The kind of diagnostic information possible. + + Values: + WARNING (0): + Warnings and errors + ERROR (1): + Only errors + """ WARNING = 0 ERROR = 1 @@ -201,7 +226,34 @@ class ConfigFile(proto.Message): """ class FileType(proto.Enum): - r"""""" + r""" + + Values: + FILE_TYPE_UNSPECIFIED (0): + Unknown file type. + SERVICE_CONFIG_YAML (1): + YAML-specification of service. + OPEN_API_JSON (2): + OpenAPI specification, serialized in JSON. + OPEN_API_YAML (3): + OpenAPI specification, serialized in YAML. + FILE_DESCRIPTOR_SET_PROTO (4): + FileDescriptorSet, generated by protoc. + + To generate, use protoc with imports and source info + included. For an example test.proto file, the following + command would put the value in a new file named out.pb. + + $protoc --include_imports --include_source_info test.proto + -o out.pb + PROTO_FILE (6): + Uncompiled Proto file. Used for storage and display purposes + only, currently server-side compilation is not supported. + Should match the inputs to 'protoc' command used to + generated FILE_DESCRIPTOR_SET_PROTO. A file of this type can + only be included if at least one file of type + FILE_DESCRIPTOR_SET_PROTO is included. + """ FILE_TYPE_UNSPECIFIED = 0 SERVICE_CONFIG_YAML = 1 OPEN_API_JSON = 2 @@ -314,7 +366,29 @@ class Rollout(proto.Message): """ class RolloutStatus(proto.Enum): - r"""Status of a Rollout.""" + r"""Status of a Rollout. + + Values: + ROLLOUT_STATUS_UNSPECIFIED (0): + No status specified. + IN_PROGRESS (1): + The Rollout is in progress. + SUCCESS (2): + The Rollout has completed successfully. + CANCELLED (3): + The Rollout has been cancelled. This can + happen if you have overlapping Rollout pushes, + and the previous ones will be cancelled. + FAILED (4): + The Rollout has failed and the rollback + attempt has failed too. + PENDING (5): + The Rollout has not started yet and is + pending for execution. + FAILED_ROLLED_BACK (6): + The Rollout has failed and rolled back to the + previous successful Rollout. + """ ROLLOUT_STATUS_UNSPECIFIED = 0 IN_PROGRESS = 1 SUCCESS = 2 diff --git a/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/servicemanager.py b/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/servicemanager.py index d13db8e72193..7c636f86d947 100644 --- a/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/servicemanager.py +++ b/packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/servicemanager.py @@ -216,7 +216,19 @@ class GetServiceConfigRequest(proto.Message): """ class ConfigView(proto.Enum): - r"""""" + r""" + + Values: + BASIC (0): + Server response includes all fields except + SourceInfo. + FULL (1): + Server response includes all fields including + SourceInfo. SourceFiles are of type + 'google.api.servicemanagement.v1.ConfigFile' and + are only available for configs created using the + SubmitConfigSource method. + """ BASIC = 0 FULL = 1 diff --git a/packages/google-cloud-service-management/samples/generated_samples/snippet_metadata_google.api.servicemanagement.v1.json b/packages/google-cloud-service-management/samples/generated_samples/snippet_metadata_google.api.servicemanagement.v1.json index 9bd9b63c16b1..8b514f320127 100644 --- a/packages/google-cloud-service-management/samples/generated_samples/snippet_metadata_google.api.servicemanagement.v1.json +++ b/packages/google-cloud-service-management/samples/generated_samples/snippet_metadata_google.api.servicemanagement.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-service-management", - "version": "1.5.0" + "version": "0.1.0" }, "snippets": [ {