toJson method
Implementation
@override
Object toJson() => {
if (exec case final exec?) 'exec': exec.toJson(),
if (httpGet case final httpGet?) 'httpGet': httpGet.toJson(),
if (grpc case final grpc?) 'grpc': grpc.toJson(),
if (tcpSocket case final tcpSocket?) 'tcpSocket': tcpSocket.toJson(),
if (periodSeconds.isNotDefault) 'periodSeconds': periodSeconds,
if (timeoutSeconds.isNotDefault) 'timeoutSeconds': timeoutSeconds,
if (failureThreshold.isNotDefault) 'failureThreshold': failureThreshold,
if (successThreshold.isNotDefault) 'successThreshold': successThreshold,
if (initialDelaySeconds.isNotDefault)
'initialDelaySeconds': initialDelaySeconds,
};