<reponame>databeast/apicore<filename>apiv2-python-connlock/connlock/conn/fixtures/rbac/rbac_pb2_grpc.py
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import connlock.conn.fixtures.rbac.rbac_pb2 as rbac__pb2


class RbacServiceStub(object):
  """The RBAC service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Check = channel.unary_unary(
        '/rbac.RbacService/Check',
        request_serializer=rbac__pb2.CheckRequest.SerializeToString,
        response_deserializer=rbac__pb2.CheckReply.FromString,
        )
    self.Update = channel.unary_unary(
        '/rbac.RbacService/Update',
        request_serializer=rbac__pb2.UpdateRequest.SerializeToString,
        response_deserializer=rbac__pb2.UpdateReply.FromString,
        )
    self.Clone = channel.unary_unary(
        '/rbac.RbacService/Clone',
        request_serializer=rbac__pb2.CloneRequest.SerializeToString,
        response_deserializer=rbac__pb2.CloneReply.FromString,
        )
    self.FetchRole = channel.unary_unary(
        '/rbac.RbacService/FetchRole',
        request_serializer=rbac__pb2.RoleRequest.SerializeToString,
        response_deserializer=rbac__pb2.RoleReply.FromString,
        )
    self.FetchAllRoles = channel.unary_unary(
        '/rbac.RbacService/FetchAllRoles',
        request_serializer=rbac__pb2.AllRolesRequest.SerializeToString,
        response_deserializer=rbac__pb2.AllRolesReply.FromString,
        )
    self.FetchTemplateRules = channel.unary_unary(
        '/rbac.RbacService/FetchTemplateRules',
        request_serializer=rbac__pb2.TemplateRulesRequest.SerializeToString,
        response_deserializer=rbac__pb2.TemplateRulesReply.FromString,
        )
    self.UseSystoken = channel.unary_unary(
        '/rbac.RbacService/UseSystoken',
        request_serializer=rbac__pb2.SystokenRequest.SerializeToString,
        response_deserializer=rbac__pb2.SystokenReply.FromString,
        )
    self.AutoCollaborate = channel.unary_unary(
        '/rbac.RbacService/AutoCollaborate',
        request_serializer=rbac__pb2.AutoCollabRequest.SerializeToString,
        response_deserializer=rbac__pb2.AutoCollabReply.FromString,
        )
    self.Healthcheck = channel.unary_unary(
        '/rbac.RbacService/Healthcheck',
        request_serializer=rbac__pb2.HealthCheckRequest.SerializeToString,
        response_deserializer=rbac__pb2.HealthCheckReply.FromString,
        )


class RbacServiceServicer(object):
  """The RBAC service definition.
  """

  def Check(self, request, context):
    """Confirms if a client is allowed to access a particular URL, via the given method
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Update(self, request, context):
    """Updates a Users access rights to an API Resource, on a role that matches a given Scope URI
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Clone(self, request, context):
    """Clones the access rights from all users from a specific source ResUri to a destation one
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def FetchRole(self, request, context):
    """Fetch details of a single Access Role
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def FetchAllRoles(self, request, context):
    """Fetch all Roles assigned to the current User
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def FetchTemplateRules(self, request, context):
    """Fetch Rules for a given Role Template
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UseSystoken(self, request, context):
    """Generate a new identity-masquerading system authentication token
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AutoCollaborate(self, request, context):
    """submit a databody to determine what other Roles should be granted access to it
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Healthcheck(self, request, context):
    """test the connection to RBAC is still functional, and RBAC is ready to accept queries
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_RbacServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Check': grpc.unary_unary_rpc_method_handler(
          servicer.Check,
          request_deserializer=rbac__pb2.CheckRequest.FromString,
          response_serializer=rbac__pb2.CheckReply.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=rbac__pb2.UpdateRequest.FromString,
          response_serializer=rbac__pb2.UpdateReply.SerializeToString,
      ),
      'Clone': grpc.unary_unary_rpc_method_handler(
          servicer.Clone,
          request_deserializer=rbac__pb2.CloneRequest.FromString,
          response_serializer=rbac__pb2.CloneReply.SerializeToString,
      ),
      'FetchRole': grpc.unary_unary_rpc_method_handler(
          servicer.FetchRole,
          request_deserializer=rbac__pb2.RoleRequest.FromString,
          response_serializer=rbac__pb2.RoleReply.SerializeToString,
      ),
      'FetchAllRoles': grpc.unary_unary_rpc_method_handler(
          servicer.FetchAllRoles,
          request_deserializer=rbac__pb2.AllRolesRequest.FromString,
          response_serializer=rbac__pb2.AllRolesReply.SerializeToString,
      ),
      'FetchTemplateRules': grpc.unary_unary_rpc_method_handler(
          servicer.FetchTemplateRules,
          request_deserializer=rbac__pb2.TemplateRulesRequest.FromString,
          response_serializer=rbac__pb2.TemplateRulesReply.SerializeToString,
      ),
      'UseSystoken': grpc.unary_unary_rpc_method_handler(
          servicer.UseSystoken,
          request_deserializer=rbac__pb2.SystokenRequest.FromString,
          response_serializer=rbac__pb2.SystokenReply.SerializeToString,
      ),
      'AutoCollaborate': grpc.unary_unary_rpc_method_handler(
          servicer.AutoCollaborate,
          request_deserializer=rbac__pb2.AutoCollabRequest.FromString,
          response_serializer=rbac__pb2.AutoCollabReply.SerializeToString,
      ),
      'Healthcheck': grpc.unary_unary_rpc_method_handler(
          servicer.Healthcheck,
          request_deserializer=rbac__pb2.HealthCheckRequest.FromString,
          response_serializer=rbac__pb2.HealthCheckReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'rbac.RbacService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))