toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.channel != null) {
    json[r'channel'] = this.channel;
  } else {
    json[r'channel'] = 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;
  }
  if (this.expires != null) {
    json[r'expires'] = this.expires!.toUtc().toIso8601String();
  } else {
    json[r'expires'] = null;
  }
  if (this.reason != null) {
    json[r'reason'] = this.reason;
  } else {
    json[r'reason'] = null;
  }
    json[r'shadow'] = this.shadow;
  if (this.target != null) {
    json[r'target'] = this.target;
  } else {
    json[r'target'] = null;
  }
  return json;
}