KuzzleRequest.fromMap constructor
KuzzleRequest.fromMap(
- Map data
Implementation
KuzzleRequest.fromMap(Map data) {
action = data['action'] as String?;
body = data['body'] as Map<String, dynamic>?;
collection = data['collection'] as String?;
controller = data['controller'] as String?;
index = data['index'] as String?;
jwt = data['jwt'] as String?;
lang = data['lang'] as String?;
requestId = data['requestId'] as String?;
requestId ??= _uuid.v4();
waitForRefresh = (data['refresh'] as String?) == 'wait_for' ? true : false;
force = data['force'] as bool?;
uid = data['_id'] as String?;
volatile = data['volatile'] as Map<String, dynamic>?;
startTime = data['startTime'] == null
? null
: DateTime.parse(data['startTime'] as String);
stopTime = data['stopTime'] == null
? null
: DateTime.parse(data['stopTime'] as String);
strategy = data['strategy'] as String?;
expiresIn = data['expiresIn'] as String?;
from = data['from'] as int?;
size = data['size'] as int?;
type = data['type'] as String?;
scroll = data['scroll'] as String?;
scrollId = data['scrollId'] as String?;
sort = data['sort'] as List<dynamic>?;
retryOnConflict = data['retryOnConflict'] as int?;
reset = data['reset'] as bool?;
scope = data['scope'] as String?;
state = data['state'] as String?;
userId = data['userId'] as String?;
users = data['users'] as String?;
verb = data['verb'] as String?;
source = data['source'] as bool?;
includeKuzzleMeta = data['includeKuzzleMeta'] as bool?;
}