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