toJson method
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'participant'] = this.participant;
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;
json[r'cid'] = this.cid;
if (this.item != null) {
json[r'item'] = this.item;
} else {
json[r'item'] = null;
}
if (this.message != null) {
json[r'message'] = this.message;
} else {
json[r'message'] = null;
}
if (this.objectId != null) {
json[r'object_id'] = this.objectId;
} else {
json[r'object_id'] = null;
}
json[r'permissions'] = this.permissions;
json[r'own_capabilities'] = this.ownCapabilities;
json[r'channel_id'] = this.channelId;
json[r'channel_type'] = this.channelType;
json[r'created_by'] = this.createdBy;
if (this.expiration != null) {
json[r'expiration'] = this.expiration!.toUtc().toIso8601String();
} else {
json[r'expiration'] = null;
}
json[r'shadow'] = this.shadow;
if (this.team != null) {
json[r'team'] = this.team;
} else {
json[r'team'] = null;
}
json[r'delete_conversation_channels'] = this.deleteConversationChannels;
json[r'hard_delete'] = this.hardDelete;
json[r'mark_messages_deleted'] = this.markMessagesDeleted;
if (this.targetUser != null) {
json[r'target_user'] = this.targetUser;
} else {
json[r'target_user'] = null;
}
json[r'target_users'] = this.targetUsers;
return json;
}