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

from speechly.config.v1 import config_api_pb2 as speechly_dot_config_dot_v1_dot_config__api__pb2


class ConfigAPIStub(object):
  """Speechly Config API provides access to existing app configurations and enables the
  creation of new apps.

  The service requires a Speechly token, which is obtained from Speechly Dashboard (https://speechly.com/dashboard).

  The token acts as a proxy for the user who has generated it,
  i.e. all operations are performed with that user as a subject.
  Project API methods.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetProject = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/GetProject',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectResponse.FromString,
        )
    self.CreateProject = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/CreateProject',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateProjectRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateProjectResponse.FromString,
        )
    self.UpdateProject = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/UpdateProject',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateProjectRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateProjectResponse.FromString,
        )
    self.GetProjectParticipants = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/GetProjectParticipants',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectParticipantsRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectParticipantsResponse.FromString,
        )
    self.Invite = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/Invite',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.InviteRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.InviteResponse.FromString,
        )
    self.JoinProject = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/JoinProject',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.JoinProjectRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.JoinProjectResponse.FromString,
        )
    self.ListApps = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/ListApps',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.ListAppsRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.ListAppsResponse.FromString,
        )
    self.GetApp = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/GetApp',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetAppRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetAppResponse.FromString,
        )
    self.CreateApp = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/CreateApp',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateAppRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateAppResponse.FromString,
        )
    self.UpdateApp = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/UpdateApp',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateAppRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateAppResponse.FromString,
        )
    self.DeleteApp = channel.unary_unary(
        '/speechly.config.v1.ConfigAPI/DeleteApp',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DeleteAppRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DeleteAppResponse.FromString,
        )
    self.UploadTrainingData = channel.stream_unary(
        '/speechly.config.v1.ConfigAPI/UploadTrainingData',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UploadTrainingDataRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UploadTrainingDataResponse.FromString,
        )
    self.DownloadCurrentTrainingData = channel.unary_stream(
        '/speechly.config.v1.ConfigAPI/DownloadCurrentTrainingData',
        request_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DownloadCurrentTrainingDataRequest.SerializeToString,
        response_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DownloadCurrentTrainingDataResponse.FromString,
        )


class ConfigAPIServicer(object):
  """Speechly Config API provides access to existing app configurations and enables the
  creation of new apps.

  The service requires a Speechly token, which is obtained from Speechly Dashboard (https://speechly.com/dashboard).

  The token acts as a proxy for the user who has generated it,
  i.e. all operations are performed with that user as a subject.
  Project API methods.
  """

  def GetProject(self, request, context):
    """Lists all current user projects.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateProject(self, request, context):
    """Creates a new project for current user.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateProject(self, request, context):
    """Updates an existing project.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetProjectParticipants(self, request, context):
    """Lists all users with access to a project.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Invite(self, request, context):
    """Generates an invitation link for another user to join a project,
    which can be used to call JoinProject.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def JoinProject(self, request, context):
    """Joins a project as a current user.
    Requires a link generated with `Invite`.
    Application API methods.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListApps(self, request, context):
    """Lists all applications in a project.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetApp(self, request, context):
    """Gets detailed information about an application.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateApp(self, request, context):
    """Creates a new application for current user.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateApp(self, request, context):
    """Updates an existing application.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteApp(self, request, context):
    """Deletes an existing application.
    Training API methods.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UploadTrainingData(self, request_iterator, context):
    """Uploads new training data for an application.
    This will create and queue a new training job for that application.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DownloadCurrentTrainingData(self, request, context):
    """Downloads current training data for an application.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ConfigAPIServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetProject': grpc.unary_unary_rpc_method_handler(
          servicer.GetProject,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectResponse.SerializeToString,
      ),
      'CreateProject': grpc.unary_unary_rpc_method_handler(
          servicer.CreateProject,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateProjectRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateProjectResponse.SerializeToString,
      ),
      'UpdateProject': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateProject,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateProjectRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateProjectResponse.SerializeToString,
      ),
      'GetProjectParticipants': grpc.unary_unary_rpc_method_handler(
          servicer.GetProjectParticipants,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectParticipantsRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetProjectParticipantsResponse.SerializeToString,
      ),
      'Invite': grpc.unary_unary_rpc_method_handler(
          servicer.Invite,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.InviteRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.InviteResponse.SerializeToString,
      ),
      'JoinProject': grpc.unary_unary_rpc_method_handler(
          servicer.JoinProject,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.JoinProjectRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.JoinProjectResponse.SerializeToString,
      ),
      'ListApps': grpc.unary_unary_rpc_method_handler(
          servicer.ListApps,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.ListAppsRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.ListAppsResponse.SerializeToString,
      ),
      'GetApp': grpc.unary_unary_rpc_method_handler(
          servicer.GetApp,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetAppRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.GetAppResponse.SerializeToString,
      ),
      'CreateApp': grpc.unary_unary_rpc_method_handler(
          servicer.CreateApp,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateAppRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.CreateAppResponse.SerializeToString,
      ),
      'UpdateApp': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateApp,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateAppRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UpdateAppResponse.SerializeToString,
      ),
      'DeleteApp': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteApp,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DeleteAppRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DeleteAppResponse.SerializeToString,
      ),
      'UploadTrainingData': grpc.stream_unary_rpc_method_handler(
          servicer.UploadTrainingData,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UploadTrainingDataRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.UploadTrainingDataResponse.SerializeToString,
      ),
      'DownloadCurrentTrainingData': grpc.unary_stream_rpc_method_handler(
          servicer.DownloadCurrentTrainingData,
          request_deserializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DownloadCurrentTrainingDataRequest.FromString,
          response_serializer=speechly_dot_config_dot_v1_dot_config__api__pb2.DownloadCurrentTrainingDataResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'speechly.config.v1.ConfigAPI', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
