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

from epl.protobuf import stac_pb2 as epl_dot_protobuf_dot_stac__pb2


class StacServiceStub(object):
  """
  gRPC Interfaces for working with stac metadata
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Search = channel.unary_stream(
        '/epl.protobuf.StacService/Search',
        request_serializer=epl_dot_protobuf_dot_stac__pb2.StacSearchRequest.SerializeToString,
        response_deserializer=epl_dot_protobuf_dot_stac__pb2.StacMetadata.FromString,
        )
    self.Insert = channel.unary_unary(
        '/epl.protobuf.StacService/Insert',
        request_serializer=epl_dot_protobuf_dot_stac__pb2.StacMetadata.SerializeToString,
        response_deserializer=epl_dot_protobuf_dot_stac__pb2.StacUpsertResponse.FromString,
        )
    self.Update = channel.unary_unary(
        '/epl.protobuf.StacService/Update',
        request_serializer=epl_dot_protobuf_dot_stac__pb2.StacMetadata.SerializeToString,
        response_deserializer=epl_dot_protobuf_dot_stac__pb2.StacUpsertResponse.FromString,
        )


class StacServiceServicer(object):
  """
  gRPC Interfaces for working with stac metadata
  """

  def Search(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 Insert(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 Update(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 add_StacServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Search': grpc.unary_stream_rpc_method_handler(
          servicer.Search,
          request_deserializer=epl_dot_protobuf_dot_stac__pb2.StacSearchRequest.FromString,
          response_serializer=epl_dot_protobuf_dot_stac__pb2.StacMetadata.SerializeToString,
      ),
      'Insert': grpc.unary_unary_rpc_method_handler(
          servicer.Insert,
          request_deserializer=epl_dot_protobuf_dot_stac__pb2.StacMetadata.FromString,
          response_serializer=epl_dot_protobuf_dot_stac__pb2.StacUpsertResponse.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=epl_dot_protobuf_dot_stac__pb2.StacMetadata.FromString,
          response_serializer=epl_dot_protobuf_dot_stac__pb2.StacUpsertResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'epl.protobuf.StacService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
