toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() {
  return {
    'logName': logName,
    if (resource != null) 'resource': resource!.toJson(),
    if (protoPayload != null) 'protoPayload': protoPayload!.toJson(),
    if (textPayload != null) 'textPayload': textPayload,
    if (jsonPayload != null) 'jsonPayload': jsonPayload!.toJson(),
    if (timestamp != null) 'timestamp': timestamp!.toJson(),
    if (receiveTimestamp != null)
      'receiveTimestamp': receiveTimestamp!.toJson(),
    if (severity.isNotDefault) 'severity': severity.toJson(),
    if (insertId.isNotDefault) 'insertId': insertId,
    if (httpRequest != null) 'httpRequest': httpRequest!.toJson(),
    if (labels.isNotDefault) 'labels': labels,
    if (operation != null) 'operation': operation!.toJson(),
    if (trace.isNotDefault) 'trace': trace,
    if (spanId.isNotDefault) 'spanId': spanId,
    if (traceSampled.isNotDefault) 'traceSampled': traceSampled,
    if (sourceLocation != null) 'sourceLocation': sourceLocation!.toJson(),
    if (split != null) 'split': split!.toJson(),
  };
}