# 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 scalekit.v1.auth import totp_pb2 as scalekit_dot_v1_dot_auth_dot_totp__pb2


class TOTPServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.RegisterTOTP = channel.unary_unary(
                '/scalekit.v1.auth.totp.TOTPService/RegisterTOTP',
                request_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.TOTPRegistrationRequest.SerializeToString,
                response_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.TOTPRegistrationResponse.FromString,
                )
        self.EnableTOTP = channel.unary_unary(
                '/scalekit.v1.auth.totp.TOTPService/EnableTOTP',
                request_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.EnableRegistrationTOTPRequest.SerializeToString,
                response_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.EnableRegistrationTOTPResponse.FromString,
                )
        self.VerifyUserCode = channel.unary_unary(
                '/scalekit.v1.auth.totp.TOTPService/VerifyUserCode',
                request_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyUserCodeRequest.SerializeToString,
                response_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyCodeResponse.FromString,
                )
        self.VerifyRegistrationCode = channel.unary_unary(
                '/scalekit.v1.auth.totp.TOTPService/VerifyRegistrationCode',
                request_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyRegistrationCodeRequest.SerializeToString,
                response_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyCodeResponse.FromString,
                )
        self.DisableTOTP = channel.unary_unary(
                '/scalekit.v1.auth.totp.TOTPService/DisableTOTP',
                request_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.DisableRegistrationTOTPRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class TOTPServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def RegisterTOTP(self, request, context):
        """Enable TOTP for a user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EnableTOTP(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyUserCode(self, request, context):
        """Verify TOTP code for a user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyRegistrationCode(self, request, context):
        """Verify TOTP code for a registration
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DisableTOTP(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TOTPServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RegisterTOTP': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterTOTP,
                    request_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.TOTPRegistrationRequest.FromString,
                    response_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.TOTPRegistrationResponse.SerializeToString,
            ),
            'EnableTOTP': grpc.unary_unary_rpc_method_handler(
                    servicer.EnableTOTP,
                    request_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.EnableRegistrationTOTPRequest.FromString,
                    response_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.EnableRegistrationTOTPResponse.SerializeToString,
            ),
            'VerifyUserCode': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyUserCode,
                    request_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyUserCodeRequest.FromString,
                    response_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyCodeResponse.SerializeToString,
            ),
            'VerifyRegistrationCode': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyRegistrationCode,
                    request_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyRegistrationCodeRequest.FromString,
                    response_serializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyCodeResponse.SerializeToString,
            ),
            'DisableTOTP': grpc.unary_unary_rpc_method_handler(
                    servicer.DisableTOTP,
                    request_deserializer=scalekit_dot_v1_dot_auth_dot_totp__pb2.DisableRegistrationTOTPRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'scalekit.v1.auth.totp.TOTPService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TOTPService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def RegisterTOTP(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, '/scalekit.v1.auth.totp.TOTPService/RegisterTOTP',
            scalekit_dot_v1_dot_auth_dot_totp__pb2.TOTPRegistrationRequest.SerializeToString,
            scalekit_dot_v1_dot_auth_dot_totp__pb2.TOTPRegistrationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EnableTOTP(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, '/scalekit.v1.auth.totp.TOTPService/EnableTOTP',
            scalekit_dot_v1_dot_auth_dot_totp__pb2.EnableRegistrationTOTPRequest.SerializeToString,
            scalekit_dot_v1_dot_auth_dot_totp__pb2.EnableRegistrationTOTPResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def VerifyUserCode(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, '/scalekit.v1.auth.totp.TOTPService/VerifyUserCode',
            scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyUserCodeRequest.SerializeToString,
            scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyCodeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def VerifyRegistrationCode(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, '/scalekit.v1.auth.totp.TOTPService/VerifyRegistrationCode',
            scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyRegistrationCodeRequest.SerializeToString,
            scalekit_dot_v1_dot_auth_dot_totp__pb2.VerifyCodeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DisableTOTP(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, '/scalekit.v1.auth.totp.TOTPService/DisableTOTP',
            scalekit_dot_v1_dot_auth_dot_totp__pb2.DisableRegistrationTOTPRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
