toJson method
Implementation
@override
Object toJson() => {
'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(),
};