# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import analyzer_pb2 as pulumi_dot_analyzer__pb2
from . import plugin_pb2 as pulumi_dot_plugin__pb2


class AnalyzerStub(object):
    """Analyzer provides a pluggable interface for checking resource definitions against some number of
    resource policies. It is intentionally open-ended, allowing for implementations that check
    everything from raw resource definitions to entire projects/stacks/snapshots for arbitrary
    issues -- style, policy, correctness, security, and so on.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.Analyze = channel.unary_unary(
                '/pulumirpc.Analyzer/Analyze',
                request_serializer=pulumi_dot_analyzer__pb2.AnalyzeRequest.SerializeToString,
                response_deserializer=pulumi_dot_analyzer__pb2.AnalyzeResponse.FromString,
                )
        self.AnalyzeStack = channel.unary_unary(
                '/pulumirpc.Analyzer/AnalyzeStack',
                request_serializer=pulumi_dot_analyzer__pb2.AnalyzeStackRequest.SerializeToString,
                response_deserializer=pulumi_dot_analyzer__pb2.AnalyzeResponse.FromString,
                )
        self.Remediate = channel.unary_unary(
                '/pulumirpc.Analyzer/Remediate',
                request_serializer=pulumi_dot_analyzer__pb2.AnalyzeRequest.SerializeToString,
                response_deserializer=pulumi_dot_analyzer__pb2.RemediateResponse.FromString,
                )
        self.GetAnalyzerInfo = channel.unary_unary(
                '/pulumirpc.Analyzer/GetAnalyzerInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pulumi_dot_analyzer__pb2.AnalyzerInfo.FromString,
                )
        self.GetPluginInfo = channel.unary_unary(
                '/pulumirpc.Analyzer/GetPluginInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pulumi_dot_plugin__pb2.PluginInfo.FromString,
                )
        self.Configure = channel.unary_unary(
                '/pulumirpc.Analyzer/Configure',
                request_serializer=pulumi_dot_analyzer__pb2.ConfigureAnalyzerRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class AnalyzerServicer(object):
    """Analyzer provides a pluggable interface for checking resource definitions against some number of
    resource policies. It is intentionally open-ended, allowing for implementations that check
    everything from raw resource definitions to entire projects/stacks/snapshots for arbitrary
    issues -- style, policy, correctness, security, and so on.
    """

    def Analyze(self, request, context):
        """Analyze analyzes a single resource object, and returns any errors that it finds.
        Called with the "inputs" to the resource, before it is updated.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AnalyzeStack(self, request, context):
        """AnalyzeStack analyzes all resources within a stack, at the end of a successful
        preview or update. The provided resources are the "outputs", after any mutations
        have taken place.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Remediate(self, request, context):
        """Remediate optionally transforms a single resource object. This effectively rewrites
        a single resource object's properties instead of using what was generated by the program.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAnalyzerInfo(self, request, context):
        """GetAnalyzerInfo returns metadata about the analyzer (e.g., list of policies contained).
        """
        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 Configure(self, request, context):
        """Configure configures the analyzer, passing configuration properties for each policy.
        """
        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=pulumi_dot_analyzer__pb2.AnalyzeRequest.FromString,
                    response_serializer=pulumi_dot_analyzer__pb2.AnalyzeResponse.SerializeToString,
            ),
            'AnalyzeStack': grpc.unary_unary_rpc_method_handler(
                    servicer.AnalyzeStack,
                    request_deserializer=pulumi_dot_analyzer__pb2.AnalyzeStackRequest.FromString,
                    response_serializer=pulumi_dot_analyzer__pb2.AnalyzeResponse.SerializeToString,
            ),
            'Remediate': grpc.unary_unary_rpc_method_handler(
                    servicer.Remediate,
                    request_deserializer=pulumi_dot_analyzer__pb2.AnalyzeRequest.FromString,
                    response_serializer=pulumi_dot_analyzer__pb2.RemediateResponse.SerializeToString,
            ),
            'GetAnalyzerInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAnalyzerInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pulumi_dot_analyzer__pb2.AnalyzerInfo.SerializeToString,
            ),
            'GetPluginInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPluginInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pulumi_dot_plugin__pb2.PluginInfo.SerializeToString,
            ),
            'Configure': grpc.unary_unary_rpc_method_handler(
                    servicer.Configure,
                    request_deserializer=pulumi_dot_analyzer__pb2.ConfigureAnalyzerRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'pulumirpc.Analyzer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Analyzer(object):
    """Analyzer provides a pluggable interface for checking resource definitions against some number of
    resource policies. It is intentionally open-ended, allowing for implementations that check
    everything from raw resource definitions to entire projects/stacks/snapshots for arbitrary
    issues -- style, policy, correctness, security, and so on.
    """

    @staticmethod
    def Analyze(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.Analyzer/Analyze',
            pulumi_dot_analyzer__pb2.AnalyzeRequest.SerializeToString,
            pulumi_dot_analyzer__pb2.AnalyzeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AnalyzeStack(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.Analyzer/AnalyzeStack',
            pulumi_dot_analyzer__pb2.AnalyzeStackRequest.SerializeToString,
            pulumi_dot_analyzer__pb2.AnalyzeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Remediate(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.Analyzer/Remediate',
            pulumi_dot_analyzer__pb2.AnalyzeRequest.SerializeToString,
            pulumi_dot_analyzer__pb2.RemediateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAnalyzerInfo(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.Analyzer/GetAnalyzerInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pulumi_dot_analyzer__pb2.AnalyzerInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPluginInfo(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.Analyzer/GetPluginInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pulumi_dot_plugin__pb2.PluginInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Configure(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.Analyzer/Configure',
            pulumi_dot_analyzer__pb2.ConfigureAnalyzerRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
