pulumi/sdk/proto/python/analyzer_pb2_grpc.py

68 lines
2.6 KiB
Python

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import analyzer_pb2 as analyzer__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import plugin_pb2 as plugin__pb2
class AnalyzerStub(object):
"""Analyzer is a pluggable service that checks entire projects/stacks/snapshots, and/or individual resources,
for arbitrary issues. These might be style, policy, correctness, security, or performance related.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Analyze = channel.unary_unary(
'/pulumirpc.Analyzer/Analyze',
request_serializer=analyzer__pb2.AnalyzeRequest.SerializeToString,
response_deserializer=analyzer__pb2.AnalyzeResponse.FromString,
)
self.GetPluginInfo = channel.unary_unary(
'/pulumirpc.Analyzer/GetPluginInfo',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=plugin__pb2.PluginInfo.FromString,
)
class AnalyzerServicer(object):
"""Analyzer is a pluggable service that checks entire projects/stacks/snapshots, and/or individual resources,
for arbitrary issues. These might be style, policy, correctness, security, or performance related.
"""
def Analyze(self, request, context):
"""Analyze analyzes a single resource object, and returns any errors that it finds.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetPluginInfo(self, request, context):
"""GetPluginInfo returns generic information about this plugin, like its version.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_AnalyzerServicer_to_server(servicer, server):
rpc_method_handlers = {
'Analyze': grpc.unary_unary_rpc_method_handler(
servicer.Analyze,
request_deserializer=analyzer__pb2.AnalyzeRequest.FromString,
response_serializer=analyzer__pb2.AnalyzeResponse.SerializeToString,
),
'GetPluginInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetPluginInfo,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=plugin__pb2.PluginInfo.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'pulumirpc.Analyzer', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))