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

from . import converter_pb2 as pulumi_dot_converter__pb2


class ConverterStub(object):
    """Converter is a service for converting between other ecosystems and Pulumi.
    This is currently unstable and experimental.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ConvertState = channel.unary_unary(
                '/pulumirpc.Converter/ConvertState',
                request_serializer=pulumi_dot_converter__pb2.ConvertStateRequest.SerializeToString,
                response_deserializer=pulumi_dot_converter__pb2.ConvertStateResponse.FromString,
                )
        self.ConvertProgram = channel.unary_unary(
                '/pulumirpc.Converter/ConvertProgram',
                request_serializer=pulumi_dot_converter__pb2.ConvertProgramRequest.SerializeToString,
                response_deserializer=pulumi_dot_converter__pb2.ConvertProgramResponse.FromString,
                )


class ConverterServicer(object):
    """Converter is a service for converting between other ecosystems and Pulumi.
    This is currently unstable and experimental.
    """

    def ConvertState(self, request, context):
        """ConvertState converts state from the target ecosystem into a form that can be imported into Pulumi.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ConvertProgram(self, request, context):
        """ConvertProgram converts a program from the target ecosystem into a form that can be used with Pulumi.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ConverterServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ConvertState': grpc.unary_unary_rpc_method_handler(
                    servicer.ConvertState,
                    request_deserializer=pulumi_dot_converter__pb2.ConvertStateRequest.FromString,
                    response_serializer=pulumi_dot_converter__pb2.ConvertStateResponse.SerializeToString,
            ),
            'ConvertProgram': grpc.unary_unary_rpc_method_handler(
                    servicer.ConvertProgram,
                    request_deserializer=pulumi_dot_converter__pb2.ConvertProgramRequest.FromString,
                    response_serializer=pulumi_dot_converter__pb2.ConvertProgramResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'pulumirpc.Converter', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Converter(object):
    """Converter is a service for converting between other ecosystems and Pulumi.
    This is currently unstable and experimental.
    """

    @staticmethod
    def ConvertState(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.Converter/ConvertState',
            pulumi_dot_converter__pb2.ConvertStateRequest.SerializeToString,
            pulumi_dot_converter__pb2.ConvertStateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ConvertProgram(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.Converter/ConvertProgram',
            pulumi_dot_converter__pb2.ConvertProgramRequest.SerializeToString,
            pulumi_dot_converter__pb2.ConvertProgramResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
