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

from mgmt.v1alpha1 import transformer_pb2 as mgmt_dot_v1alpha1_dot_transformer__pb2


class TransformersServiceStub(object):
    """Service that manages system and user defined transformers
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetSystemTransformers = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/GetSystemTransformers',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformersRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformersResponse.FromString,
                _registered_method=True)
        self.GetSystemTransformerBySource = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/GetSystemTransformerBySource',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformerBySourceRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformerBySourceResponse.FromString,
                _registered_method=True)
        self.GetUserDefinedTransformers = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/GetUserDefinedTransformers',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformersRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformersResponse.FromString,
                _registered_method=True)
        self.GetUserDefinedTransformerById = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/GetUserDefinedTransformerById',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformerByIdRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformerByIdResponse.FromString,
                _registered_method=True)
        self.CreateUserDefinedTransformer = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/CreateUserDefinedTransformer',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.CreateUserDefinedTransformerRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.CreateUserDefinedTransformerResponse.FromString,
                _registered_method=True)
        self.DeleteUserDefinedTransformer = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/DeleteUserDefinedTransformer',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.DeleteUserDefinedTransformerRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.DeleteUserDefinedTransformerResponse.FromString,
                _registered_method=True)
        self.UpdateUserDefinedTransformer = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/UpdateUserDefinedTransformer',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.UpdateUserDefinedTransformerRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.UpdateUserDefinedTransformerResponse.FromString,
                _registered_method=True)
        self.IsTransformerNameAvailable = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/IsTransformerNameAvailable',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.IsTransformerNameAvailableRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.IsTransformerNameAvailableResponse.FromString,
                _registered_method=True)
        self.ValidateUserJavascriptCode = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/ValidateUserJavascriptCode',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserJavascriptCodeRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserJavascriptCodeResponse.FromString,
                _registered_method=True)
        self.ValidateUserRegexCode = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/ValidateUserRegexCode',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserRegexCodeRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserRegexCodeResponse.FromString,
                _registered_method=True)
        self.GetTransformPiiEntities = channel.unary_unary(
                '/mgmt.v1alpha1.TransformersService/GetTransformPiiEntities',
                request_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetTransformPiiEntitiesRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetTransformPiiEntitiesResponse.FromString,
                _registered_method=True)


class TransformersServiceServicer(object):
    """Service that manages system and user defined transformers
    """

    def GetSystemTransformers(self, request, context):
        """Get a list of all system transformers
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSystemTransformerBySource(self, request, context):
        """Get a system transformer by its source
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserDefinedTransformers(self, request, context):
        """Get a list of all user defined transformers
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserDefinedTransformerById(self, request, context):
        """Get a user defined transformer by its id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateUserDefinedTransformer(self, request, context):
        """Create a user defined transformer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteUserDefinedTransformer(self, request, context):
        """Delete a user defined transformer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateUserDefinedTransformer(self, request, context):
        """Update a user defined transformer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IsTransformerNameAvailable(self, request, context):
        """Check if a transformer name is available in your account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ValidateUserJavascriptCode(self, request, context):
        """Validate user provided javascript code before saving it to a user defined transformer or within a job mapping
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ValidateUserRegexCode(self, request, context):
        """Validate user provided regex code before saving it to a user defined transformer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTransformPiiEntities(self, request, context):
        """Retrieve a list of available Pii entities for use with the TransformPiiText transformer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TransformersServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetSystemTransformers': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSystemTransformers,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformersRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformersResponse.SerializeToString,
            ),
            'GetSystemTransformerBySource': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSystemTransformerBySource,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformerBySourceRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformerBySourceResponse.SerializeToString,
            ),
            'GetUserDefinedTransformers': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserDefinedTransformers,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformersRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformersResponse.SerializeToString,
            ),
            'GetUserDefinedTransformerById': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserDefinedTransformerById,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformerByIdRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformerByIdResponse.SerializeToString,
            ),
            'CreateUserDefinedTransformer': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateUserDefinedTransformer,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.CreateUserDefinedTransformerRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.CreateUserDefinedTransformerResponse.SerializeToString,
            ),
            'DeleteUserDefinedTransformer': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUserDefinedTransformer,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.DeleteUserDefinedTransformerRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.DeleteUserDefinedTransformerResponse.SerializeToString,
            ),
            'UpdateUserDefinedTransformer': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateUserDefinedTransformer,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.UpdateUserDefinedTransformerRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.UpdateUserDefinedTransformerResponse.SerializeToString,
            ),
            'IsTransformerNameAvailable': grpc.unary_unary_rpc_method_handler(
                    servicer.IsTransformerNameAvailable,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.IsTransformerNameAvailableRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.IsTransformerNameAvailableResponse.SerializeToString,
            ),
            'ValidateUserJavascriptCode': grpc.unary_unary_rpc_method_handler(
                    servicer.ValidateUserJavascriptCode,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserJavascriptCodeRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserJavascriptCodeResponse.SerializeToString,
            ),
            'ValidateUserRegexCode': grpc.unary_unary_rpc_method_handler(
                    servicer.ValidateUserRegexCode,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserRegexCodeRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserRegexCodeResponse.SerializeToString,
            ),
            'GetTransformPiiEntities': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTransformPiiEntities,
                    request_deserializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetTransformPiiEntitiesRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_transformer__pb2.GetTransformPiiEntitiesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mgmt.v1alpha1.TransformersService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mgmt.v1alpha1.TransformersService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class TransformersService(object):
    """Service that manages system and user defined transformers
    """

    @staticmethod
    def GetSystemTransformers(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,
            '/mgmt.v1alpha1.TransformersService/GetSystemTransformers',
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformersRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSystemTransformerBySource(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,
            '/mgmt.v1alpha1.TransformersService/GetSystemTransformerBySource',
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformerBySourceRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetSystemTransformerBySourceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUserDefinedTransformers(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,
            '/mgmt.v1alpha1.TransformersService/GetUserDefinedTransformers',
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformersRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUserDefinedTransformerById(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,
            '/mgmt.v1alpha1.TransformersService/GetUserDefinedTransformerById',
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformerByIdRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetUserDefinedTransformerByIdResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateUserDefinedTransformer(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,
            '/mgmt.v1alpha1.TransformersService/CreateUserDefinedTransformer',
            mgmt_dot_v1alpha1_dot_transformer__pb2.CreateUserDefinedTransformerRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.CreateUserDefinedTransformerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteUserDefinedTransformer(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,
            '/mgmt.v1alpha1.TransformersService/DeleteUserDefinedTransformer',
            mgmt_dot_v1alpha1_dot_transformer__pb2.DeleteUserDefinedTransformerRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.DeleteUserDefinedTransformerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateUserDefinedTransformer(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,
            '/mgmt.v1alpha1.TransformersService/UpdateUserDefinedTransformer',
            mgmt_dot_v1alpha1_dot_transformer__pb2.UpdateUserDefinedTransformerRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.UpdateUserDefinedTransformerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IsTransformerNameAvailable(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,
            '/mgmt.v1alpha1.TransformersService/IsTransformerNameAvailable',
            mgmt_dot_v1alpha1_dot_transformer__pb2.IsTransformerNameAvailableRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.IsTransformerNameAvailableResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ValidateUserJavascriptCode(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,
            '/mgmt.v1alpha1.TransformersService/ValidateUserJavascriptCode',
            mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserJavascriptCodeRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserJavascriptCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ValidateUserRegexCode(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,
            '/mgmt.v1alpha1.TransformersService/ValidateUserRegexCode',
            mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserRegexCodeRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.ValidateUserRegexCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTransformPiiEntities(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,
            '/mgmt.v1alpha1.TransformersService/GetTransformPiiEntities',
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetTransformPiiEntitiesRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_transformer__pb2.GetTransformPiiEntitiesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
