toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'channel_id'] = this.channelId;
    json[r'channel_type'] = this.channelType;
    json[r'cid'] = this.cid;
    json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
    json[r'created_by'] = this.createdBy;
  if (this.expiration != null) {
    json[r'expiration'] = this.expiration!.toUtc().toIso8601String();
  } else {
    json[r'expiration'] = null;
  }
  if (this.reason != null) {
    json[r'reason'] = this.reason;
  } else {
    json[r'reason'] = null;
  }
    json[r'shadow'] = this.shadow;
  if (this.team != null) {
    json[r'team'] = this.team;
  } else {
    json[r'team'] = null;
  }
    json[r'type'] = this.type;
  if (this.user != null) {
    json[r'user'] = this.user;
  } else {
    json[r'user'] = null;
  }
  return json;
}