From 46439333f73e71267d28fc395850f6aa66bca288 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:04:46 -0500 Subject: [PATCH 1/2] docs: Add documentation for enums (#524) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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: https://github.com/googleapis/googleapis/commit/a391fd1dac18dfdfa00c18c8404f2c3a6ff8e98e 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 Co-authored-by: Anthonios Partheniou --- .../services/alert_policy_service/client.py | 2 +- .../services/group_service/client.py | 2 +- .../services/metric_service/client.py | 2 +- .../notification_channel_service/client.py | 2 +- .../services/query_service/client.py | 2 +- .../service_monitoring_service/client.py | 2 +- .../services/snooze_service/client.py | 2 +- .../services/uptime_check_service/client.py | 2 +- google/cloud/monitoring_v3/types/alert.py | 35 ++- google/cloud/monitoring_v3/types/common.py | 277 ++++++++++++++++++ .../monitoring_v3/types/metric_service.py | 12 +- .../cloud/monitoring_v3/types/notification.py | 20 ++ google/cloud/monitoring_v3/types/service.py | 15 + google/cloud/monitoring_v3/types/uptime.py | 100 ++++++- ...snippet_metadata_google.monitoring.v3.json | 2 +- 15 files changed, 462 insertions(+), 15 deletions(-) diff --git a/google/cloud/monitoring_v3/services/alert_policy_service/client.py b/google/cloud/monitoring_v3/services/alert_policy_service/client.py index 14ad0b64..50a992f0 100644 --- a/google/cloud/monitoring_v3/services/alert_policy_service/client.py +++ b/google/cloud/monitoring_v3/services/alert_policy_service/client.py @@ -1083,7 +1083,7 @@ def sample_update_alert_policy(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "AlertPolicyServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/group_service/client.py b/google/cloud/monitoring_v3/services/group_service/client.py index ce19beb7..fa85d311 100644 --- a/google/cloud/monitoring_v3/services/group_service/client.py +++ b/google/cloud/monitoring_v3/services/group_service/client.py @@ -1196,7 +1196,7 @@ def sample_list_group_members(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "GroupServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/metric_service/client.py b/google/cloud/monitoring_v3/services/metric_service/client.py index 7da7cf69..0d40b09c 100644 --- a/google/cloud/monitoring_v3/services/metric_service/client.py +++ b/google/cloud/monitoring_v3/services/metric_service/client.py @@ -1589,7 +1589,7 @@ def sample_create_service_time_series(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "MetricServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/notification_channel_service/client.py b/google/cloud/monitoring_v3/services/notification_channel_service/client.py index 0ee3e52c..26145487 100644 --- a/google/cloud/monitoring_v3/services/notification_channel_service/client.py +++ b/google/cloud/monitoring_v3/services/notification_channel_service/client.py @@ -1736,7 +1736,7 @@ def sample_verify_notification_channel(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "NotificationChannelServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/query_service/client.py b/google/cloud/monitoring_v3/services/query_service/client.py index 16cf2a17..469da8fe 100644 --- a/google/cloud/monitoring_v3/services/query_service/client.py +++ b/google/cloud/monitoring_v3/services/query_service/client.py @@ -514,7 +514,7 @@ def sample_query_time_series(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "QueryServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/service_monitoring_service/client.py b/google/cloud/monitoring_v3/services/service_monitoring_service/client.py index c3029c64..355f7feb 100644 --- a/google/cloud/monitoring_v3/services/service_monitoring_service/client.py +++ b/google/cloud/monitoring_v3/services/service_monitoring_service/client.py @@ -1610,7 +1610,7 @@ def sample_delete_service_level_objective(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "ServiceMonitoringServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/snooze_service/client.py b/google/cloud/monitoring_v3/services/snooze_service/client.py index fc024ac6..ec6ff805 100644 --- a/google/cloud/monitoring_v3/services/snooze_service/client.py +++ b/google/cloud/monitoring_v3/services/snooze_service/client.py @@ -981,7 +981,7 @@ def sample_update_snooze(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "SnoozeServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/services/uptime_check_service/client.py b/google/cloud/monitoring_v3/services/uptime_check_service/client.py index 4ed999f6..3fca44ff 100644 --- a/google/cloud/monitoring_v3/services/uptime_check_service/client.py +++ b/google/cloud/monitoring_v3/services/uptime_check_service/client.py @@ -1117,7 +1117,7 @@ def sample_list_uptime_check_ips(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "UptimeCheckServiceClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/monitoring_v3/types/alert.py b/google/cloud/monitoring_v3/types/alert.py index 531ff9a5..1cd02153 100644 --- a/google/cloud/monitoring_v3/types/alert.py +++ b/google/cloud/monitoring_v3/types/alert.py @@ -133,7 +133,26 @@ class AlertPolicy(proto.Message): """ class ConditionCombinerType(proto.Enum): - r"""Operators for combining conditions.""" + r"""Operators for combining conditions. + + Values: + COMBINE_UNSPECIFIED (0): + An unspecified combiner. + AND (1): + Combine conditions using the logical ``AND`` operator. An + incident is created only if all the conditions are met + simultaneously. This combiner is satisfied if all conditions + are met, even if they are met on completely different + resources. + OR (2): + Combine conditions using the logical ``OR`` operator. An + incident is created if any of the listed conditions is met. + AND_WITH_MATCHING_RESOURCE (3): + Combine conditions using logical ``AND`` operator, but + unlike the regular ``AND`` option, an incident is created + only if all conditions are met simultaneously on at least + one resource. + """ COMBINE_UNSPECIFIED = 0 AND = 1 OR = 2 @@ -243,6 +262,20 @@ class EvaluationMissingData(proto.Enum): r"""A condition control that determines how metric-threshold conditions are evaluated when data stops arriving. This control doesn't affect metric-absence policies. + + Values: + EVALUATION_MISSING_DATA_UNSPECIFIED (0): + An unspecified evaluation missing data option. Equivalent to + EVALUATION_MISSING_DATA_NO_OP. + EVALUATION_MISSING_DATA_INACTIVE (1): + If there is no data to evaluate the + condition, then evaluate the condition as false. + EVALUATION_MISSING_DATA_ACTIVE (2): + If there is no data to evaluate the + condition, then evaluate the condition as true. + EVALUATION_MISSING_DATA_NO_OP (3): + Do not evaluate the condition to any value if + there is no data. """ EVALUATION_MISSING_DATA_UNSPECIFIED = 0 EVALUATION_MISSING_DATA_INACTIVE = 1 diff --git a/google/cloud/monitoring_v3/types/common.py b/google/cloud/monitoring_v3/types/common.py index 7d45d3a9..e3636820 100644 --- a/google/cloud/monitoring_v3/types/common.py +++ b/google/cloud/monitoring_v3/types/common.py @@ -37,6 +37,28 @@ class ComparisonType(proto.Enum): r"""Specifies an ordering relationship on two arguments, called ``left`` and ``right``. + + Values: + COMPARISON_UNSPECIFIED (0): + No ordering relationship is specified. + COMPARISON_GT (1): + True if the left argument is greater than the + right argument. + COMPARISON_GE (2): + True if the left argument is greater than or + equal to the right argument. + COMPARISON_LT (3): + True if the left argument is less than the + right argument. + COMPARISON_LE (4): + True if the left argument is less than or + equal to the right argument. + COMPARISON_EQ (5): + True if the left argument is equal to the + right argument. + COMPARISON_NE (6): + True if the left argument is not equal to the + right argument. """ COMPARISON_UNSPECIFIED = 0 COMPARISON_GT = 1 @@ -51,6 +73,25 @@ class ServiceTier(proto.Enum): r"""The tier of service for a Workspace. Please see the `service tiers documentation `__ for more details. + + Values: + SERVICE_TIER_UNSPECIFIED (0): + An invalid sentinel value, used to indicate + that a tier has not been provided explicitly. + SERVICE_TIER_BASIC (1): + The Stackdriver Basic tier, a free tier of service that + provides basic features, a moderate allotment of logs, and + access to built-in metrics. A number of features are not + available in this tier. For more details, see `the service + tiers + documentation `__. + SERVICE_TIER_PREMIUM (2): + The Stackdriver Premium tier, a higher, more expensive tier + of service that provides access to all Stackdriver features, + lets you use Stackdriver with AWS accounts, and has a larger + allotments for logs and metrics. For more details, see `the + service tiers + documentation `__. """ _pb_options = {"deprecated": True} SERVICE_TIER_UNSPECIFIED = 0 @@ -300,6 +341,153 @@ class Aligner(proto.Enum): For example, if you apply a counting operation to boolean values, the data ``value_type`` in the original time series is ``BOOLEAN``, but the ``value_type`` in the aligned result is ``INT64``. + + Values: + ALIGN_NONE (0): + No alignment. Raw data is returned. Not valid if + cross-series reduction is requested. The ``value_type`` of + the result is the same as the ``value_type`` of the input. + ALIGN_DELTA (1): + Align and convert to + [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. The + output is ``delta = y1 - y0``. + + This alignment is valid for + [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] + and ``DELTA`` metrics. If the selected alignment period + results in periods with no data, then the aligned value for + such a period is created by interpolation. The + ``value_type`` of the aligned result is the same as the + ``value_type`` of the input. + ALIGN_RATE (2): + Align and convert to a rate. The result is computed as + ``rate = (y1 - y0)/(t1 - t0)``, or "delta over time". Think + of this aligner as providing the slope of the line that + passes through the value at the start and at the end of the + ``alignment_period``. + + This aligner is valid for ``CUMULATIVE`` and ``DELTA`` + metrics with numeric values. If the selected alignment + period results in periods with no data, then the aligned + value for such a period is created by interpolation. The + output is a ``GAUGE`` metric with ``value_type`` ``DOUBLE``. + + If, by "rate", you mean "percentage change", see the + ``ALIGN_PERCENT_CHANGE`` aligner instead. + ALIGN_INTERPOLATE (3): + Align by interpolating between adjacent points around the + alignment period boundary. This aligner is valid for + ``GAUGE`` metrics with numeric values. The ``value_type`` of + the aligned result is the same as the ``value_type`` of the + input. + ALIGN_NEXT_OLDER (4): + Align by moving the most recent data point before the end of + the alignment period to the boundary at the end of the + alignment period. This aligner is valid for ``GAUGE`` + metrics. The ``value_type`` of the aligned result is the + same as the ``value_type`` of the input. + ALIGN_MIN (10): + Align the time series by returning the minimum value in each + alignment period. This aligner is valid for ``GAUGE`` and + ``DELTA`` metrics with numeric values. The ``value_type`` of + the aligned result is the same as the ``value_type`` of the + input. + ALIGN_MAX (11): + Align the time series by returning the maximum value in each + alignment period. This aligner is valid for ``GAUGE`` and + ``DELTA`` metrics with numeric values. The ``value_type`` of + the aligned result is the same as the ``value_type`` of the + input. + ALIGN_MEAN (12): + Align the time series by returning the mean value in each + alignment period. This aligner is valid for ``GAUGE`` and + ``DELTA`` metrics with numeric values. The ``value_type`` of + the aligned result is ``DOUBLE``. + ALIGN_COUNT (13): + Align the time series by returning the number of values in + each alignment period. This aligner is valid for ``GAUGE`` + and ``DELTA`` metrics with numeric or Boolean values. The + ``value_type`` of the aligned result is ``INT64``. + ALIGN_SUM (14): + Align the time series by returning the sum of the values in + each alignment period. This aligner is valid for ``GAUGE`` + and ``DELTA`` metrics with numeric and distribution values. + The ``value_type`` of the aligned result is the same as the + ``value_type`` of the input. + ALIGN_STDDEV (15): + Align the time series by returning the standard deviation of + the values in each alignment period. This aligner is valid + for ``GAUGE`` and ``DELTA`` metrics with numeric values. The + ``value_type`` of the output is ``DOUBLE``. + ALIGN_COUNT_TRUE (16): + Align the time series by returning the number of ``True`` + values in each alignment period. This aligner is valid for + ``GAUGE`` metrics with Boolean values. The ``value_type`` of + the output is ``INT64``. + ALIGN_COUNT_FALSE (24): + Align the time series by returning the number of ``False`` + values in each alignment period. This aligner is valid for + ``GAUGE`` metrics with Boolean values. The ``value_type`` of + the output is ``INT64``. + ALIGN_FRACTION_TRUE (17): + Align the time series by returning the ratio of the number + of ``True`` values to the total number of values in each + alignment period. This aligner is valid for ``GAUGE`` + metrics with Boolean values. The output value is in the + range [0.0, 1.0] and has ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_99 (18): + Align the time series by using `percentile + aggregation `__. + The resulting data point in each alignment period is the + 99th percentile of all data points in the period. This + aligner is valid for ``GAUGE`` and ``DELTA`` metrics with + distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_95 (19): + Align the time series by using `percentile + aggregation `__. + The resulting data point in each alignment period is the + 95th percentile of all data points in the period. This + aligner is valid for ``GAUGE`` and ``DELTA`` metrics with + distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_50 (20): + Align the time series by using `percentile + aggregation `__. + The resulting data point in each alignment period is the + 50th percentile of all data points in the period. This + aligner is valid for ``GAUGE`` and ``DELTA`` metrics with + distribution values. The output is a ``GAUGE`` metric with + ``value_type`` ``DOUBLE``. + ALIGN_PERCENTILE_05 (21): + Align the time series by using `percentile + aggregation `__. + The resulting data point in each alignment period is the 5th + percentile of all data points in the period. This aligner is + valid for ``GAUGE`` and ``DELTA`` metrics with distribution + values. The output is a ``GAUGE`` metric with ``value_type`` + ``DOUBLE``. + ALIGN_PERCENT_CHANGE (23): + Align and convert to a percentage change. This aligner is + valid for ``GAUGE`` and ``DELTA`` metrics with numeric + values. This alignment returns + ``((current - previous)/previous) * 100``, where the value + of ``previous`` is determined based on the + ``alignment_period``. + + If the values of ``current`` and ``previous`` are both 0, + then the returned value is 0. If only ``previous`` is 0, the + returned value is infinity. + + A 10-minute moving mean is computed at each point of the + alignment period prior to the above calculation to smooth + the metric and prevent false positives from very short-lived + spikes. The moving mean is only applicable for data whose + values are ``>= 0``. Any values ``< 0`` are treated as a + missing datapoint, and are ignored. While ``DELTA`` metrics + are accepted by this alignment, special care should be taken + that the values for the metric will always be positive. The + output is a ``GAUGE`` metric with ``value_type`` ``DOUBLE``. """ ALIGN_NONE = 0 ALIGN_DELTA = 1 @@ -326,6 +514,95 @@ class Reducer(proto.Enum): from multiple time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series. + + Values: + REDUCE_NONE (0): + No cross-time series reduction. The output of the + ``Aligner`` is returned. + REDUCE_MEAN (1): + Reduce by computing the mean value across time series for + each alignment period. This reducer is valid for + [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and + [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] + metrics with numeric or distribution values. The + ``value_type`` of the output is + [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + REDUCE_MIN (2): + Reduce by computing the minimum value across time series for + each alignment period. This reducer is valid for ``DELTA`` + and ``GAUGE`` metrics with numeric values. The + ``value_type`` of the output is the same as the + ``value_type`` of the input. + REDUCE_MAX (3): + Reduce by computing the maximum value across time series for + each alignment period. This reducer is valid for ``DELTA`` + and ``GAUGE`` metrics with numeric values. The + ``value_type`` of the output is the same as the + ``value_type`` of the input. + REDUCE_SUM (4): + Reduce by computing the sum across time series for each + alignment period. This reducer is valid for ``DELTA`` and + ``GAUGE`` metrics with numeric and distribution values. The + ``value_type`` of the output is the same as the + ``value_type`` of the input. + REDUCE_STDDEV (5): + Reduce by computing the standard deviation across time + series for each alignment period. This reducer is valid for + ``DELTA`` and ``GAUGE`` metrics with numeric or distribution + values. The ``value_type`` of the output is ``DOUBLE``. + REDUCE_COUNT (6): + Reduce by computing the number of data points across time + series for each alignment period. This reducer is valid for + ``DELTA`` and ``GAUGE`` metrics of numeric, Boolean, + distribution, and string ``value_type``. The ``value_type`` + of the output is ``INT64``. + REDUCE_COUNT_TRUE (7): + Reduce by computing the number of ``True``-valued data + points across time series for each alignment period. This + reducer is valid for ``DELTA`` and ``GAUGE`` metrics of + Boolean ``value_type``. The ``value_type`` of the output is + ``INT64``. + REDUCE_COUNT_FALSE (15): + Reduce by computing the number of ``False``-valued data + points across time series for each alignment period. This + reducer is valid for ``DELTA`` and ``GAUGE`` metrics of + Boolean ``value_type``. The ``value_type`` of the output is + ``INT64``. + REDUCE_FRACTION_TRUE (8): + Reduce by computing the ratio of the number of + ``True``-valued data points to the total number of data + points for each alignment period. This reducer is valid for + ``DELTA`` and ``GAUGE`` metrics of Boolean ``value_type``. + The output value is in the range [0.0, 1.0] and has + ``value_type`` ``DOUBLE``. + REDUCE_PERCENTILE_99 (9): + Reduce by computing the `99th + percentile `__ of + data points across time series for each alignment period. + This reducer is valid for ``GAUGE`` and ``DELTA`` metrics of + numeric and distribution type. The value of the output is + ``DOUBLE``. + REDUCE_PERCENTILE_95 (10): + Reduce by computing the `95th + percentile `__ of + data points across time series for each alignment period. + This reducer is valid for ``GAUGE`` and ``DELTA`` metrics of + numeric and distribution type. The value of the output is + ``DOUBLE``. + REDUCE_PERCENTILE_50 (11): + Reduce by computing the `50th + percentile `__ of + data points across time series for each alignment period. + This reducer is valid for ``GAUGE`` and ``DELTA`` metrics of + numeric and distribution type. The value of the output is + ``DOUBLE``. + REDUCE_PERCENTILE_05 (12): + Reduce by computing the `5th + percentile `__ of + data points across time series for each alignment period. + This reducer is valid for ``GAUGE`` and ``DELTA`` metrics of + numeric and distribution type. The value of the output is + ``DOUBLE``. """ REDUCE_NONE = 0 REDUCE_MEAN = 1 diff --git a/google/cloud/monitoring_v3/types/metric_service.py b/google/cloud/monitoring_v3/types/metric_service.py index ba934d72..dfdbac61 100644 --- a/google/cloud/monitoring_v3/types/metric_service.py +++ b/google/cloud/monitoring_v3/types/metric_service.py @@ -367,7 +367,17 @@ class ListTimeSeriesRequest(proto.Message): """ class TimeSeriesView(proto.Enum): - r"""Controls which fields are returned by ``ListTimeSeries``.""" + r"""Controls which fields are returned by ``ListTimeSeries``. + + Values: + FULL (0): + Returns the identity of the metric(s), the + time series, and the time series data. + HEADERS (1): + Returns the identity of the metric and the + time series resource, but not the time series + data. + """ FULL = 0 HEADERS = 1 diff --git a/google/cloud/monitoring_v3/types/notification.py b/google/cloud/monitoring_v3/types/notification.py index c845dd8c..f3b5bf50 100644 --- a/google/cloud/monitoring_v3/types/notification.py +++ b/google/cloud/monitoring_v3/types/notification.py @@ -212,6 +212,26 @@ class VerificationStatus(proto.Enum): or an [``UpdateNotificationChannel``][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] operation. + + Values: + VERIFICATION_STATUS_UNSPECIFIED (0): + Sentinel value used to indicate that the + state is unknown, omitted, or is not applicable + (as in the case of channels that neither support + nor require verification in order to function). + UNVERIFIED (1): + The channel has yet to be verified and + requires verification to function. Note that + this state also applies to the case where the + verification process has been initiated by + sending a verification code but where the + verification code has not been submitted to + complete the process. + VERIFIED (2): + It has been proven that notifications can be + received on this notification channel and that + someone on the project has access to messages + that are delivered to that channel. """ VERIFICATION_STATUS_UNSPECIFIED = 0 UNVERIFIED = 1 diff --git a/google/cloud/monitoring_v3/types/service.py b/google/cloud/monitoring_v3/types/service.py index 07a0be7c..fc80b402 100644 --- a/google/cloud/monitoring_v3/types/service.py +++ b/google/cloud/monitoring_v3/types/service.py @@ -391,6 +391,21 @@ class View(proto.Enum): ``ServiceLevelObjective`` is returned from ``GetServiceLevelObjective``, ``ListServiceLevelObjectives``, and ``ListServiceLevelObjectiveVersions`` RPCs. + + Values: + VIEW_UNSPECIFIED (0): + Same as FULL. + FULL (2): + Return the embedded ``ServiceLevelIndicator`` in the form in + which it was defined. If it was defined using a + ``BasicSli``, return that ``BasicSli``. + EXPLICIT (1): + For ``ServiceLevelIndicator``\ s using ``BasicSli`` + articulation, instead return the ``ServiceLevelIndicator`` + with its mode of computation fully spelled out as a + ``RequestBasedSli``. For ``ServiceLevelIndicator``\ s using + ``RequestBasedSli`` or ``WindowsBasedSli``, return the + ``ServiceLevelIndicator`` as it was provided. """ VIEW_UNSPECIFIED = 0 FULL = 2 diff --git a/google/cloud/monitoring_v3/types/uptime.py b/google/cloud/monitoring_v3/types/uptime.py index 505ddd43..088dee08 100644 --- a/google/cloud/monitoring_v3/types/uptime.py +++ b/google/cloud/monitoring_v3/types/uptime.py @@ -34,7 +34,26 @@ class UptimeCheckRegion(proto.Enum): - r"""The regions from which an Uptime check can be run.""" + r"""The regions from which an Uptime check can be run. + + Values: + REGION_UNSPECIFIED (0): + Default value if no region is specified. Will + result in Uptime checks running from all + regions. + USA (1): + Allows checks to run from locations within + the United States of America. + EUROPE (2): + Allows checks to run from locations within + the continent of Europe. + SOUTH_AMERICA (3): + Allows checks to run from locations within + the continent of South America. + ASIA_PACIFIC (4): + Allows checks to run from locations within + the Asia Pacific area (ex: Singapore). + """ REGION_UNSPECIFIED = 0 USA = 1 EUROPE = 2 @@ -48,6 +67,15 @@ class GroupResourceType(proto.Enum): ``gce_instance`` and ``aws_ec2_instance`` resource types. The resource types ``gae_app`` and ``uptime_url`` are not valid here because group checks on App Engine modules and URLs are not allowed. + + Values: + RESOURCE_TYPE_UNSPECIFIED (0): + Default value (not valid). + INSTANCE (1): + A group of instances from Google Cloud + Platform (GCP) or Amazon Web Services (AWS). + AWS_ELB_LOAD_BALANCER (2): + A group of Amazon ELB load balancers. """ RESOURCE_TYPE_UNSPECIFIED = 0 INSTANCE = 1 @@ -94,7 +122,29 @@ class InternalChecker(proto.Message): """ class State(proto.Enum): - r"""Operational states for an internal checker.""" + r"""Operational states for an internal checker. + + Values: + UNSPECIFIED (0): + An internal checker should never be in the + unspecified state. + CREATING (1): + The checker is being created, provisioned, and configured. A + checker in this state can be returned by + ``ListInternalCheckers`` or ``GetInternalChecker``, as well + as by examining the `long running + Operation `__ + that created it. + RUNNING (2): + The checker is running and available for use. A checker in + this state can be returned by ``ListInternalCheckers`` or + ``GetInternalChecker`` as well as by examining the `long + running + Operation `__ + that created it. If a checker is being torn down, it is + neither visible nor usable, so there is no "deleting" or + "down" state. + """ UNSPECIFIED = 0 CREATING = 1 RUNNING = 2 @@ -322,7 +372,16 @@ class HttpCheck(proto.Message): """ class RequestMethod(proto.Enum): - r"""The HTTP request method options.""" + r"""The HTTP request method options. + + Values: + METHOD_UNSPECIFIED (0): + No request method specified. + GET (1): + GET request. + POST (2): + POST request. + """ METHOD_UNSPECIFIED = 0 GET = 1 POST = 2 @@ -330,6 +389,14 @@ class RequestMethod(proto.Enum): class ContentType(proto.Enum): r"""Header options corresponding to the content type of a HTTP request body. + + Values: + TYPE_UNSPECIFIED (0): + No content type specified. + URL_ENCODED (1): + ``body`` is in URL-encoded form. Equivalent to setting the + ``Content-Type`` to ``application/x-www-form-urlencoded`` in + the HTTP request. """ TYPE_UNSPECIFIED = 0 URL_ENCODED = 1 @@ -437,7 +504,32 @@ class ContentMatcher(proto.Message): """ class ContentMatcherOption(proto.Enum): - r"""Options to perform content matching.""" + r"""Options to perform content matching. + + Values: + CONTENT_MATCHER_OPTION_UNSPECIFIED (0): + No content matcher type specified (maintained for backward + compatibility, but deprecated for future use). Treated as + ``CONTAINS_STRING``. + CONTAINS_STRING (1): + Selects substring matching. The match succeeds if the output + contains the ``content`` string. This is the default value + for checks without a ``matcher`` option, or where the value + of ``matcher`` is ``CONTENT_MATCHER_OPTION_UNSPECIFIED``. + NOT_CONTAINS_STRING (2): + Selects negation of substring matching. The match succeeds + if the output does *NOT* contain the ``content`` string. + MATCHES_REGEX (3): + Selects regular-expression matching. The match succeeds of + the output matches the regular expression specified in the + ``content`` string. Regex matching is only supported for + HTTP/HTTPS checks. + NOT_MATCHES_REGEX (4): + Selects negation of regular-expression matching. The match + succeeds if the output does *NOT* match the regular + expression specified in the ``content`` string. Regex + matching is only supported for HTTP/HTTPS checks. + """ CONTENT_MATCHER_OPTION_UNSPECIFIED = 0 CONTAINS_STRING = 1 NOT_CONTAINS_STRING = 2 diff --git a/samples/generated_samples/snippet_metadata_google.monitoring.v3.json b/samples/generated_samples/snippet_metadata_google.monitoring.v3.json index 49db869c..04888a5f 100644 --- a/samples/generated_samples/snippet_metadata_google.monitoring.v3.json +++ b/samples/generated_samples/snippet_metadata_google.monitoring.v3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-monitoring", - "version": "2.14.0" + "version": "0.1.0" }, "snippets": [ { From c581800f112d52e378a9680c62ed9ca22f49476d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:49:10 -0500 Subject: [PATCH 2/2] chore(main): release 2.14.1 (#525) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ google/cloud/monitoring/gapic_version.py | 2 +- google/cloud/monitoring_v3/gapic_version.py | 2 +- .../snippet_metadata_google.monitoring.v3.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c80b1d28..06613a33 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,4 +1,4 @@ { - ".": "2.14.0" + ".": "2.14.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c8c35d5..8c5cbcff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://pypi.org/project/google-cloud-monitoring/#history +## [2.14.1](https://github.com/googleapis/python-monitoring/compare/v2.14.0...v2.14.1) (2023-01-20) + + +### Bug Fixes + +* Add context manager return types ([4643933](https://github.com/googleapis/python-monitoring/commit/46439333f73e71267d28fc395850f6aa66bca288)) + + +### Documentation + +* Add documentation for enums ([4643933](https://github.com/googleapis/python-monitoring/commit/46439333f73e71267d28fc395850f6aa66bca288)) + ## [2.14.0](https://github.com/googleapis/python-monitoring/compare/v2.13.0...v2.14.0) (2023-01-10) diff --git a/google/cloud/monitoring/gapic_version.py b/google/cloud/monitoring/gapic_version.py index 8be00290..ef7c5006 100644 --- a/google/cloud/monitoring/gapic_version.py +++ b/google/cloud/monitoring/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.14.0" # {x-release-please-version} +__version__ = "2.14.1" # {x-release-please-version} diff --git a/google/cloud/monitoring_v3/gapic_version.py b/google/cloud/monitoring_v3/gapic_version.py index 8be00290..ef7c5006 100644 --- a/google/cloud/monitoring_v3/gapic_version.py +++ b/google/cloud/monitoring_v3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.14.0" # {x-release-please-version} +__version__ = "2.14.1" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.monitoring.v3.json b/samples/generated_samples/snippet_metadata_google.monitoring.v3.json index 04888a5f..dd8bae83 100644 --- a/samples/generated_samples/snippet_metadata_google.monitoring.v3.json +++ b/samples/generated_samples/snippet_metadata_google.monitoring.v3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-monitoring", - "version": "0.1.0" + "version": "2.14.1" }, "snippets": [ {