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

import grpc

from dmac.protos.login import (
    login_pb2 as accounts_dot_protos_dot_login_dot_login__pb2,
)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
            "/Logins.Logins/create",
            request_serializer=accounts_dot_protos_dot_login_dot_login__pb2.CreateRequest.SerializeToString,
            response_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.Response.FromString,
        )
        self.send_otp = channel.unary_unary(
            "/Logins.Logins/send_otp",
            request_serializer=accounts_dot_protos_dot_login_dot_login__pb2.SendOTP.SerializeToString,
            response_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.SendOTPResponse.FromString,
        )
        self.verify_otp = channel.unary_unary(
            "/Logins.Logins/verify_otp",
            request_serializer=accounts_dot_protos_dot_login_dot_login__pb2.VerifyOTP.SerializeToString,
            response_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.Response.FromString,
        )
        self.verify_password = channel.unary_unary(
            "/Logins.Logins/verify_password",
            request_serializer=accounts_dot_protos_dot_login_dot_login__pb2.VerifyPassword.SerializeToString,
            response_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.Response.FromString,
        )
        self.refresh_token = channel.unary_unary(
            "/Logins.Logins/refresh_token",
            request_serializer=accounts_dot_protos_dot_login_dot_login__pb2.RefreshJWT.SerializeToString,
            response_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.RefreshJWTResponse.FromString,
        )


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

    def create(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 send_otp(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 verify_otp(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 verify_password(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 refresh_token(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_LoginsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "create": grpc.unary_unary_rpc_method_handler(
            servicer.create,
            request_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.CreateRequest.FromString,
            response_serializer=accounts_dot_protos_dot_login_dot_login__pb2.Response.SerializeToString,
        ),
        "send_otp": grpc.unary_unary_rpc_method_handler(
            servicer.send_otp,
            request_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.SendOTP.FromString,
            response_serializer=accounts_dot_protos_dot_login_dot_login__pb2.SendOTPResponse.SerializeToString,
        ),
        "verify_otp": grpc.unary_unary_rpc_method_handler(
            servicer.verify_otp,
            request_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.VerifyOTP.FromString,
            response_serializer=accounts_dot_protos_dot_login_dot_login__pb2.Response.SerializeToString,
        ),
        "verify_password": grpc.unary_unary_rpc_method_handler(
            servicer.verify_password,
            request_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.VerifyPassword.FromString,
            response_serializer=accounts_dot_protos_dot_login_dot_login__pb2.Response.SerializeToString,
        ),
        "refresh_token": grpc.unary_unary_rpc_method_handler(
            servicer.refresh_token,
            request_deserializer=accounts_dot_protos_dot_login_dot_login__pb2.RefreshJWT.FromString,
            response_serializer=accounts_dot_protos_dot_login_dot_login__pb2.RefreshJWTResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "Logins.Logins", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def create(
        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,
            "/Logins.Logins/create",
            accounts_dot_protos_dot_login_dot_login__pb2.CreateRequest.SerializeToString,
            accounts_dot_protos_dot_login_dot_login__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def send_otp(
        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,
            "/Logins.Logins/send_otp",
            accounts_dot_protos_dot_login_dot_login__pb2.SendOTP.SerializeToString,
            accounts_dot_protos_dot_login_dot_login__pb2.SendOTPResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def verify_otp(
        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,
            "/Logins.Logins/verify_otp",
            accounts_dot_protos_dot_login_dot_login__pb2.VerifyOTP.SerializeToString,
            accounts_dot_protos_dot_login_dot_login__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def verify_password(
        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,
            "/Logins.Logins/verify_password",
            accounts_dot_protos_dot_login_dot_login__pb2.VerifyPassword.SerializeToString,
            accounts_dot_protos_dot_login_dot_login__pb2.Response.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def refresh_token(
        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,
            "/Logins.Logins/refresh_token",
            accounts_dot_protos_dot_login_dot_login__pb2.RefreshJWT.SerializeToString,
            accounts_dot_protos_dot_login_dot_login__pb2.RefreshJWTResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
