toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'user_id'] = this.userId;
json[r'company_id'] = this.companyId;
json[r'title'] = this.title;
if (this.category != null) {
json[r'category'] = this.category;
} else {
json[r'category'] = null;
}
if (this.teaser != null) {
json[r'teaser'] = this.teaser;
} else {
json[r'teaser'] = null;
}
json[r'content_html'] = this.contentHtml;
if (this.insightsUsed != null) {
json[r'insights_used'] = this.insightsUsed;
} else {
json[r'insights_used'] = null;
}
if (this.generationCreativity != null) {
json[r'generation_creativity'] = this.generationCreativity;
} else {
json[r'generation_creativity'] = null;
}
if (this.generationTargetWordCount != null) {
json[r'generation_target_word_count'] = this.generationTargetWordCount;
} else {
json[r'generation_target_word_count'] = null;
}
if (this.generationTone != null) {
json[r'generation_tone'] = this.generationTone;
} else {
json[r'generation_tone'] = null;
}
if (this.generationIncludeCitations != null) {
json[r'generation_include_citations'] = this.generationIncludeCitations;
} else {
json[r'generation_include_citations'] = null;
}
if (this.generationSubheadingCount != null) {
json[r'generation_subheading_count'] = this.generationSubheadingCount;
} else {
json[r'generation_subheading_count'] = null;
}
if (this.generationTemperature != null) {
json[r'generation_temperature'] = this.generationTemperature;
} else {
json[r'generation_temperature'] = null;
}
if (this.dataCostCredits != null) {
json[r'data_cost_credits'] = this.dataCostCredits;
} else {
json[r'data_cost_credits'] = null;
}
if (this.serviceCostCredits != null) {
json[r'service_cost_credits'] = this.serviceCostCredits;
} else {
json[r'service_cost_credits'] = null;
}
if (this.totalCostCredits != null) {
json[r'total_cost_credits'] = this.totalCostCredits;
} else {
json[r'total_cost_credits'] = null;
}
if (this.successfulInsightsCount != null) {
json[r'successful_insights_count'] = this.successfulInsightsCount;
} else {
json[r'successful_insights_count'] = null;
}
if (this.failedInsightsCount != null) {
json[r'failed_insights_count'] = this.failedInsightsCount;
} else {
json[r'failed_insights_count'] = null;
}
if (this.generationTimeMs != null) {
json[r'generation_time_ms'] = this.generationTimeMs;
} else {
json[r'generation_time_ms'] = null;
}
if (this.isPublished != null) {
json[r'is_published'] = this.isPublished;
} else {
json[r'is_published'] = null;
}
if (this.publishedAt != null) {
json[r'published_at'] = this.publishedAt!.toUtc().toIso8601String();
} else {
json[r'published_at'] = null;
}
if (this.viewCount != null) {
json[r'view_count'] = this.viewCount;
} else {
json[r'view_count'] = null;
}
if (this.lastEditedAt != null) {
json[r'last_edited_at'] = this.lastEditedAt!.toUtc().toIso8601String();
} else {
json[r'last_edited_at'] = null;
}
return json;
}