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

from google.cloud.location import locations_pb2 as google_dot_cloud_dot_location_dot_locations__pb2


class LocationsStub(object):
  """An abstract interface that provides location-related information for
  a service. Service-specific metadata is provided through the
  [Location.metadata][google.cloud.location.Location.metadata] field.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListLocations = channel.unary_unary(
        '/google.cloud.location.Locations/ListLocations',
        request_serializer=google_dot_cloud_dot_location_dot_locations__pb2.ListLocationsRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_location_dot_locations__pb2.ListLocationsResponse.FromString,
        )
    self.GetLocation = channel.unary_unary(
        '/google.cloud.location.Locations/GetLocation',
        request_serializer=google_dot_cloud_dot_location_dot_locations__pb2.GetLocationRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_location_dot_locations__pb2.Location.FromString,
        )


class LocationsServicer(object):
  """An abstract interface that provides location-related information for
  a service. Service-specific metadata is provided through the
  [Location.metadata][google.cloud.location.Location.metadata] field.
  """

  def ListLocations(self, request, context):
    """Lists information about the supported locations for this service.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetLocation(self, request, context):
    """Gets information about a location.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_LocationsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListLocations': grpc.unary_unary_rpc_method_handler(
          servicer.ListLocations,
          request_deserializer=google_dot_cloud_dot_location_dot_locations__pb2.ListLocationsRequest.FromString,
          response_serializer=google_dot_cloud_dot_location_dot_locations__pb2.ListLocationsResponse.SerializeToString,
      ),
      'GetLocation': grpc.unary_unary_rpc_method_handler(
          servicer.GetLocation,
          request_deserializer=google_dot_cloud_dot_location_dot_locations__pb2.GetLocationRequest.FromString,
          response_serializer=google_dot_cloud_dot_location_dot_locations__pb2.Location.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.cloud.location.Locations', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
