Skip to content

Commit

Permalink
Copy lintified proto files, update docstrings (via synth). (#7451)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and tseaver committed Feb 26, 2019
1 parent 62a38ea commit e8efb16
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,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 @@ -324,7 +325,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 @@ -392,7 +394,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 @@ -495,7 +498,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 @@ -697,7 +701,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
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,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 @@ -123,7 +124,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 @@ -136,7 +138,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 @@ -149,7 +152,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 @@ -191,7 +195,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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ option java_outer_classname = "AlertProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// A description of the conditions under which some aspect of your system is
// considered to be "unhealthy" and the ways to notify people or services about
// this state. For an overview of alert policies, see
Expand Down Expand Up @@ -93,8 +92,10 @@ message AlertPolicy {
// are applied in the order specified.
//
// This field is similar to the one in the
// [`MetricService.ListTimeSeries` request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
// It is advisable to use the `ListTimeSeries` method when debugging this field.
// [`MetricService.ListTimeSeries`
// request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
// is advisable to use the `ListTimeSeries` method when debugging this
// field.
repeated Aggregation aggregations = 8;

// A [filter](/monitoring/api/v3/filters) that identifies a time
Expand Down Expand Up @@ -188,8 +189,10 @@ message AlertPolicy {
// are applied in the order specified.
//
// This field is similar to the
// one in the [`MetricService.ListTimeSeries` request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
// It is advisable to use the `ListTimeSeries` method when debugging this field.
// one in the [`MetricService.ListTimeSeries`
// request](/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It
// is advisable to use the `ListTimeSeries` method when debugging this
// field.
repeated Aggregation aggregations = 5;

// The amount of time that a time series must fail to report new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ option java_outer_classname = "AlertServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// The AlertPolicyService API is used to manage (list, create, delete,
// edit) alert policies in Stackdriver Monitoring. An alerting policy is
// a description of the conditions under which some aspect of your
Expand All @@ -41,7 +40,8 @@ option php_namespace = "Google\\Cloud\\Monitoring\\V3";
// [Cloud Console](https://console.cloud.google.com/).
service AlertPolicyService {
// Lists the existing alerting policies for the project.
rpc ListAlertPolicies(ListAlertPoliciesRequest) returns (ListAlertPoliciesResponse) {
rpc ListAlertPolicies(ListAlertPoliciesRequest)
returns (ListAlertPoliciesResponse) {
option (google.api.http) = {
get: "/v3/{name=projects/*}/alertPolicies"
};
Expand All @@ -63,7 +63,8 @@ service AlertPolicyService {
}

// Deletes an alerting policy.
rpc DeleteAlertPolicy(DeleteAlertPolicyRequest) returns (google.protobuf.Empty) {
rpc DeleteAlertPolicy(DeleteAlertPolicyRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=projects/*/alertPolicies/*}"
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ option java_outer_classname = "CommonProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// A single strongly-typed value.
message TypedValue {
// The typed value field.
Expand Down Expand Up @@ -393,8 +392,9 @@ enum ComparisonType {
}

// The tier of service for a Workspace. Please see the
// [service tiers documentation](https://cloud.google.com/monitoring/workspaces/tiers)
// for more details.
// [service tiers
// documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more
// details.
enum ServiceTier {
option deprecated = true;

Expand All @@ -405,12 +405,14 @@ enum ServiceTier {
// 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](https://cloud.google.com/monitoring/workspaces/tiers).
// see [the service tiers
// documentation](https://cloud.google.com/monitoring/workspaces/tiers).
SERVICE_TIER_BASIC = 1;

// 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](https://cloud.google.com/monitoring/workspaces/tiers).
// more details, see [the service tiers
// documentation](https://cloud.google.com/monitoring/workspaces/tiers).
SERVICE_TIER_PREMIUM = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import "google/api/annotations.proto";

option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";


// A set of (label, value) pairs which were dropped during aggregation, attached
// to google.api.Distribution.Exemplars in google.api.Distribution values during
// aggregation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ option java_outer_classname = "GroupProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// The description of a dynamic collection of monitored resources. Each group
// has a filter that is matched against monitored resources and their associated
// metadata. If a group's filter matches an available monitored resource, then
Expand Down Expand Up @@ -67,7 +66,8 @@ message Group {
// For groups with no parent, `parentName` is the empty string, `""`.
string parent_name = 3;

// The filter used to determine which monitored resources belong to this group.
// The filter used to determine which monitored resources belong to this
// group.
string filter = 5;

// If true, the members of this group are considered to be a cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ option java_outer_classname = "GroupServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// The Group API lets you inspect and manage your
// [groups](#google.monitoring.v3.Group).
//
Expand Down Expand Up @@ -83,7 +82,8 @@ service GroupService {
}

// Lists the monitored resources that are members of a group.
rpc ListGroupMembers(ListGroupMembersRequest) returns (ListGroupMembersResponse) {
rpc ListGroupMembers(ListGroupMembersRequest)
returns (ListGroupMembersResponse) {
option (google.api.http) = {
get: "/v3/{name=projects/*/groups/*}/members"
};
Expand All @@ -96,9 +96,9 @@ message ListGroupsRequest {
// `"projects/{project_id_or_number}"`.
string name = 7;

// An optional filter consisting of a single group name. The filters limit the
// groups returned based on their parent-child relationship with the specified
// group. If no filter is specified, all groups are returned.
// An optional filter consisting of a single group name. The filters limit
// the groups returned based on their parent-child relationship with the
// specified group. If no filter is specified, all groups are returned.
oneof filter {
// A group name: `"projects/{project_id_or_number}/groups/{group_id}"`.
// Returns groups whose `parentName` field contains the group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ option java_outer_classname = "MetricProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// A single data point in a time series.
message Point {
// The time interval to which the data point applies. For `GAUGE` metrics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,40 @@ option java_outer_classname = "MetricServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";


// Manages metric descriptors, monitored resource descriptors, and
// time series data.
service MetricService {
// Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) {
// Lists monitored resource descriptors that match a filter. This method does
// not require a Stackdriver account.
rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest)
returns (ListMonitoredResourceDescriptorsResponse) {
option (google.api.http) = {
get: "/v3/{name=projects/*}/monitoredResourceDescriptors"
};
}

// Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest) returns (google.api.MonitoredResourceDescriptor) {
// Gets a single monitored resource descriptor. This method does not require a
// Stackdriver account.
rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest)
returns (google.api.MonitoredResourceDescriptor) {
option (google.api.http) = {
get: "/v3/{name=projects/*/monitoredResourceDescriptors/*}"
};
}

// Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
rpc ListMetricDescriptors(ListMetricDescriptorsRequest) returns (ListMetricDescriptorsResponse) {
// Lists metric descriptors that match a filter. This method does not require
// a Stackdriver account.
rpc ListMetricDescriptors(ListMetricDescriptorsRequest)
returns (ListMetricDescriptorsResponse) {
option (google.api.http) = {
get: "/v3/{name=projects/*}/metricDescriptors"
};
}

// Gets a single metric descriptor. This method does not require a Stackdriver account.
rpc GetMetricDescriptor(GetMetricDescriptorRequest) returns (google.api.MetricDescriptor) {
// Gets a single metric descriptor. This method does not require a Stackdriver
// account.
rpc GetMetricDescriptor(GetMetricDescriptorRequest)
returns (google.api.MetricDescriptor) {
option (google.api.http) = {
get: "/v3/{name=projects/*/metricDescriptors/**}"
};
Expand All @@ -68,7 +75,8 @@ service MetricService {
// Creates a new metric descriptor.
// User-created metric descriptors define
// [custom metrics](/monitoring/custom-metrics).
rpc CreateMetricDescriptor(CreateMetricDescriptorRequest) returns (google.api.MetricDescriptor) {
rpc CreateMetricDescriptor(CreateMetricDescriptorRequest)
returns (google.api.MetricDescriptor) {
option (google.api.http) = {
post: "/v3/{name=projects/*}/metricDescriptors"
body: "metric_descriptor"
Expand All @@ -77,13 +85,15 @@ service MetricService {

// Deletes a metric descriptor. Only user-created
// [custom metrics](/monitoring/custom-metrics) can be deleted.
rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest) returns (google.protobuf.Empty) {
rpc DeleteMetricDescriptor(DeleteMetricDescriptorRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=projects/*/metricDescriptors/**}"
};
}

// 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.
rpc ListTimeSeries(ListTimeSeriesRequest) returns (ListTimeSeriesResponse) {
option (google.api.http) = {
get: "/v3/{name=projects/*}/timeSeries"
Expand All @@ -94,7 +104,8 @@ service MetricService {
// The response is empty if all time series in the request were written.
// If any time series could not be written, a corresponding failure message is
// included in the error response.
rpc CreateTimeSeries(CreateTimeSeriesRequest) returns (google.protobuf.Empty) {
rpc CreateTimeSeries(CreateTimeSeriesRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v3/{name=projects/*}/timeSeries"
body: "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,32 @@ class MetricServiceServicer(object):
"""

def ListMonitoredResourceDescriptors(self, request, context):
"""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.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def GetMonitoredResourceDescriptor(self, request, context):
"""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.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def ListMetricDescriptors(self, request, context):
"""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.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def GetMetricDescriptor(self, request, context):
"""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.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
Expand All @@ -115,7 +119,8 @@ def DeleteMetricDescriptor(self, request, context):
raise NotImplementedError("Method not implemented!")

def ListTimeSeries(self, request, context):
"""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.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
Expand Down
Loading

0 comments on commit e8efb16

Please sign in to comment.