toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (stringValue != null) {
    json[r'stringValue'] = stringValue;
  }
  if (numberValue != null) {
    json[r'numberValue'] = numberValue;
  }
  if (booleanValue != null) {
    json[r'booleanValue'] = booleanValue;
  }
  if (instantValue != null) {
    json[r'instantValue'] = instantValue!.toUtc().toIso8601String();
  }
  if (fuzzyDateValue != null) {
    json[r'fuzzyDateValue'] = fuzzyDateValue;
  }
  if (binaryValue != null) {
    json[r'binaryValue'] = binaryValue;
  }
  if (documentId != null) {
    json[r'documentId'] = documentId;
  }
  if (measureValue != null) {
    json[r'measureValue'] = measureValue;
  }
  if (timeSeries != null) {
    json[r'timeSeries'] = timeSeries;
  }
  json[r'compoundValue'] = compoundValue;
  json[r'ratio'] = ratio;
  json[r'range'] = range;
  return json;
}