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

from yandex.cloud.iam.v1 import api_key_pb2 as yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__pb2
from yandex.cloud.iam.v1 import api_key_service_pb2 as yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class ApiKeyServiceStub(object):
  """A set of methods for managing API keys.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.List = channel.unary_unary(
        '/yandex.cloud.iam.v1.ApiKeyService/List',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeysRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeysResponse.FromString,
        )
    self.Get = channel.unary_unary(
        '/yandex.cloud.iam.v1.ApiKeyService/Get',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.GetApiKeyRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__pb2.ApiKey.FromString,
        )
    self.Create = channel.unary_unary(
        '/yandex.cloud.iam.v1.ApiKeyService/Create',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.CreateApiKeyRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.CreateApiKeyResponse.FromString,
        )
    self.Update = channel.unary_unary(
        '/yandex.cloud.iam.v1.ApiKeyService/Update',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.UpdateApiKeyRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Delete = channel.unary_unary(
        '/yandex.cloud.iam.v1.ApiKeyService/Delete',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.DeleteApiKeyRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListOperations = channel.unary_unary(
        '/yandex.cloud.iam.v1.ApiKeyService/ListOperations',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeyOperationsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeyOperationsResponse.FromString,
        )


class ApiKeyServiceServicer(object):
  """A set of methods for managing API keys.
  """

  def List(self, request, context):
    """Retrieves the list of API keys for the specified service account.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Get(self, request, context):
    """Returns the specified API key.

    To get the list of available API keys, make a [List] request.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Create(self, request, context):
    """Creates an API key for the specified service account.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Update(self, request, context):
    """Updates the specified API key.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Delete(self, request, context):
    """Deletes the specified API key.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListOperations(self, request, context):
    """Retrieves the list of operations for the specified API key.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ApiKeyServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeysRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeysResponse.SerializeToString,
      ),
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.GetApiKeyRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__pb2.ApiKey.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.CreateApiKeyRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.CreateApiKeyResponse.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.UpdateApiKeyRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.DeleteApiKeyRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'ListOperations': grpc.unary_unary_rpc_method_handler(
          servicer.ListOperations,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeyOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_api__key__service__pb2.ListApiKeyOperationsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.iam.v1.ApiKeyService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
