Skip to content

Commit

Permalink
blacken all gen'd libs (#6792)
Browse files Browse the repository at this point in the history
* blacken all gen'd libs
  • Loading branch information
crwilcox authored Nov 30, 2018
1 parent 9563fe3 commit e9acd01
Show file tree
Hide file tree
Showing 28 changed files with 8,421 additions and 5,301 deletions.
1,424 changes: 926 additions & 498 deletions packages/google-cloud-monitoring/google/cloud/monitoring_v3/proto/alert_pb2.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.cloud.monitoring_v3.proto import alert_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2
from google.cloud.monitoring_v3.proto import alert_service_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2
from google.cloud.monitoring_v3.proto import (
alert_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2,
)
from google.cloud.monitoring_v3.proto import (
alert_service_pb2 as google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class AlertPolicyServiceStub(object):
"""The AlertPolicyService API is used to manage (list, create, delete,
"""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
system is considered to be "unhealthy" and the ways to notify
Expand All @@ -18,41 +22,41 @@ class AlertPolicyServiceStub(object):
[Cloud Console](https://console.cloud.google.com/).
"""

def __init__(self, channel):
"""Constructor.
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.ListAlertPolicies = channel.unary_unary(
'/google.monitoring.v3.AlertPolicyService/ListAlertPolicies',
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesResponse.FromString,
self.ListAlertPolicies = channel.unary_unary(
"/google.monitoring.v3.AlertPolicyService/ListAlertPolicies",
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesResponse.FromString,
)
self.GetAlertPolicy = channel.unary_unary(
'/google.monitoring.v3.AlertPolicyService/GetAlertPolicy',
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.GetAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.FromString,
self.GetAlertPolicy = channel.unary_unary(
"/google.monitoring.v3.AlertPolicyService/GetAlertPolicy",
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.GetAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.FromString,
)
self.CreateAlertPolicy = channel.unary_unary(
'/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy',
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.CreateAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.FromString,
self.CreateAlertPolicy = channel.unary_unary(
"/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy",
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.CreateAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.FromString,
)
self.DeleteAlertPolicy = channel.unary_unary(
'/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy',
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.DeleteAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
self.DeleteAlertPolicy = channel.unary_unary(
"/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy",
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.DeleteAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.UpdateAlertPolicy = channel.unary_unary(
'/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy',
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.UpdateAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.FromString,
self.UpdateAlertPolicy = channel.unary_unary(
"/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy",
request_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.UpdateAlertPolicyRequest.SerializeToString,
response_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.FromString,
)


class AlertPolicyServiceServicer(object):
"""The AlertPolicyService API is used to manage (list, create, delete,
"""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
system is considered to be "unhealthy" and the ways to notify
Expand All @@ -63,73 +67,74 @@ class AlertPolicyServiceServicer(object):
[Cloud Console](https://console.cloud.google.com/).
"""

def ListAlertPolicies(self, request, context):
"""Lists the existing alerting policies for the project.
def ListAlertPolicies(self, request, context):
"""Lists the existing alerting policies for the project.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def GetAlertPolicy(self, request, context):
"""Gets a single alerting policy.
def GetAlertPolicy(self, request, context):
"""Gets a single alerting policy.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def CreateAlertPolicy(self, request, context):
"""Creates a new alerting policy.
def CreateAlertPolicy(self, request, context):
"""Creates a new alerting policy.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def DeleteAlertPolicy(self, request, context):
"""Deletes an alerting policy.
def DeleteAlertPolicy(self, request, context):
"""Deletes an alerting policy.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def UpdateAlertPolicy(self, request, context):
"""Updates an alerting policy. You can either replace the entire policy with
def UpdateAlertPolicy(self, request, context):
"""Updates an alerting policy. You can either replace the entire policy with
a new one or replace only certain fields in the current alerting policy by
specifying the fields to be updated via `updateMask`. Returns the
updated alerting policy.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")


def add_AlertPolicyServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'ListAlertPolicies': grpc.unary_unary_rpc_method_handler(
servicer.ListAlertPolicies,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesResponse.SerializeToString,
),
'GetAlertPolicy': grpc.unary_unary_rpc_method_handler(
servicer.GetAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.GetAlertPolicyRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
),
'CreateAlertPolicy': grpc.unary_unary_rpc_method_handler(
servicer.CreateAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.CreateAlertPolicyRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
),
'DeleteAlertPolicy': grpc.unary_unary_rpc_method_handler(
servicer.DeleteAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.DeleteAlertPolicyRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'UpdateAlertPolicy': grpc.unary_unary_rpc_method_handler(
servicer.UpdateAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.UpdateAlertPolicyRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'google.monitoring.v3.AlertPolicyService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
rpc_method_handlers = {
"ListAlertPolicies": grpc.unary_unary_rpc_method_handler(
servicer.ListAlertPolicies,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.ListAlertPoliciesResponse.SerializeToString,
),
"GetAlertPolicy": grpc.unary_unary_rpc_method_handler(
servicer.GetAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.GetAlertPolicyRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
),
"CreateAlertPolicy": grpc.unary_unary_rpc_method_handler(
servicer.CreateAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.CreateAlertPolicyRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
),
"DeleteAlertPolicy": grpc.unary_unary_rpc_method_handler(
servicer.DeleteAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.DeleteAlertPolicyRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
"UpdateAlertPolicy": grpc.unary_unary_rpc_method_handler(
servicer.UpdateAlertPolicy,
request_deserializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__service__pb2.UpdateAlertPolicyRequest.FromString,
response_serializer=google_dot_cloud_dot_monitoring__v3_dot_proto_dot_alert__pb2.AlertPolicy.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
"google.monitoring.v3.AlertPolicyService", rpc_method_handlers
)
server.add_generic_rpc_handlers((generic_handler,))
Loading

0 comments on commit e9acd01

Please sign in to comment.