toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.blockedByUser != null) {
    json[r'blocked_by_user'] = this.blockedByUser;
  } else {
    json[r'blocked_by_user'] = null;
  }
  json[r'call_cid'] = this.callCid;
  json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  json[r'type'] = this.type;
  json[r'user'] = this.user;
  json[r'call'] = this.call;
  json[r'members'] = this.members;
  json[r'hls_playlist_url'] = this.hlsPlaylistUrl;
  json[r'capabilities_by_role'] = this.capabilitiesByRole;
  json[r'notify_user'] = this.notifyUser;
  json[r'session_id'] = this.sessionId;
  json[r'reaction'] = this.reaction;
  json[r'call_recording'] = this.callRecording;
  if (this.reason != null) {
    json[r'reason'] = this.reason;
  } else {
    json[r'reason'] = null;
  }
  json[r'video'] = this.video;
  json[r'name'] = this.name;
  json[r'anonymous_participant_count'] = this.anonymousParticipantCount;
  json[r'participants_count_by_role'] = this.participantsCountByRole;
  json[r'participant'] = this.participant;
  json[r'duration_seconds'] = this.durationSeconds;
  json[r'call_transcription'] = this.callTranscription;
  json[r'from_user_id'] = this.fromUserId;
  json[r'muted_user_ids'] = this.mutedUserIds;
  json[r'closed_caption'] = this.closedCaption;
  json[r'connection_id'] = this.connectionId;
  json[r'me'] = this.me;
  json[r'error'] = this.error;
  json[r'custom'] = this.custom;
  if (this.cid != null) {
    json[r'cid'] = this.cid;
  } else {
    json[r'cid'] = null;
  }
  if (this.receivedAt != null) {
    json[r'received_at'] = this.receivedAt!.toUtc().toIso8601String();
  } else {
    json[r'received_at'] = null;
  }
  json[r'permissions'] = this.permissions;
  json[r'own_capabilities'] = this.ownCapabilities;
  return json;
}