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

from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2
from yandex.cloud.serverless.triggers.v1 import trigger_pb2 as yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__pb2
from yandex.cloud.serverless.triggers.v1 import trigger_service_pb2 as yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/yandex.cloud.serverless.triggers.v1.TriggerService/Get',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.GetTriggerRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__pb2.Trigger.FromString,
        )
    self.List = channel.unary_unary(
        '/yandex.cloud.serverless.triggers.v1.TriggerService/List',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggersRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggersResponse.FromString,
        )
    self.Create = channel.unary_unary(
        '/yandex.cloud.serverless.triggers.v1.TriggerService/Create',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.CreateTriggerRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Update = channel.unary_unary(
        '/yandex.cloud.serverless.triggers.v1.TriggerService/Update',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.UpdateTriggerRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Delete = channel.unary_unary(
        '/yandex.cloud.serverless.triggers.v1.TriggerService/Delete',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.DeleteTriggerRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListOperations = channel.unary_unary(
        '/yandex.cloud.serverless.triggers.v1.TriggerService/ListOperations',
        request_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggerOperationsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggerOperationsResponse.FromString,
        )


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

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

    To get the list of all available triggers, 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 triggers 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 trigger 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 trigger.
    """
    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 trigger.
    """
    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 trigger.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TriggerServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.GetTriggerRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__pb2.Trigger.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggersRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggersResponse.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.CreateTriggerRequest.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_triggers_dot_v1_dot_trigger__service__pb2.UpdateTriggerRequest.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_triggers_dot_v1_dot_trigger__service__pb2.DeleteTriggerRequest.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_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggerOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_serverless_dot_triggers_dot_v1_dot_trigger__service__pb2.ListTriggerOperationsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.serverless.triggers.v1.TriggerService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
