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

from admobilize.proto.devicemanagement.v1alpha1 import device_manager_pb2 as admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2
from admobilize.proto.devicemanagement.v1alpha1 import resources_pb2 as admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class DeviceManagerStub(object):
  """The service that an application uses to create, update, delete, manipulate and obtain
  devices.

  [START device management service]
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateDevice = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/CreateDevice',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.SerializeToString,
        response_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.FromString,
        )
    self.GetDevice = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/GetDevice',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.GetDeviceRequest.SerializeToString,
        response_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.FromString,
        )
    self.ListDevices = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/ListDevices',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ListDevicesRequest.SerializeToString,
        response_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ListDevicesResponse.FromString,
        )
    self.UpdateDevice = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/UpdateDevice',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.UpdateDeviceRequest.SerializeToString,
        response_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.FromString,
        )
    self.DeleteDevice = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/DeleteDevice',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.DeleteDeviceRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.ProvisionDevices = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/ProvisionDevices',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ProvisionDevicesRequest.SerializeToString,
        response_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ProvisionDevicesResponse.FromString,
        )
    self.VerifyDeviceToken = channel.unary_unary(
        '/admobilize.devicemanagement.v1alpha1.DeviceManager/VerifyDeviceToken',
        request_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.VerifyDeviceTokenRequest.SerializeToString,
        response_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.FromString,
        )


class DeviceManagerServicer(object):
  """The service that an application uses to create, update, delete, manipulate and obtain
  devices.

  [START device management service]
  """

  def CreateDevice(self, request, context):
    """--- Standard methods -----------------------------------------------------------

    Creates a device
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

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

  def UpdateDevice(self, request, context):
    """Updates a device
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteDevice(self, request, context):
    """Deletes a device
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ProvisionDevices(self, request, context):
    """--- Custom methods -----------------------------------------------------------

    Provision a device
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def VerifyDeviceToken(self, request, context):
    """Validates if a given token is a legitimate device token, this is
    the signature matches the registered public key
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_DeviceManagerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateDevice': grpc.unary_unary_rpc_method_handler(
          servicer.CreateDevice,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.FromString,
          response_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.SerializeToString,
      ),
      'GetDevice': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevice,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.GetDeviceRequest.FromString,
          response_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.SerializeToString,
      ),
      'ListDevices': grpc.unary_unary_rpc_method_handler(
          servicer.ListDevices,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ListDevicesRequest.FromString,
          response_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ListDevicesResponse.SerializeToString,
      ),
      'UpdateDevice': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateDevice,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.UpdateDeviceRequest.FromString,
          response_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.SerializeToString,
      ),
      'DeleteDevice': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteDevice,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.DeleteDeviceRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'ProvisionDevices': grpc.unary_unary_rpc_method_handler(
          servicer.ProvisionDevices,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ProvisionDevicesRequest.FromString,
          response_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.ProvisionDevicesResponse.SerializeToString,
      ),
      'VerifyDeviceToken': grpc.unary_unary_rpc_method_handler(
          servicer.VerifyDeviceToken,
          request_deserializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_device__manager__pb2.VerifyDeviceTokenRequest.FromString,
          response_serializer=admobilize_dot_devicemanagement_dot_v1alpha1_dot_resources__pb2.Device.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'admobilize.devicemanagement.v1alpha1.DeviceManager', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
