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

from yandex.cloud.access import access_pb2 as yandex_dot_cloud_dot_access_dot_access__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2
from yandex.cloud.serverless.functions.v1 import function_pb2 as yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2
from yandex.cloud.serverless.functions.v1 import function_service_pb2 as yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2


class FunctionServiceStub(object):
  """A set of methods for managing serverless functions.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/Get',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.GetFunctionRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2.Function.FromString,
        )
    self.List = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/List',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsResponse.FromString,
        )
    self.Create = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/Create',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.CreateFunctionRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Update = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/Update',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.UpdateFunctionRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Delete = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/Delete',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.DeleteFunctionRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.GetVersion = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/GetVersion',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.GetFunctionVersionRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2.Version.FromString,
        )
    self.GetVersionByTag = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/GetVersionByTag',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.GetFunctionVersionByTagRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2.Version.FromString,
        )
    self.ListVersions = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/ListVersions',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsVersionsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsVersionsResponse.FromString,
        )
    self.SetTag = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/SetTag',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.SetFunctionTagRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.RemoveTag = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/RemoveTag',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.RemoveFunctionTagRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListTagHistory = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/ListTagHistory',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionTagHistoryRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionTagHistoryResponse.FromString,
        )
    self.CreateVersion = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/CreateVersion',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.CreateFunctionVersionRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListRuntimes = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/ListRuntimes',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListRuntimesRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListRuntimesResponse.FromString,
        )
    self.ListOperations = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/ListOperations',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionOperationsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionOperationsResponse.FromString,
        )
    self.ListAccessBindings = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/ListAccessBindings',
        request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.FromString,
        )
    self.SetAccessBindings = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/SetAccessBindings',
        request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.UpdateAccessBindings = channel.unary_unary(
        '/yandex.cloud.serverless.functions.v1.FunctionService/UpdateAccessBindings',
        request_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )


class FunctionServiceServicer(object):
  """A set of methods for managing serverless functions.
  """

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

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

  def List(self, request, context):
    """Retrieves the list of functions in the specified folder.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Create(self, request, context):
    """Creates a function in the specified folder.
    """
    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 function.
    """
    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 function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetVersion(self, request, context):
    """Returns the specified version of a function.

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

  def GetVersionByTag(self, request, context):
    """Returns all versions with the specified tag.

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

  def ListVersions(self, request, context):
    """Retrieves the list of versions for the specified function, or of all function versions
    in the specified folder.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SetTag(self, request, context):
    """Set a tag for the specified version of a function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RemoveTag(self, request, context):
    """Remove a tag from the specified version of a function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListTagHistory(self, request, context):
    """Returns the log of tags assigned to versions of the specified function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateVersion(self, request, context):
    """Creates a version for the specified function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListRuntimes(self, request, context):
    """Lists available runtime environments for the specified function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListOperations(self, request, context):
    """Lists operations for the specified function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListAccessBindings(self, request, context):
    """Lists existing access bindings for the specified function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SetAccessBindings(self, request, context):
    """Sets access bindings for the function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateAccessBindings(self, request, context):
    """Updates access bindings for the specified function.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_FunctionServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.GetFunctionRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2.Function.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsResponse.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.CreateFunctionRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.UpdateFunctionRequest.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_serverless_dot_functions_dot_v1_dot_function__service__pb2.DeleteFunctionRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'GetVersion': grpc.unary_unary_rpc_method_handler(
          servicer.GetVersion,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.GetFunctionVersionRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2.Version.SerializeToString,
      ),
      'GetVersionByTag': grpc.unary_unary_rpc_method_handler(
          servicer.GetVersionByTag,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.GetFunctionVersionByTagRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__pb2.Version.SerializeToString,
      ),
      'ListVersions': grpc.unary_unary_rpc_method_handler(
          servicer.ListVersions,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsVersionsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionsVersionsResponse.SerializeToString,
      ),
      'SetTag': grpc.unary_unary_rpc_method_handler(
          servicer.SetTag,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.SetFunctionTagRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'RemoveTag': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveTag,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.RemoveFunctionTagRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'ListTagHistory': grpc.unary_unary_rpc_method_handler(
          servicer.ListTagHistory,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionTagHistoryRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionTagHistoryResponse.SerializeToString,
      ),
      'CreateVersion': grpc.unary_unary_rpc_method_handler(
          servicer.CreateVersion,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.CreateFunctionVersionRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'ListRuntimes': grpc.unary_unary_rpc_method_handler(
          servicer.ListRuntimes,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListRuntimesRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListRuntimesResponse.SerializeToString,
      ),
      'ListOperations': grpc.unary_unary_rpc_method_handler(
          servicer.ListOperations,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_functions_dot_v1_dot_function__service__pb2.ListFunctionOperationsResponse.SerializeToString,
      ),
      'ListAccessBindings': grpc.unary_unary_rpc_method_handler(
          servicer.ListAccessBindings,
          request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_access_dot_access__pb2.ListAccessBindingsResponse.SerializeToString,
      ),
      'SetAccessBindings': grpc.unary_unary_rpc_method_handler(
          servicer.SetAccessBindings,
          request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.SetAccessBindingsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'UpdateAccessBindings': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateAccessBindings,
          request_deserializer=yandex_dot_cloud_dot_access_dot_access__pb2.UpdateAccessBindingsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.serverless.functions.v1.FunctionService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
