Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 4643933

Browse files
docs: Add documentation for enums (#524)
* 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: 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 * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 3a63c60 commit 4643933

File tree

15 files changed

+462
-15
lines changed

15 files changed

+462
-15
lines changed

google/cloud/monitoring_v3/services/alert_policy_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ def sample_update_alert_policy():
10831083
# Done; return the response.
10841084
return response
10851085

1086-
def __enter__(self):
1086+
def __enter__(self) -> "AlertPolicyServiceClient":
10871087
return self
10881088

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

google/cloud/monitoring_v3/services/group_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ def sample_list_group_members():
11961196
# Done; return the response.
11971197
return response
11981198

1199-
def __enter__(self):
1199+
def __enter__(self) -> "GroupServiceClient":
12001200
return self
12011201

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

google/cloud/monitoring_v3/services/metric_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ def sample_create_service_time_series():
15891589
metadata=metadata,
15901590
)
15911591

1592-
def __enter__(self):
1592+
def __enter__(self) -> "MetricServiceClient":
15931593
return self
15941594

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

google/cloud/monitoring_v3/services/notification_channel_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ def sample_verify_notification_channel():
17361736
# Done; return the response.
17371737
return response
17381738

1739-
def __enter__(self):
1739+
def __enter__(self) -> "NotificationChannelServiceClient":
17401740
return self
17411741

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

google/cloud/monitoring_v3/services/query_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def sample_query_time_series():
514514
# Done; return the response.
515515
return response
516516

517-
def __enter__(self):
517+
def __enter__(self) -> "QueryServiceClient":
518518
return self
519519

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

google/cloud/monitoring_v3/services/service_monitoring_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ def sample_delete_service_level_objective():
16101610
metadata=metadata,
16111611
)
16121612

1613-
def __enter__(self):
1613+
def __enter__(self) -> "ServiceMonitoringServiceClient":
16141614
return self
16151615

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

google/cloud/monitoring_v3/services/snooze_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ def sample_update_snooze():
981981
# Done; return the response.
982982
return response
983983

984-
def __enter__(self):
984+
def __enter__(self) -> "SnoozeServiceClient":
985985
return self
986986

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

google/cloud/monitoring_v3/services/uptime_check_service/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ def sample_list_uptime_check_ips():
11171117
# Done; return the response.
11181118
return response
11191119

1120-
def __enter__(self):
1120+
def __enter__(self) -> "UptimeCheckServiceClient":
11211121
return self
11221122

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

google/cloud/monitoring_v3/types/alert.py

+34-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,26 @@ class AlertPolicy(proto.Message):
133133
"""
134134

135135
class ConditionCombinerType(proto.Enum):
136-
r"""Operators for combining conditions."""
136+
r"""Operators for combining conditions.
137+
138+
Values:
139+
COMBINE_UNSPECIFIED (0):
140+
An unspecified combiner.
141+
AND (1):
142+
Combine conditions using the logical ``AND`` operator. An
143+
incident is created only if all the conditions are met
144+
simultaneously. This combiner is satisfied if all conditions
145+
are met, even if they are met on completely different
146+
resources.
147+
OR (2):
148+
Combine conditions using the logical ``OR`` operator. An
149+
incident is created if any of the listed conditions is met.
150+
AND_WITH_MATCHING_RESOURCE (3):
151+
Combine conditions using logical ``AND`` operator, but
152+
unlike the regular ``AND`` option, an incident is created
153+
only if all conditions are met simultaneously on at least
154+
one resource.
155+
"""
137156
COMBINE_UNSPECIFIED = 0
138157
AND = 1
139158
OR = 2
@@ -243,6 +262,20 @@ class EvaluationMissingData(proto.Enum):
243262
r"""A condition control that determines how metric-threshold
244263
conditions are evaluated when data stops arriving.
245264
This control doesn't affect metric-absence policies.
265+
266+
Values:
267+
EVALUATION_MISSING_DATA_UNSPECIFIED (0):
268+
An unspecified evaluation missing data option. Equivalent to
269+
EVALUATION_MISSING_DATA_NO_OP.
270+
EVALUATION_MISSING_DATA_INACTIVE (1):
271+
If there is no data to evaluate the
272+
condition, then evaluate the condition as false.
273+
EVALUATION_MISSING_DATA_ACTIVE (2):
274+
If there is no data to evaluate the
275+
condition, then evaluate the condition as true.
276+
EVALUATION_MISSING_DATA_NO_OP (3):
277+
Do not evaluate the condition to any value if
278+
there is no data.
246279
"""
247280
EVALUATION_MISSING_DATA_UNSPECIFIED = 0
248281
EVALUATION_MISSING_DATA_INACTIVE = 1

0 commit comments

Comments
 (0)