toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
  json[r'custom'] = this.custom;
  if (this.entityCreatorId != null) {
    json[r'entity_creator_id'] = this.entityCreatorId;
  } else {
    json[r'entity_creator_id'] = null;
  }
  json[r'entity_id'] = this.entityId;
  json[r'entity_type'] = this.entityType;
  json[r'labels'] = this.labels;
  if (this.moderationPayload != null) {
    json[r'moderation_payload'] = this.moderationPayload;
  } else {
    json[r'moderation_payload'] = null;
  }
  if (this.moderationPayloadHash != null) {
    json[r'moderation_payload_hash'] = this.moderationPayloadHash;
  } else {
    json[r'moderation_payload_hash'] = null;
  }
  if (this.reason != null) {
    json[r'reason'] = this.reason;
  } else {
    json[r'reason'] = null;
  }
  json[r'result'] = this.result;
  if (this.reviewQueueItemId != null) {
    json[r'review_queue_item_id'] = this.reviewQueueItemId;
  } else {
    json[r'review_queue_item_id'] = null;
  }
  if (this.type != null) {
    json[r'type'] = this.type;
  } else {
    json[r'type'] = null;
  }
  json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
  if (this.user != null) {
    json[r'user'] = this.user;
  } else {
    json[r'user'] = null;
  }
  return json;
}