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

from grid.protos.grid.v1 import integrations_pb2 as grid_dot_v1_dot_integrations__pb2


class IntegrationServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetGitHubToken = channel.unary_unary(
        '/grid.v1.IntegrationService/GetGitHubToken',
        request_serializer=grid_dot_v1_dot_integrations__pb2.GetGitHubTokenRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_integrations__pb2.GetGitHubTokenResponse.FromString,
        )
    self.SetGitHubToken = channel.unary_unary(
        '/grid.v1.IntegrationService/SetGitHubToken',
        request_serializer=grid_dot_v1_dot_integrations__pb2.SetGitHubTokenRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_integrations__pb2.SetGitHubTokenResponse.FromString,
        )


class IntegrationServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def GetGitHubToken(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SetGitHubToken(self, request, context):
    """SetGitHubToken can manually set the Github token for the user. Used by tests
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_IntegrationServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetGitHubToken': grpc.unary_unary_rpc_method_handler(
          servicer.GetGitHubToken,
          request_deserializer=grid_dot_v1_dot_integrations__pb2.GetGitHubTokenRequest.FromString,
          response_serializer=grid_dot_v1_dot_integrations__pb2.GetGitHubTokenResponse.SerializeToString,
      ),
      'SetGitHubToken': grpc.unary_unary_rpc_method_handler(
          servicer.SetGitHubToken,
          request_deserializer=grid_dot_v1_dot_integrations__pb2.SetGitHubTokenRequest.FromString,
          response_serializer=grid_dot_v1_dot_integrations__pb2.SetGitHubTokenResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grid.v1.IntegrationService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
