# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from speechly.identity.v2 import identity_api_pb2 as speechly_dot_identity_dot_v2_dot_identity__api__pb2


class IdentityAPIStub(object):
  """Speechly Identity API is used for creating access tokens for the Speechly APIs.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Login = channel.unary_unary(
        '/speechly.identity.v2.IdentityAPI/Login',
        request_serializer=speechly_dot_identity_dot_v2_dot_identity__api__pb2.LoginRequest.SerializeToString,
        response_deserializer=speechly_dot_identity_dot_v2_dot_identity__api__pb2.LoginResponse.FromString,
        )


class IdentityAPIServicer(object):
  """Speechly Identity API is used for creating access tokens for the Speechly APIs.
  """

  def Login(self, request, context):
    """Performs a login of specific Speechly application.
    Returns an access token which can be used to access thee Speechly API.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_IdentityAPIServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Login': grpc.unary_unary_rpc_method_handler(
          servicer.Login,
          request_deserializer=speechly_dot_identity_dot_v2_dot_identity__api__pb2.LoginRequest.FromString,
          response_serializer=speechly_dot_identity_dot_v2_dot_identity__api__pb2.LoginResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'speechly.identity.v2.IdentityAPI', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
