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

from stellarstation.api.v1.groundstation import groundstation_pb2 as stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2


class GroundStationServiceStub(object):
  """The public API of StellarStation for use by ground station operators integrating with the
  StellarStation ground network. It is invalid to specify ground station IDs that the operator
  does not own. Only using IDs shown on the StellarStation Console or returned in API responses
  will ensure all inputs are valid.

  A pass is a time range where an ground station and satellite can communicate with each other, i.e.,
  the period between Acquisition of Signal (AOS) and Loss of Signal (LOS) of the ground station and
  satellite pair.

  A plan is a scheduled pass that will be executed to send and receive data between the ground
  station and satellite during the time range.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.AddUnavailabilityWindow = channel.unary_unary(
        '/stellarstation.api.v1.groundstation.GroundStationService/AddUnavailabilityWindow',
        request_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.AddUnavailabilityWindowRequest.SerializeToString,
        response_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.AddUnavailabilityWindowResponse.FromString,
        )
    self.DeleteUnavailabilityWindow = channel.unary_unary(
        '/stellarstation.api.v1.groundstation.GroundStationService/DeleteUnavailabilityWindow',
        request_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.DeleteUnavailabilityWindowRequest.SerializeToString,
        response_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.DeleteUnavailabilityWindowResponse.FromString,
        )
    self.ListPlans = channel.unary_unary(
        '/stellarstation.api.v1.groundstation.GroundStationService/ListPlans',
        request_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListPlansRequest.SerializeToString,
        response_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListPlansResponse.FromString,
        )
    self.ListUnavailabilityWindows = channel.unary_unary(
        '/stellarstation.api.v1.groundstation.GroundStationService/ListUnavailabilityWindows',
        request_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListUnavailabilityWindowsRequest.SerializeToString,
        response_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListUnavailabilityWindowsResponse.FromString,
        )


class GroundStationServiceServicer(object):
  """The public API of StellarStation for use by ground station operators integrating with the
  StellarStation ground network. It is invalid to specify ground station IDs that the operator
  does not own. Only using IDs shown on the StellarStation Console or returned in API responses
  will ensure all inputs are valid.

  A pass is a time range where an ground station and satellite can communicate with each other, i.e.,
  the period between Acquisition of Signal (AOS) and Loss of Signal (LOS) of the ground station and
  satellite pair.

  A plan is a scheduled pass that will be executed to send and receive data between the ground
  station and satellite during the time range.
  """

  def AddUnavailabilityWindow(self, request, context):
    """Adds a new unavailability window to the requested ground station.

    Existing plans that overlap the unavailability window will be canceled. However, there
    are cases when the plan cannot be canceled. When this happens, the request will be closed
    with a 'FAILED_PRECONDITION' status.

    The request will be closed with an `INVALID_ARGUMENT` status if `ground_station_id`,
    `start_time`, or `end_time` are missing, or 'end_time' is not after 'start_time'.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteUnavailabilityWindow(self, request, context):
    """Deletes an existing unavailability window of the requested ground station.

    The request will be closed with an `INVALID_ARGUMENT` status if `window_id` is missing
    or invalid.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListPlans(self, request, context):
    """Lists the plans for a particular ground station.

    The request will be closed with an `INVALID_ARGUMENT` status if `ground_station_id`,
    `aos_after`, or `aos_before` are missing, or the duration between the two times is longer than
    31 days.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListUnavailabilityWindows(self, request, context):
    """Returns a list of unavailability windows for the requested ground station.

    The request will be closed with an `INVALID_ARGUMENT` status if `ground_station_id`,
    `start_time`, or `end_time` are missing, or 'end_time' is not after 'start_time'.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_GroundStationServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'AddUnavailabilityWindow': grpc.unary_unary_rpc_method_handler(
          servicer.AddUnavailabilityWindow,
          request_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.AddUnavailabilityWindowRequest.FromString,
          response_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.AddUnavailabilityWindowResponse.SerializeToString,
      ),
      'DeleteUnavailabilityWindow': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteUnavailabilityWindow,
          request_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.DeleteUnavailabilityWindowRequest.FromString,
          response_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.DeleteUnavailabilityWindowResponse.SerializeToString,
      ),
      'ListPlans': grpc.unary_unary_rpc_method_handler(
          servicer.ListPlans,
          request_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListPlansRequest.FromString,
          response_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListPlansResponse.SerializeToString,
      ),
      'ListUnavailabilityWindows': grpc.unary_unary_rpc_method_handler(
          servicer.ListUnavailabilityWindows,
          request_deserializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListUnavailabilityWindowsRequest.FromString,
          response_serializer=stellarstation_dot_api_dot_v1_dot_groundstation_dot_groundstation__pb2.ListUnavailabilityWindowsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'stellarstation.api.v1.groundstation.GroundStationService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
