toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'actions'] = this.actions;
  if (this.assetUrl != null) {
    json[r'asset_url'] = this.assetUrl;
  } else {
    json[r'asset_url'] = null;
  }
  if (this.authorIcon != null) {
    json[r'author_icon'] = this.authorIcon;
  } else {
    json[r'author_icon'] = null;
  }
  if (this.authorLink != null) {
    json[r'author_link'] = this.authorLink;
  } else {
    json[r'author_link'] = null;
  }
  if (this.authorName != null) {
    json[r'author_name'] = this.authorName;
  } else {
    json[r'author_name'] = null;
  }
  if (this.color != null) {
    json[r'color'] = this.color;
  } else {
    json[r'color'] = null;
  }
    json[r'custom'] = this.custom;
  if (this.fallback != null) {
    json[r'fallback'] = this.fallback;
  } else {
    json[r'fallback'] = null;
  }
    json[r'fields'] = this.fields;
  if (this.footer != null) {
    json[r'footer'] = this.footer;
  } else {
    json[r'footer'] = null;
  }
  if (this.footerIcon != null) {
    json[r'footer_icon'] = this.footerIcon;
  } else {
    json[r'footer_icon'] = null;
  }
  if (this.giphy != null) {
    json[r'giphy'] = this.giphy;
  } else {
    json[r'giphy'] = null;
  }
  if (this.imageUrl != null) {
    json[r'image_url'] = this.imageUrl;
  } else {
    json[r'image_url'] = null;
  }
  if (this.ogScrapeUrl != null) {
    json[r'og_scrape_url'] = this.ogScrapeUrl;
  } else {
    json[r'og_scrape_url'] = null;
  }
  if (this.originalHeight != null) {
    json[r'original_height'] = this.originalHeight;
  } else {
    json[r'original_height'] = null;
  }
  if (this.originalWidth != null) {
    json[r'original_width'] = this.originalWidth;
  } else {
    json[r'original_width'] = null;
  }
  if (this.pretext != null) {
    json[r'pretext'] = this.pretext;
  } else {
    json[r'pretext'] = null;
  }
  if (this.text != null) {
    json[r'text'] = this.text;
  } else {
    json[r'text'] = null;
  }
  if (this.thumbUrl != null) {
    json[r'thumb_url'] = this.thumbUrl;
  } else {
    json[r'thumb_url'] = null;
  }
  if (this.title != null) {
    json[r'title'] = this.title;
  } else {
    json[r'title'] = null;
  }
  if (this.titleLink != null) {
    json[r'title_link'] = this.titleLink;
  } else {
    json[r'title_link'] = null;
  }
  if (this.type != null) {
    json[r'type'] = this.type;
  } else {
    json[r'type'] = null;
  }
  return json;
}