toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (age != null) 'age': age!,
      if (createdBefore != null)
        'createdBefore':
            "${(createdBefore!).year.toString().padLeft(4, '0')}-${(createdBefore!).month.toString().padLeft(2, '0')}-${(createdBefore!).day.toString().padLeft(2, '0')}",
      if (customTimeBefore != null)
        'customTimeBefore':
            "${(customTimeBefore!).year.toString().padLeft(4, '0')}-${(customTimeBefore!).month.toString().padLeft(2, '0')}-${(customTimeBefore!).day.toString().padLeft(2, '0')}",
      if (daysSinceCustomTime != null)
        'daysSinceCustomTime': daysSinceCustomTime!,
      if (daysSinceNoncurrentTime != null)
        'daysSinceNoncurrentTime': daysSinceNoncurrentTime!,
      if (isLive != null) 'isLive': isLive!,
      if (matchesPattern != null) 'matchesPattern': matchesPattern!,
      if (matchesStorageClass != null)
        'matchesStorageClass': matchesStorageClass!,
      if (noncurrentTimeBefore != null)
        'noncurrentTimeBefore':
            "${(noncurrentTimeBefore!).year.toString().padLeft(4, '0')}-${(noncurrentTimeBefore!).month.toString().padLeft(2, '0')}-${(noncurrentTimeBefore!).day.toString().padLeft(2, '0')}",
      if (numNewerVersions != null) 'numNewerVersions': numNewerVersions!,
    };