toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  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.cid != null) {
    json[r'cid'] = this.cid;
  } else {
    json[r'cid'] = null;
  }
  json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  if (this.createdBy != null) {
    json[r'created_by'] = this.createdBy;
  } else {
    json[r'created_by'] = null;
  }
  json[r'custom'] = this.custom;
  if (this.receivedAt != null) {
    json[r'received_at'] = this.receivedAt!.toUtc().toIso8601String();
  } else {
    json[r'received_at'] = 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;
  }
  json[r'type'] = this.type;
  json[r'user'] = this.user;
  return json;
}