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

from . import auth_pb2 as auth__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Login = channel.unary_stream(
                '/auth.Auth/Login',
                request_serializer=auth__pb2._LoginRequest.SerializeToString,
                response_deserializer=auth__pb2._LoginResponse.FromString,
                )
        self.GenerateApiToken = channel.unary_unary(
                '/auth.Auth/GenerateApiToken',
                request_serializer=auth__pb2._GenerateApiTokenRequest.SerializeToString,
                response_deserializer=auth__pb2._GenerateApiTokenResponse.FromString,
                )
        self.RefreshApiToken = channel.unary_unary(
                '/auth.Auth/RefreshApiToken',
                request_serializer=auth__pb2._RefreshApiTokenRequest.SerializeToString,
                response_deserializer=auth__pb2._RefreshApiTokenResponse.FromString,
                )


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

    def Login(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 GenerateApiToken(self, request, context):
        """api for initially generating api and refresh tokens
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RefreshApiToken(self, request, context):
        """api for programmatically refreshing api and refresh tokens
        """
        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 = {
            'Login': grpc.unary_stream_rpc_method_handler(
                    servicer.Login,
                    request_deserializer=auth__pb2._LoginRequest.FromString,
                    response_serializer=auth__pb2._LoginResponse.SerializeToString,
            ),
            'GenerateApiToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GenerateApiToken,
                    request_deserializer=auth__pb2._GenerateApiTokenRequest.FromString,
                    response_serializer=auth__pb2._GenerateApiTokenResponse.SerializeToString,
            ),
            'RefreshApiToken': grpc.unary_unary_rpc_method_handler(
                    servicer.RefreshApiToken,
                    request_deserializer=auth__pb2._RefreshApiTokenRequest.FromString,
                    response_serializer=auth__pb2._RefreshApiTokenResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'auth.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 Login(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_stream(request, target, '/auth.Auth/Login',
            auth__pb2._LoginRequest.SerializeToString,
            auth__pb2._LoginResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GenerateApiToken(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, '/auth.Auth/GenerateApiToken',
            auth__pb2._GenerateApiTokenRequest.SerializeToString,
            auth__pb2._GenerateApiTokenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RefreshApiToken(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, '/auth.Auth/RefreshApiToken',
            auth__pb2._RefreshApiTokenRequest.SerializeToString,
            auth__pb2._RefreshApiTokenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
