toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'app'] = this.app;
json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
json[r'custom'] = this.custom;
if (this.receivedAt != null) {
json[r'received_at'] = this.receivedAt!.toUtc().toIso8601String();
} else {
json[r'received_at'] = null;
}
json[r'type'] = this.type;
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'user'] = this.user;
json[r'call'] = this.call;
json[r'members'] = this.members;
json[r'digit'] = this.digit;
json[r'duration_ms'] = this.durationMs;
json[r'seq_number'] = this.seqNumber;
json[r'timestamp'] = this.timestamp.toUtc().toIso8601String();
json[r'reason'] = this.reason;
json[r'egress_id'] = this.egressId;
json[r'captured_at'] = this.capturedAt.toUtc().toIso8601String();
json[r'session_id'] = this.sessionId;
json[r'track_type'] = this.trackType;
json[r'url'] = this.url;
json[r'users'] = this.users;
json[r'hls_playlist_url'] = this.hlsPlaylistUrl;
json[r'capabilities_by_role'] = this.capabilitiesByRole;
json[r'notify_user'] = this.notifyUser;
json[r'user_id'] = this.userId;
json[r'message'] = this.message;
json[r'reaction'] = this.reaction;
json[r'recording_type'] = this.recordingType;
json[r'call_recording'] = this.callRecording;
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;
if (this.isTrimmed != null) {
json[r'is_trimmed'] = this.isTrimmed;
} else {
json[r'is_trimmed'] = null;
}
json[r'participants_overview'] = this.participantsOverview;
json[r'error'] = this.error;
json[r'call_transcription'] = this.callTranscription;
json[r'rating'] = this.rating;
if (this.sdk != null) {
json[r'sdk'] = this.sdk;
} else {
json[r'sdk'] = null;
}
if (this.sdkVersion != null) {
json[r'sdk_version'] = this.sdkVersion;
} else {
json[r'sdk_version'] = null;
}
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;
if (this.cid != null) {
json[r'cid'] = this.cid;
} else {
json[r'cid'] = null;
}
if (this.code != null) {
json[r'code'] = this.code;
} else {
json[r'code'] = null;
}
json[r'ingress_stream_id'] = this.ingressStreamId;
if (this.clientIp != null) {
json[r'client_ip'] = this.clientIp;
} else {
json[r'client_ip'] = null;
}
if (this.clientName != null) {
json[r'client_name'] = this.clientName;
} else {
json[r'client_name'] = null;
}
json[r'publisher_type'] = this.publisherType;
if (this.version != null) {
json[r'version'] = this.version;
} else {
json[r'version'] = null;
}
if (this.kickedByUser != null) {
json[r'kicked_by_user'] = this.kickedByUser;
} else {
json[r'kicked_by_user'] = null;
}
json[r'permissions'] = this.permissions;
json[r'own_capabilities'] = this.ownCapabilities;
json[r'channel_custom'] = this.channelCustom;
if (this.channelId != null) {
json[r'channel_id'] = this.channelId;
} else {
json[r'channel_id'] = null;
}
if (this.channelMemberCount != null) {
json[r'channel_member_count'] = this.channelMemberCount;
} else {
json[r'channel_member_count'] = null;
}
if (this.channelMessageCount != null) {
json[r'channel_message_count'] = this.channelMessageCount;
} else {
json[r'channel_message_count'] = null;
}
if (this.channelType != null) {
json[r'channel_type'] = this.channelType;
} else {
json[r'channel_type'] = null;
}
if (this.createdBy != null) {
json[r'created_by'] = this.createdBy;
} else {
json[r'created_by'] = null;
}
if (this.expiration != null) {
json[r'expiration'] = this.expiration!.toUtc().toIso8601String();
} else {
json[r'expiration'] = null;
}
if (this.shadow != null) {
json[r'shadow'] = this.shadow;
} else {
json[r'shadow'] = null;
}
if (this.team != null) {
json[r'team'] = this.team;
} else {
json[r'team'] = null;
}
if (this.totalBans != null) {
json[r'total_bans'] = this.totalBans;
} else {
json[r'total_bans'] = null;
}
json[r'delete_conversation'] = this.deleteConversation;
json[r'delete_conversation_channels'] = this.deleteConversationChannels;
json[r'delete_messages'] = this.deleteMessages;
json[r'delete_user'] = this.deleteUser;
json[r'hard_delete'] = this.hardDelete;
json[r'mark_messages_deleted'] = this.markMessagesDeleted;
return json;
}