Skip to content

Commit

Permalink
docs: Add documentation for enums (#186)
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] authored Jan 23, 2023
1 parent b16b81f commit 4b55f23
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-service-management",
"version": "1.5.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 4b55f23

Please sign in to comment.