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

from google.cloud.iot_v1.proto import device_manager_pb2 as google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2
from google.cloud.iot_v1.proto import resources_pb2 as google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2
from google.iam.v1 import iam_policy_pb2 as google_dot_iam_dot_v1_dot_iam__policy__pb2
from google.iam.v1 import policy_pb2 as google_dot_iam_dot_v1_dot_policy__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class DeviceManagerStub(object):
  """Internet of things (IoT) service. Allows to manipulate device registry
  instances and the registration of devices (Things) to the cloud.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateDeviceRegistry = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/CreateDeviceRegistry',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.CreateDeviceRegistryRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceRegistry.FromString,
        )
    self.GetDeviceRegistry = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/GetDeviceRegistry',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.GetDeviceRegistryRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceRegistry.FromString,
        )
    self.UpdateDeviceRegistry = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/UpdateDeviceRegistry',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.UpdateDeviceRegistryRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceRegistry.FromString,
        )
    self.DeleteDeviceRegistry = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/DeleteDeviceRegistry',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.DeleteDeviceRegistryRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.ListDeviceRegistries = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/ListDeviceRegistries',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceRegistriesRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceRegistriesResponse.FromString,
        )
    self.CreateDevice = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/CreateDevice',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.CreateDeviceRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.Device.FromString,
        )
    self.GetDevice = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/GetDevice',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.GetDeviceRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.Device.FromString,
        )
    self.UpdateDevice = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/UpdateDevice',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.UpdateDeviceRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.Device.FromString,
        )
    self.DeleteDevice = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/DeleteDevice',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.DeleteDeviceRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.ListDevices = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/ListDevices',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDevicesRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDevicesResponse.FromString,
        )
    self.ModifyCloudToDeviceConfig = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/ModifyCloudToDeviceConfig',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ModifyCloudToDeviceConfigRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceConfig.FromString,
        )
    self.ListDeviceConfigVersions = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/ListDeviceConfigVersions',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceConfigVersionsRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceConfigVersionsResponse.FromString,
        )
    self.ListDeviceStates = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/ListDeviceStates',
        request_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceStatesRequest.SerializeToString,
        response_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceStatesResponse.FromString,
        )
    self.SetIamPolicy = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/SetIamPolicy',
        request_serializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.SetIamPolicyRequest.SerializeToString,
        response_deserializer=google_dot_iam_dot_v1_dot_policy__pb2.Policy.FromString,
        )
    self.GetIamPolicy = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/GetIamPolicy',
        request_serializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.GetIamPolicyRequest.SerializeToString,
        response_deserializer=google_dot_iam_dot_v1_dot_policy__pb2.Policy.FromString,
        )
    self.TestIamPermissions = channel.unary_unary(
        '/google.cloud.iot.v1.DeviceManager/TestIamPermissions',
        request_serializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsRequest.SerializeToString,
        response_deserializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsResponse.FromString,
        )


class DeviceManagerServicer(object):
  """Internet of things (IoT) service. Allows to manipulate device registry
  instances and the registration of devices (Things) to the cloud.
  """

  def CreateDeviceRegistry(self, request, context):
    """Creates a device registry that contains devices.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

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

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

  def ListDeviceRegistries(self, request, context):
    """Lists device registries.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

  def GetDevice(self, request, context):
    """Gets details about a device.
    """
    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 ListDevices(self, request, context):
    """List devices in a device registry.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ModifyCloudToDeviceConfig(self, request, context):
    """Modifies the configuration for the device, which is eventually sent from
    the Cloud IoT Core servers. Returns the modified configuration version and
    its metadata.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListDeviceConfigVersions(self, request, context):
    """Lists the last few versions of the device configuration in descending
    order (i.e.: newest first).
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListDeviceStates(self, request, context):
    """Lists the last few versions of the device state in descending order (i.e.:
    newest first).
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SetIamPolicy(self, request, context):
    """Sets the access control policy on the specified resource. Replaces any
    existing policy.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetIamPolicy(self, request, context):
    """Gets the access control policy for a resource.
    Returns an empty policy if the resource exists and does not have a policy
    set.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def TestIamPermissions(self, request, context):
    """Returns permissions that a caller has on the specified resource.
    If the resource does not exist, this will return an empty set of
    permissions, not a NOT_FOUND error.
    """
    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 = {
      'CreateDeviceRegistry': grpc.unary_unary_rpc_method_handler(
          servicer.CreateDeviceRegistry,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.CreateDeviceRegistryRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceRegistry.SerializeToString,
      ),
      'GetDeviceRegistry': grpc.unary_unary_rpc_method_handler(
          servicer.GetDeviceRegistry,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.GetDeviceRegistryRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceRegistry.SerializeToString,
      ),
      'UpdateDeviceRegistry': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateDeviceRegistry,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.UpdateDeviceRegistryRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceRegistry.SerializeToString,
      ),
      'DeleteDeviceRegistry': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteDeviceRegistry,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.DeleteDeviceRegistryRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'ListDeviceRegistries': grpc.unary_unary_rpc_method_handler(
          servicer.ListDeviceRegistries,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceRegistriesRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceRegistriesResponse.SerializeToString,
      ),
      'CreateDevice': grpc.unary_unary_rpc_method_handler(
          servicer.CreateDevice,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.CreateDeviceRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.Device.SerializeToString,
      ),
      'GetDevice': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevice,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.GetDeviceRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.Device.SerializeToString,
      ),
      'UpdateDevice': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateDevice,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.UpdateDeviceRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.Device.SerializeToString,
      ),
      'DeleteDevice': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteDevice,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.DeleteDeviceRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'ListDevices': grpc.unary_unary_rpc_method_handler(
          servicer.ListDevices,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDevicesRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDevicesResponse.SerializeToString,
      ),
      'ModifyCloudToDeviceConfig': grpc.unary_unary_rpc_method_handler(
          servicer.ModifyCloudToDeviceConfig,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ModifyCloudToDeviceConfigRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_resources__pb2.DeviceConfig.SerializeToString,
      ),
      'ListDeviceConfigVersions': grpc.unary_unary_rpc_method_handler(
          servicer.ListDeviceConfigVersions,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceConfigVersionsRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceConfigVersionsResponse.SerializeToString,
      ),
      'ListDeviceStates': grpc.unary_unary_rpc_method_handler(
          servicer.ListDeviceStates,
          request_deserializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceStatesRequest.FromString,
          response_serializer=google_dot_cloud_dot_iot__v1_dot_proto_dot_device__manager__pb2.ListDeviceStatesResponse.SerializeToString,
      ),
      'SetIamPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.SetIamPolicy,
          request_deserializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.SetIamPolicyRequest.FromString,
          response_serializer=google_dot_iam_dot_v1_dot_policy__pb2.Policy.SerializeToString,
      ),
      'GetIamPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetIamPolicy,
          request_deserializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.GetIamPolicyRequest.FromString,
          response_serializer=google_dot_iam_dot_v1_dot_policy__pb2.Policy.SerializeToString,
      ),
      'TestIamPermissions': grpc.unary_unary_rpc_method_handler(
          servicer.TestIamPermissions,
          request_deserializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsRequest.FromString,
          response_serializer=google_dot_iam_dot_v1_dot_iam__policy__pb2.TestIamPermissionsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.cloud.iot.v1.DeviceManager', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
