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

from ...server.v1 import auth_pb2 as server_dot_v1_dot_auth__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccessToken = channel.unary_unary(
                '/tigrisdata.auth.v1.Auth/GetAccessToken',
                request_serializer=server_dot_v1_dot_auth__pb2.GetAccessTokenRequest.SerializeToString,
                response_deserializer=server_dot_v1_dot_auth__pb2.GetAccessTokenResponse.FromString,
                )
        self.CreateInvitations = channel.unary_unary(
                '/tigrisdata.auth.v1.Auth/CreateInvitations',
                request_serializer=server_dot_v1_dot_auth__pb2.CreateInvitationsRequest.SerializeToString,
                response_deserializer=server_dot_v1_dot_auth__pb2.CreateInvitationsResponse.FromString,
                )
        self.DeleteInvitations = channel.unary_unary(
                '/tigrisdata.auth.v1.Auth/DeleteInvitations',
                request_serializer=server_dot_v1_dot_auth__pb2.DeleteInvitationsRequest.SerializeToString,
                response_deserializer=server_dot_v1_dot_auth__pb2.DeleteInvitationsResponse.FromString,
                )
        self.ListInvitations = channel.unary_unary(
                '/tigrisdata.auth.v1.Auth/ListInvitations',
                request_serializer=server_dot_v1_dot_auth__pb2.ListInvitationsRequest.SerializeToString,
                response_deserializer=server_dot_v1_dot_auth__pb2.ListInvitationsResponse.FromString,
                )
        self.VerifyInvitation = channel.unary_unary(
                '/tigrisdata.auth.v1.Auth/VerifyInvitation',
                request_serializer=server_dot_v1_dot_auth__pb2.VerifyInvitationRequest.SerializeToString,
                response_deserializer=server_dot_v1_dot_auth__pb2.VerifyInvitationResponse.FromString,
                )
        self.ListUsers = channel.unary_unary(
                '/tigrisdata.auth.v1.Auth/ListUsers',
                request_serializer=server_dot_v1_dot_auth__pb2.ListUsersRequest.SerializeToString,
                response_deserializer=server_dot_v1_dot_auth__pb2.ListUsersResponse.FromString,
                )


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

    def GetAccessToken(self, request, context):
        """Endpoint for receiving access token from Tigris Server. The endpoint
        requires Grant Type(`grant_type`) which has two possible values
        <i>"REFRESH_TOKEN"</i> or <i>"CLIENT_CREDENTIALS"</i> based on which either
        Refresh token(`refresh_token`) needs to be set or client
        credentials(`client_id`, `client_secret`).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateInvitations(self, request, context):
        """Creates invitations to the namespace
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteInvitations(self, request, context):
        """Deletes invitations to the namespace
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListInvitations(self, request, context):
        """Lists all the invitations to the namespace
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyInvitation(self, request, context):
        """Verify invitation
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUsers(self, request, context):
        """List users
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AuthServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccessToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccessToken,
                    request_deserializer=server_dot_v1_dot_auth__pb2.GetAccessTokenRequest.FromString,
                    response_serializer=server_dot_v1_dot_auth__pb2.GetAccessTokenResponse.SerializeToString,
            ),
            'CreateInvitations': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateInvitations,
                    request_deserializer=server_dot_v1_dot_auth__pb2.CreateInvitationsRequest.FromString,
                    response_serializer=server_dot_v1_dot_auth__pb2.CreateInvitationsResponse.SerializeToString,
            ),
            'DeleteInvitations': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteInvitations,
                    request_deserializer=server_dot_v1_dot_auth__pb2.DeleteInvitationsRequest.FromString,
                    response_serializer=server_dot_v1_dot_auth__pb2.DeleteInvitationsResponse.SerializeToString,
            ),
            'ListInvitations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListInvitations,
                    request_deserializer=server_dot_v1_dot_auth__pb2.ListInvitationsRequest.FromString,
                    response_serializer=server_dot_v1_dot_auth__pb2.ListInvitationsResponse.SerializeToString,
            ),
            'VerifyInvitation': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyInvitation,
                    request_deserializer=server_dot_v1_dot_auth__pb2.VerifyInvitationRequest.FromString,
                    response_serializer=server_dot_v1_dot_auth__pb2.VerifyInvitationResponse.SerializeToString,
            ),
            'ListUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUsers,
                    request_deserializer=server_dot_v1_dot_auth__pb2.ListUsersRequest.FromString,
                    response_serializer=server_dot_v1_dot_auth__pb2.ListUsersResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'tigrisdata.auth.v1.Auth', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetAccessToken(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, '/tigrisdata.auth.v1.Auth/GetAccessToken',
            server_dot_v1_dot_auth__pb2.GetAccessTokenRequest.SerializeToString,
            server_dot_v1_dot_auth__pb2.GetAccessTokenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateInvitations(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, '/tigrisdata.auth.v1.Auth/CreateInvitations',
            server_dot_v1_dot_auth__pb2.CreateInvitationsRequest.SerializeToString,
            server_dot_v1_dot_auth__pb2.CreateInvitationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteInvitations(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, '/tigrisdata.auth.v1.Auth/DeleteInvitations',
            server_dot_v1_dot_auth__pb2.DeleteInvitationsRequest.SerializeToString,
            server_dot_v1_dot_auth__pb2.DeleteInvitationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListInvitations(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, '/tigrisdata.auth.v1.Auth/ListInvitations',
            server_dot_v1_dot_auth__pb2.ListInvitationsRequest.SerializeToString,
            server_dot_v1_dot_auth__pb2.ListInvitationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def VerifyInvitation(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, '/tigrisdata.auth.v1.Auth/VerifyInvitation',
            server_dot_v1_dot_auth__pb2.VerifyInvitationRequest.SerializeToString,
            server_dot_v1_dot_auth__pb2.VerifyInvitationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUsers(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, '/tigrisdata.auth.v1.Auth/ListUsers',
            server_dot_v1_dot_auth__pb2.ListUsersRequest.SerializeToString,
            server_dot_v1_dot_auth__pb2.ListUsersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
