toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var htmlBody = this.htmlBody;
  var restrict = this.restrict;
  var subject = this.subject;
  var textBody = this.textBody;
  var to = this.to;

  final json = <String, Object?>{};
  if (htmlBody != null) {
    json[r'htmlBody'] = htmlBody;
  }
  if (restrict != null) {
    json[r'restrict'] = restrict.toJson();
  }
  if (subject != null) {
    json[r'subject'] = subject;
  }
  if (textBody != null) {
    json[r'textBody'] = textBody;
  }
  if (to != null) {
    json[r'to'] = to.toJson();
  }
  return json;
}