Skip to content
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

docs: Add documentation for enums #407

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 @@ -647,7 +647,7 @@ def sample_update_group():
# Done; return the response.
return response

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

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

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

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

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

def __exit__(self, type, value, traceback):
Expand Down
21 changes: 20 additions & 1 deletion google/cloud/errorreporting_v1beta1/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,26 @@


class ResolutionStatus(proto.Enum):
r"""Resolution status of an error group."""
r"""Resolution status of an error group.

Values:
RESOLUTION_STATUS_UNSPECIFIED (0):
Status is unknown. When left unspecified in
requests, it is treated like OPEN.
OPEN (1):
The error group is not being addressed. This
is the default for new groups. It is also used
for errors re-occurring after marked RESOLVED.
ACKNOWLEDGED (2):
Error Group manually acknowledged, it can
have an issue link attached.
RESOLVED (3):
Error Group manually resolved, more events
for this group are not expected to occur.
MUTED (4):
The error group is muted and excluded by
default on group stats requests.
"""
RESOLUTION_STATUS_UNSPECIFIED = 0
OPEN = 1
ACKNOWLEDGED = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,50 @@
class TimedCountAlignment(proto.Enum):
r"""Specifies how the time periods of error group counts are
aligned.

Values:
ERROR_COUNT_ALIGNMENT_UNSPECIFIED (0):
No alignment specified.
ALIGNMENT_EQUAL_ROUNDED (1):
The time periods shall be consecutive, have width equal to
the requested duration, and be aligned at the
``alignment_time`` provided in the request. The
``alignment_time`` does not have to be inside the query
period but even if it is outside, only time periods are
returned which overlap with the query period. A rounded
alignment will typically result in a different size of the
first or the last time period.
ALIGNMENT_EQUAL_AT_END (2):
The time periods shall be consecutive, have
width equal to the requested duration, and be
aligned at the end of the requested time period.
This can result in a different size of the first
time period.
"""
ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0
ALIGNMENT_EQUAL_ROUNDED = 1
ALIGNMENT_EQUAL_AT_END = 2


class ErrorGroupOrder(proto.Enum):
r"""A sorting order of error groups."""
r"""A sorting order of error groups.

Values:
GROUP_ORDER_UNSPECIFIED (0):
No group order specified.
COUNT_DESC (1):
Total count of errors in the given time
window in descending order.
LAST_SEEN_DESC (2):
Timestamp when the group was last seen in the
given time window in descending order.
CREATED_DESC (3):
Timestamp when the group was created in
descending order.
AFFECTED_USERS_DESC (4):
Number of affected users in the given time
window in descending order.
"""
GROUP_ORDER_UNSPECIFIED = 0
COUNT_DESC = 1
LAST_SEEN_DESC = 2
Expand Down Expand Up @@ -440,7 +476,30 @@ class QueryTimeRange(proto.Message):
"""

class Period(proto.Enum):
r"""The supported time ranges."""
r"""The supported time ranges.

Values:
PERIOD_UNSPECIFIED (0):
Do not use.
PERIOD_1_HOUR (1):
Retrieve data for the last hour.
Recommended minimum timed count duration: 1 min.
PERIOD_6_HOURS (2):
Retrieve data for the last 6 hours.
Recommended minimum timed count duration: 10
min.
PERIOD_1_DAY (3):
Retrieve data for the last day.
Recommended minimum timed count duration: 1
hour.
PERIOD_1_WEEK (4):
Retrieve data for the last week.
Recommended minimum timed count duration: 6
hours.
PERIOD_30_DAYS (5):
Retrieve data for the last 30 days.
Recommended minimum timed count duration: 1 day.
"""
PERIOD_UNSPECIFIED = 0
PERIOD_1_HOUR = 1
PERIOD_6_HOURS = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-error-reporting",
"version": "1.8.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down