toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final category = this.category;
  final lastObservedAt = this.lastObservedAt;
  final source = this.source;
  final sourceUrl = this.sourceUrl;
  final type = this.type;
  final value = this.value;
  return {
    if (category != null) 'Category': category.toValue(),
    if (lastObservedAt != null) 'LastObservedAt': lastObservedAt,
    if (source != null) 'Source': source,
    if (sourceUrl != null) 'SourceUrl': sourceUrl,
    if (type != null) 'Type': type.toValue(),
    if (value != null) 'Value': value,
  };
}