throw new RuntimeException("The headers key/value pairs should be passed as a map.");
}
break;
case "retryOptions":
if (value instanceof Map) {
RetryOptions retryOptions = RetryOptions.Builder.withDefaults();
for (Entry<String, Object> option : ((Map<String, Object>)value).entrySet()) {
switch (option.getKey()) {
case "taskRetryLimit":
retryOptions.taskRetryLimit(((Number)option.getValue()).intValue());
break;
case "taskAgeLimitSeconds":
retryOptions.taskAgeLimitSeconds(((Number)option.getValue()).intValue());
break;
case "minBackoffSeconds":
retryOptions.minBackoffSeconds(((Number)option.getValue()).intValue());
break;
case "maxBackoffSeconds":
retryOptions.maxBackoffSeconds(((Number)option.getValue()).intValue());
break;
case "maxDoublings":
retryOptions.maxDoublings(((Number)option.getValue()).intValue());
break;
default:
throw new RuntimeException(option.getKey() + " is not a valid retry option parameter.");
}
}