toJson method

Map toJson()

Implementation

Map toJson() {
  final map = _args;

  if (action != null) {
    map['action'] = action;
  }
  if (body != null) {
    map['body'] = body;
  }
  if (collection != null) {
    map['collection'] = collection;
  }
  if (controller != null) {
    map['controller'] = controller;
  }
  if (index != null) {
    map['index'] = index;
  }
  if (jwt != null) {
    map['jwt'] = jwt;
  }
  if (lang != null) {
    map['lang'] = lang;
  }
  if (requestId != null) {
    map['requestId'] = requestId;
  }
  if (force != null) {
    map['force'] = force;
  }
  if (waitForRefresh == true) {
    map['refresh'] = 'wait_for';
  } else if (waitForRefresh == false) {
    map['refresh'] = 'false';
  }
  if (uid != null) {
    map['_id'] = uid;
  }
  if (volatile != null) {
    map['volatile'] = volatile;
  }
  if (startTime != null) {
    map['startTime'] = startTime!.millisecondsSinceEpoch;
  }
  if (stopTime != null) {
    map['stopTime'] = stopTime!.millisecondsSinceEpoch;
  }
  if (strategy != null) {
    map['strategy'] = strategy;
  }
  if (expiresIn != null) {
    map['expiresIn'] = expiresIn;
  }
  if (from != null) {
    map['from'] = from;
  }
  if (size != null) {
    map['size'] = size;
  }
  if (type != null) {
    map['type'] = type;
  }
  if (scroll != null) {
    map['scroll'] = scroll;
  }
  if (scrollId != null) {
    map['scrollId'] = scrollId;
  }
  if (sort != null) {
    map['sort'] = sort;
  }
  if (retryOnConflict != null) {
    map['retryOnConflict'] = retryOnConflict;
  }
  if (reset != null) {
    map['reset'] = reset;
  }
  if (scope != null) {
    map['scope'] = scope;
  }
  if (state != null) {
    map['state'] = state;
  }
  if (userId != null) {
    map['userId'] = userId;
  }
  if (users != null) {
    map['users'] = users;
  }
  if (verb != null) {
    map['verb'] = verb;
  }
  if (source != null) {
    map['source'] = source;
  }
  if (includeKuzzleMeta != null) {
    map['includeKuzzleMeta'] = includeKuzzleMeta;
  }

  return map;
}