Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs: Add documentation for enums #709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3334,7 +3334,7 @@ def sample_copy_log_entries():
# Done; return the response.
return response

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

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

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ def sample_delete_log_metric():
metadata=metadata,
)

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

def __exit__(self, type, value, traceback):
Expand Down
15 changes: 14 additions & 1 deletion 15 google/cloud/logging_v2/types/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,20 @@ class SuppressionInfo(proto.Message):
"""

class Reason(proto.Enum):
r"""An indicator of why entries were omitted."""
r"""An indicator of why entries were omitted.

Values:
REASON_UNSPECIFIED (0):
Unexpected default.
RATE_LIMIT (1):
Indicates suppression occurred due to relevant entries being
received in excess of rate limits. For quotas and limits,
see `Logging API quotas and
limits <https://cloud.google.com/logging/quotas#api-limits>`__.
NOT_CONSUMED (2):
Indicates suppression occurred due to the
client not consuming responses quickly enough.
"""
REASON_UNSPECIFIED = 0
RATE_LIMIT = 1
NOT_CONSUMED = 2
Expand Down
42 changes: 40 additions & 2 deletions 42 google/cloud/logging_v2/types/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,19 @@


class LifecycleState(proto.Enum):
r"""LogBucket lifecycle states."""
r"""LogBucket lifecycle states.

Values:
LIFECYCLE_STATE_UNSPECIFIED (0):
Unspecified state. This is only used/useful
for distinguishing unset values.
ACTIVE (1):
The normal and active state.
DELETE_REQUESTED (2):
The resource has been marked for deletion by
the user. For some resources (e.g. buckets),
this can be reversed by an un-delete operation.
"""
LIFECYCLE_STATE_UNSPECIFIED = 0
ACTIVE = 1
DELETE_REQUESTED = 2
Expand All @@ -83,6 +95,22 @@ class OperationState(proto.Enum):
is created, the current state of the operation can be queried
even before the operation is finished and the final result is
available.

Values:
OPERATION_STATE_UNSPECIFIED (0):
Should not be used.
OPERATION_STATE_SCHEDULED (1):
The operation is scheduled.
OPERATION_STATE_WAITING_FOR_PERMISSIONS (2):
Waiting for necessary permissions.
OPERATION_STATE_RUNNING (3):
The operation is running.
OPERATION_STATE_SUCCEEDED (4):
The operation was completed successfully.
OPERATION_STATE_FAILED (5):
The operation failed.
OPERATION_STATE_CANCELLED (6):
The operation was cancelled by the user.
"""
OPERATION_STATE_UNSPECIFIED = 0
OPERATION_STATE_SCHEDULED = 1
Expand Down Expand Up @@ -371,7 +399,17 @@ class LogSink(proto.Message):
"""

class VersionFormat(proto.Enum):
r"""Deprecated. This is unused."""
r"""Deprecated. This is unused.

Values:
VERSION_FORMAT_UNSPECIFIED (0):
An unspecified format version that will
default to V2.
V2 (1):
``LogEntry`` version 2 format.
V1 (2):
``LogEntry`` version 1 format.
"""
VERSION_FORMAT_UNSPECIFIED = 0
V2 = 1
V1 = 2
Expand Down
9 changes: 8 additions & 1 deletion 9 google/cloud/logging_v2/types/logging_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ class LogMetric(proto.Message):
"""

class ApiVersion(proto.Enum):
r"""Logging API version."""
r"""Logging API version.

Values:
V2 (0):
Logging API v2.
V1 (1):
Logging API v1.
"""
V2 = 0
V1 = 1

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.