toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'post_id'] = this.postId;
    json[r'company_id'] = this.companyId;
  if (this.integrationId != null) {
    json[r'integration_id'] = this.integrationId;
  } else {
    json[r'integration_id'] = null;
  }
    json[r'platform'] = this.platform;
  if (this.externalPostId != null) {
    json[r'external_post_id'] = this.externalPostId;
  } else {
    json[r'external_post_id'] = null;
  }
  if (this.externalPostUrl != null) {
    json[r'external_post_url'] = this.externalPostUrl;
  } else {
    json[r'external_post_url'] = null;
  }
  if (this.publishedAt != null) {
    json[r'published_at'] = this.publishedAt!.toUtc().toIso8601String();
  } else {
    json[r'published_at'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  if (this.errorMessage != null) {
    json[r'error_message'] = this.errorMessage;
  } else {
    json[r'error_message'] = null;
  }
  return json;
}