RoleSearchResult constructor

RoleSearchResult(
  1. Kuzzle kuzzle, {
  2. KuzzleRequest? request,
  3. required KuzzleResponse response,
})

Implementation

RoleSearchResult(
  Kuzzle kuzzle, {
  KuzzleRequest? request,
  required KuzzleResponse response,
}) : super(kuzzle, request: request, response: response) {
  searchAction = 'searchRoles';
  scrollAction = null; // scrollRoles action does not exists in Kuzzle API.

  hits = (response.result['hits'] as List).map((hit) => KuzzleRole(kuzzle,
          uid: hit['_id'] as String?,
          controllers: hit['_source']['controllers'] as Map<String, dynamic>?))
      .toList();
}