Skip to content

Commit 26a0749

Browse files
docs: Add documentation for enums (#407)
* 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 0ec436b commit 26a0749

File tree

6 files changed

+85
-7
lines changed

6 files changed

+85
-7
lines changed

google/cloud/errorreporting_v1beta1/services/error_group_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def sample_update_group():
647647
# Done; return the response.
648648
return response
649649

650-
def __enter__(self):
650+
def __enter__(self) -> "ErrorGroupServiceClient":
651651
return self
652652

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

google/cloud/errorreporting_v1beta1/services/error_stats_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def sample_delete_events():
818818
# Done; return the response.
819819
return response
820820

821-
def __enter__(self):
821+
def __enter__(self) -> "ErrorStatsServiceClient":
822822
return self
823823

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

google/cloud/errorreporting_v1beta1/services/report_errors_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def sample_report_error_event():
557557
# Done; return the response.
558558
return response
559559

560-
def __enter__(self):
560+
def __enter__(self) -> "ReportErrorsServiceClient":
561561
return self
562562

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

google/cloud/errorreporting_v1beta1/types/common.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,26 @@
3636

3737

3838
class ResolutionStatus(proto.Enum):
39-
r"""Resolution status of an error group."""
39+
r"""Resolution status of an error group.
40+
41+
Values:
42+
RESOLUTION_STATUS_UNSPECIFIED (0):
43+
Status is unknown. When left unspecified in
44+
requests, it is treated like OPEN.
45+
OPEN (1):
46+
The error group is not being addressed. This
47+
is the default for new groups. It is also used
48+
for errors re-occurring after marked RESOLVED.
49+
ACKNOWLEDGED (2):
50+
Error Group manually acknowledged, it can
51+
have an issue link attached.
52+
RESOLVED (3):
53+
Error Group manually resolved, more events
54+
for this group are not expected to occur.
55+
MUTED (4):
56+
The error group is muted and excluded by
57+
default on group stats requests.
58+
"""
4059
RESOLUTION_STATUS_UNSPECIFIED = 0
4160
OPEN = 1
4261
ACKNOWLEDGED = 2

google/cloud/errorreporting_v1beta1/types/error_stats_service.py

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,50 @@
4444
class TimedCountAlignment(proto.Enum):
4545
r"""Specifies how the time periods of error group counts are
4646
aligned.
47+
48+
Values:
49+
ERROR_COUNT_ALIGNMENT_UNSPECIFIED (0):
50+
No alignment specified.
51+
ALIGNMENT_EQUAL_ROUNDED (1):
52+
The time periods shall be consecutive, have width equal to
53+
the requested duration, and be aligned at the
54+
``alignment_time`` provided in the request. The
55+
``alignment_time`` does not have to be inside the query
56+
period but even if it is outside, only time periods are
57+
returned which overlap with the query period. A rounded
58+
alignment will typically result in a different size of the
59+
first or the last time period.
60+
ALIGNMENT_EQUAL_AT_END (2):
61+
The time periods shall be consecutive, have
62+
width equal to the requested duration, and be
63+
aligned at the end of the requested time period.
64+
This can result in a different size of the first
65+
time period.
4766
"""
4867
ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0
4968
ALIGNMENT_EQUAL_ROUNDED = 1
5069
ALIGNMENT_EQUAL_AT_END = 2
5170

5271

5372
class ErrorGroupOrder(proto.Enum):
54-
r"""A sorting order of error groups."""
73+
r"""A sorting order of error groups.
74+
75+
Values:
76+
GROUP_ORDER_UNSPECIFIED (0):
77+
No group order specified.
78+
COUNT_DESC (1):
79+
Total count of errors in the given time
80+
window in descending order.
81+
LAST_SEEN_DESC (2):
82+
Timestamp when the group was last seen in the
83+
given time window in descending order.
84+
CREATED_DESC (3):
85+
Timestamp when the group was created in
86+
descending order.
87+
AFFECTED_USERS_DESC (4):
88+
Number of affected users in the given time
89+
window in descending order.
90+
"""
5591
GROUP_ORDER_UNSPECIFIED = 0
5692
COUNT_DESC = 1
5793
LAST_SEEN_DESC = 2
@@ -440,7 +476,30 @@ class QueryTimeRange(proto.Message):
440476
"""
441477

442478
class Period(proto.Enum):
443-
r"""The supported time ranges."""
479+
r"""The supported time ranges.
480+
481+
Values:
482+
PERIOD_UNSPECIFIED (0):
483+
Do not use.
484+
PERIOD_1_HOUR (1):
485+
Retrieve data for the last hour.
486+
Recommended minimum timed count duration: 1 min.
487+
PERIOD_6_HOURS (2):
488+
Retrieve data for the last 6 hours.
489+
Recommended minimum timed count duration: 10
490+
min.
491+
PERIOD_1_DAY (3):
492+
Retrieve data for the last day.
493+
Recommended minimum timed count duration: 1
494+
hour.
495+
PERIOD_1_WEEK (4):
496+
Retrieve data for the last week.
497+
Recommended minimum timed count duration: 6
498+
hours.
499+
PERIOD_30_DAYS (5):
500+
Retrieve data for the last 30 days.
501+
Recommended minimum timed count duration: 1 day.
502+
"""
444503
PERIOD_UNSPECIFIED = 0
445504
PERIOD_1_HOUR = 1
446505
PERIOD_6_HOURS = 2

samples/generated_samples/snippet_metadata_google.devtools.clouderrorreporting.v1beta1.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-error-reporting",
11-
"version": "1.8.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)