toJson method

Map toJson()

Implementation

Map toJson() {
  final map = <String, dynamic>{};

  if (action != null) {
    map['action'] = action;
  }
  if (collection != null) {
    map['collection'] = collection;
  }
  if (controller != null) {
    map['controller'] = controller;
  }
  if (deprecations != null) {
    map['deprecations'] = Deprecation.toJsonList(deprecations!);
  }
  if (error != null) {
    map['error'] = error!.toJson();
  }
  if (index != null) {
    map['index'] = index;
  }
  if (protocol != null) {
    map['protocol'] = protocol;
  }
  if (requestId != null) {
    map['requestId'] = requestId;
  }
  if (room != null) {
    map['room'] = room;
  }
  if (result != null) {
    map['result'] = result;
  }
  if (scope != null) {
    map['scope'] = scope;
  }
  if (state != null) {
    map['state'] = state;
  }
  if (status != null) {
    map['status'] = status;
  }
  if (timestamp != null) {
    map['timestamp'] = timestamp;
  }
  if (users != null) {
    map['users'] = users;
  }
  if (volatile != null) {
    map['volatile'] = volatile;
  }

  return map;
}