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

import dexus_vault.grpc_dexidp.dexidp.api_pb2 as dexidp_dot_api__pb2


class DexStub(object):
    """Dex represents the dex gRPC service."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetClient = channel.unary_unary(
            "/api.Dex/GetClient",
            request_serializer=dexidp_dot_api__pb2.GetClientReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.GetClientResp.FromString,
        )
        self.CreateClient = channel.unary_unary(
            "/api.Dex/CreateClient",
            request_serializer=dexidp_dot_api__pb2.CreateClientReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.CreateClientResp.FromString,
        )
        self.UpdateClient = channel.unary_unary(
            "/api.Dex/UpdateClient",
            request_serializer=dexidp_dot_api__pb2.UpdateClientReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.UpdateClientResp.FromString,
        )
        self.DeleteClient = channel.unary_unary(
            "/api.Dex/DeleteClient",
            request_serializer=dexidp_dot_api__pb2.DeleteClientReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.DeleteClientResp.FromString,
        )
        self.CreatePassword = channel.unary_unary(
            "/api.Dex/CreatePassword",
            request_serializer=dexidp_dot_api__pb2.CreatePasswordReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.CreatePasswordResp.FromString,
        )
        self.UpdatePassword = channel.unary_unary(
            "/api.Dex/UpdatePassword",
            request_serializer=dexidp_dot_api__pb2.UpdatePasswordReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.UpdatePasswordResp.FromString,
        )
        self.DeletePassword = channel.unary_unary(
            "/api.Dex/DeletePassword",
            request_serializer=dexidp_dot_api__pb2.DeletePasswordReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.DeletePasswordResp.FromString,
        )
        self.ListPasswords = channel.unary_unary(
            "/api.Dex/ListPasswords",
            request_serializer=dexidp_dot_api__pb2.ListPasswordReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.ListPasswordResp.FromString,
        )
        self.GetVersion = channel.unary_unary(
            "/api.Dex/GetVersion",
            request_serializer=dexidp_dot_api__pb2.VersionReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.VersionResp.FromString,
        )
        self.ListRefresh = channel.unary_unary(
            "/api.Dex/ListRefresh",
            request_serializer=dexidp_dot_api__pb2.ListRefreshReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.ListRefreshResp.FromString,
        )
        self.RevokeRefresh = channel.unary_unary(
            "/api.Dex/RevokeRefresh",
            request_serializer=dexidp_dot_api__pb2.RevokeRefreshReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.RevokeRefreshResp.FromString,
        )
        self.VerifyPassword = channel.unary_unary(
            "/api.Dex/VerifyPassword",
            request_serializer=dexidp_dot_api__pb2.VerifyPasswordReq.SerializeToString,
            response_deserializer=dexidp_dot_api__pb2.VerifyPasswordResp.FromString,
        )


class DexServicer(object):
    """Dex represents the dex gRPC service."""

    def GetClient(self, request, context):
        """GetClient gets a client."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CreateClient(self, request, context):
        """CreateClient creates a client."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateClient(self, request, context):
        """UpdateClient updates an existing client"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteClient(self, request, context):
        """DeleteClient deletes the provided client."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CreatePassword(self, request, context):
        """CreatePassword creates a password."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdatePassword(self, request, context):
        """UpdatePassword modifies existing password."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeletePassword(self, request, context):
        """DeletePassword deletes the password."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListPasswords(self, request, context):
        """ListPassword lists all password entries."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetVersion(self, request, context):
        """GetVersion returns version information of the server."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListRefresh(self, request, context):
        """ListRefresh lists all the refresh token entries for a particular user."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def RevokeRefresh(self, request, context):
        """RevokeRefresh revokes the refresh token for the provided user-client pair.

        Note that each user-client pair can have only one refresh token at a time.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def VerifyPassword(self, request, context):
        """VerifyPassword returns whether a password matches a hash for a specific email or not."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_DexServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetClient": grpc.unary_unary_rpc_method_handler(
            servicer.GetClient,
            request_deserializer=dexidp_dot_api__pb2.GetClientReq.FromString,
            response_serializer=dexidp_dot_api__pb2.GetClientResp.SerializeToString,
        ),
        "CreateClient": grpc.unary_unary_rpc_method_handler(
            servicer.CreateClient,
            request_deserializer=dexidp_dot_api__pb2.CreateClientReq.FromString,
            response_serializer=dexidp_dot_api__pb2.CreateClientResp.SerializeToString,
        ),
        "UpdateClient": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateClient,
            request_deserializer=dexidp_dot_api__pb2.UpdateClientReq.FromString,
            response_serializer=dexidp_dot_api__pb2.UpdateClientResp.SerializeToString,
        ),
        "DeleteClient": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteClient,
            request_deserializer=dexidp_dot_api__pb2.DeleteClientReq.FromString,
            response_serializer=dexidp_dot_api__pb2.DeleteClientResp.SerializeToString,
        ),
        "CreatePassword": grpc.unary_unary_rpc_method_handler(
            servicer.CreatePassword,
            request_deserializer=dexidp_dot_api__pb2.CreatePasswordReq.FromString,
            response_serializer=dexidp_dot_api__pb2.CreatePasswordResp.SerializeToString,
        ),
        "UpdatePassword": grpc.unary_unary_rpc_method_handler(
            servicer.UpdatePassword,
            request_deserializer=dexidp_dot_api__pb2.UpdatePasswordReq.FromString,
            response_serializer=dexidp_dot_api__pb2.UpdatePasswordResp.SerializeToString,
        ),
        "DeletePassword": grpc.unary_unary_rpc_method_handler(
            servicer.DeletePassword,
            request_deserializer=dexidp_dot_api__pb2.DeletePasswordReq.FromString,
            response_serializer=dexidp_dot_api__pb2.DeletePasswordResp.SerializeToString,
        ),
        "ListPasswords": grpc.unary_unary_rpc_method_handler(
            servicer.ListPasswords,
            request_deserializer=dexidp_dot_api__pb2.ListPasswordReq.FromString,
            response_serializer=dexidp_dot_api__pb2.ListPasswordResp.SerializeToString,
        ),
        "GetVersion": grpc.unary_unary_rpc_method_handler(
            servicer.GetVersion,
            request_deserializer=dexidp_dot_api__pb2.VersionReq.FromString,
            response_serializer=dexidp_dot_api__pb2.VersionResp.SerializeToString,
        ),
        "ListRefresh": grpc.unary_unary_rpc_method_handler(
            servicer.ListRefresh,
            request_deserializer=dexidp_dot_api__pb2.ListRefreshReq.FromString,
            response_serializer=dexidp_dot_api__pb2.ListRefreshResp.SerializeToString,
        ),
        "RevokeRefresh": grpc.unary_unary_rpc_method_handler(
            servicer.RevokeRefresh,
            request_deserializer=dexidp_dot_api__pb2.RevokeRefreshReq.FromString,
            response_serializer=dexidp_dot_api__pb2.RevokeRefreshResp.SerializeToString,
        ),
        "VerifyPassword": grpc.unary_unary_rpc_method_handler(
            servicer.VerifyPassword,
            request_deserializer=dexidp_dot_api__pb2.VerifyPasswordReq.FromString,
            response_serializer=dexidp_dot_api__pb2.VerifyPasswordResp.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "api.Dex", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class Dex(object):
    """Dex represents the dex gRPC service."""

    @staticmethod
    def GetClient(
        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,
            "/api.Dex/GetClient",
            dexidp_dot_api__pb2.GetClientReq.SerializeToString,
            dexidp_dot_api__pb2.GetClientResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreateClient(
        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,
            "/api.Dex/CreateClient",
            dexidp_dot_api__pb2.CreateClientReq.SerializeToString,
            dexidp_dot_api__pb2.CreateClientResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateClient(
        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,
            "/api.Dex/UpdateClient",
            dexidp_dot_api__pb2.UpdateClientReq.SerializeToString,
            dexidp_dot_api__pb2.UpdateClientResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DeleteClient(
        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,
            "/api.Dex/DeleteClient",
            dexidp_dot_api__pb2.DeleteClientReq.SerializeToString,
            dexidp_dot_api__pb2.DeleteClientResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreatePassword(
        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,
            "/api.Dex/CreatePassword",
            dexidp_dot_api__pb2.CreatePasswordReq.SerializeToString,
            dexidp_dot_api__pb2.CreatePasswordResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdatePassword(
        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,
            "/api.Dex/UpdatePassword",
            dexidp_dot_api__pb2.UpdatePasswordReq.SerializeToString,
            dexidp_dot_api__pb2.UpdatePasswordResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DeletePassword(
        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,
            "/api.Dex/DeletePassword",
            dexidp_dot_api__pb2.DeletePasswordReq.SerializeToString,
            dexidp_dot_api__pb2.DeletePasswordResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListPasswords(
        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,
            "/api.Dex/ListPasswords",
            dexidp_dot_api__pb2.ListPasswordReq.SerializeToString,
            dexidp_dot_api__pb2.ListPasswordResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetVersion(
        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,
            "/api.Dex/GetVersion",
            dexidp_dot_api__pb2.VersionReq.SerializeToString,
            dexidp_dot_api__pb2.VersionResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListRefresh(
        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,
            "/api.Dex/ListRefresh",
            dexidp_dot_api__pb2.ListRefreshReq.SerializeToString,
            dexidp_dot_api__pb2.ListRefreshResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RevokeRefresh(
        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,
            "/api.Dex/RevokeRefresh",
            dexidp_dot_api__pb2.RevokeRefreshReq.SerializeToString,
            dexidp_dot_api__pb2.RevokeRefreshResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def VerifyPassword(
        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,
            "/api.Dex/VerifyPassword",
            dexidp_dot_api__pb2.VerifyPasswordReq.SerializeToString,
            dexidp_dot_api__pb2.VerifyPasswordResp.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
