toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (exec != null) 'exec': exec!.toJson(),
  if (httpGet != null) 'httpGet': httpGet!.toJson(),
  if (grpc != null) 'grpc': grpc!.toJson(),
  if (tcpSocket != null) '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,
};