Skip to content

Commit

Permalink
Revert " Allow recursive group deletion, deprecate internal checkers,…
Browse files Browse the repository at this point in the history
… add SSL validation and content match options to uptime check (via synth). (#9218)" (#9234)

This reverts commit ef3cc4a.
  • Loading branch information
busunkim96 authored Sep 17, 2019
1 parent 409a425 commit b4ea85c
Show file tree
Hide file tree
Showing 32 changed files with 450 additions and 747 deletions.
45 changes: 0 additions & 45 deletions monitoring/google/cloud/monitoring_v3/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,28 +397,6 @@ class ConditionCombinerType(enum.IntEnum):
AND_WITH_MATCHING_RESOURCE = 3


class InternalChecker(object):
class State(enum.IntEnum):
"""
Operational states for an internal checker.
Attributes:
UNSPECIFIED (int): An internal checker should never be in the unspecified state.
CREATING (int): 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 longrunning.Operation that created it.
RUNNING (int): 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 longrunning.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


class LabelDescriptor(object):
class ValueType(enum.IntEnum):
"""
Expand Down Expand Up @@ -520,26 +498,3 @@ class VerificationStatus(enum.IntEnum):
VERIFICATION_STATUS_UNSPECIFIED = 0
UNVERIFIED = 1
VERIFIED = 2


class UptimeCheckConfig(object):
class ContentMatcher(object):
class ContentMatcherOption(enum.IntEnum):
"""
Options to perform content matching.
Attributes:
CONTENT_MATCHER_OPTION_UNSPECIFIED (int): No content macher option specified. Treated as CONTAINS\_STRING.
CONTAINS_STRING (int): Allows checking substring matching.
Default value for previous versions without option.
NOT_CONTAINS_STRING (int): Allows checking negation of substring matching (doesn't contain the
substring).
MATCHES_REGEX (int): Allows checking regular expression matching.
NOT_MATCHES_REGEX (int): Allows checking negation of regular expression matching.
"""

CONTENT_MATCHER_OPTION_UNSPECIFIED = 0
CONTAINS_STRING = 1
NOT_CONTAINS_STRING = 2
MATCHES_REGEX = 3
NOT_MATCHES_REGEX = 4
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ def update_group(
def delete_group(
self,
name,
recursive=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
Expand All @@ -619,9 +618,6 @@ def delete_group(
Args:
name (str): The group to delete. The format is
``"projects/{project_id_or_number}/groups/{group_id}"``.
recursive (bool): If this field is true, then the request means to delete a group with all
its descendants. Otherwise, the request means to delete a group only when
it has no descendants. The default value is false.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
Expand Down Expand Up @@ -652,7 +648,7 @@ def delete_group(
client_info=self._client_info,
)

request = group_service_pb2.DeleteGroupRequest(name=name, recursive=recursive)
request = group_service_pb2.DeleteGroupRequest(name=name)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ def list_monitored_resource_descriptors(
metadata=None,
):
"""
Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
Lists monitored resource descriptors that match a filter. This method does
not require a Stackdriver account.
Example:
>>> from google.cloud import monitoring_v3
Expand Down Expand Up @@ -355,7 +356,8 @@ def get_monitored_resource_descriptor(
metadata=None,
):
"""
Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
Gets a single monitored resource descriptor. This method does not require a
Stackdriver account.
Example:
>>> from google.cloud import monitoring_v3
Expand Down Expand Up @@ -436,7 +438,8 @@ def list_metric_descriptors(
metadata=None,
):
"""
Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
Lists metric descriptors that match a filter. This method does not require
a Stackdriver account.
Example:
>>> from google.cloud import monitoring_v3
Expand Down Expand Up @@ -552,7 +555,8 @@ def get_metric_descriptor(
metadata=None,
):
"""
Gets a single metric descriptor. This method does not require a Stackdriver account.
Gets a single metric descriptor. This method does not require a Stackdriver
account.
Example:
>>> from google.cloud import monitoring_v3
Expand Down Expand Up @@ -793,7 +797,8 @@ def list_time_series(
metadata=None,
):
"""
Lists time series that match a filter. This method does not require a Stackdriver account.
Lists time series that match a filter. This method does not require a
Stackdriver account.
Example:
>>> from google.cloud import monitoring_v3
Expand Down Expand Up @@ -838,7 +843,7 @@ def list_time_series(
::
metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
metric.labels.instance_name = "my-instance-name"
metric.label.instance_name = "my-instance-name"
interval (Union[dict, ~google.cloud.monitoring_v3.types.TimeInterval]): The time interval for which results should be returned. Only time series
that contain data points in the specified interval are included
in the response.
Expand Down Expand Up @@ -967,9 +972,6 @@ def create_time_series(
value must fully specify a unique time series by supplying all label
values for the metric and the monitored resource.
The maximum number of ``TimeSeries`` objects per ``Create`` request is
200.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.monitoring_v3.types.TimeSeries`
retry (Optional[google.api_core.retry.Retry]): A retry object used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def channel(self):
def list_monitored_resource_descriptors(self):
"""Return the gRPC stub for :meth:`MetricServiceClient.list_monitored_resource_descriptors`.
Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
Lists monitored resource descriptors that match a filter. This method does
not require a Stackdriver account.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -129,7 +130,8 @@ def list_monitored_resource_descriptors(self):
def get_monitored_resource_descriptor(self):
"""Return the gRPC stub for :meth:`MetricServiceClient.get_monitored_resource_descriptor`.
Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
Gets a single monitored resource descriptor. This method does not require a
Stackdriver account.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -142,7 +144,8 @@ def get_monitored_resource_descriptor(self):
def list_metric_descriptors(self):
"""Return the gRPC stub for :meth:`MetricServiceClient.list_metric_descriptors`.
Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
Lists metric descriptors that match a filter. This method does not require
a Stackdriver account.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -155,7 +158,8 @@ def list_metric_descriptors(self):
def get_metric_descriptor(self):
"""Return the gRPC stub for :meth:`MetricServiceClient.get_metric_descriptor`.
Gets a single metric descriptor. This method does not require a Stackdriver account.
Gets a single metric descriptor. This method does not require a Stackdriver
account.
Returns:
Callable: A callable which accepts the appropriate
Expand Down Expand Up @@ -197,7 +201,8 @@ def delete_metric_descriptor(self):
def list_time_series(self):
"""Return the gRPC stub for :meth:`MetricServiceClient.list_time_series`.
Lists time series that match a filter. This method does not require a Stackdriver account.
Lists time series that match a filter. This method does not require a
Stackdriver account.
Returns:
Callable: A callable which accepts the appropriate
Expand Down
8 changes: 2 additions & 6 deletions monitoring/google/cloud/monitoring_v3/proto/alert.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,11 +17,11 @@ syntax = "proto3";

package google.monitoring.v3;

import "google/api/annotations.proto";
import "google/monitoring/v3/common.proto";
import "google/monitoring/v3/mutation_record.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.Monitoring.V3";
option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
Expand Down Expand Up @@ -325,10 +325,6 @@ message AlertPolicy {
// a field projection has been specified that strips it out.
google.protobuf.BoolValue enabled = 17;

// Read-only description of how the alert policy is invalid. OK if the alert
// policy is valid. If not OK, the alert policy will not generate incidents.
google.rpc.Status validity = 18;

// Identifies the notification channels to which notifications should be sent
// when incidents are opened or closed or when new violations occur on
// an already opened incident. Each element of this array corresponds to
Expand Down
Loading

0 comments on commit b4ea85c

Please sign in to comment.