private function cleanIdFn()
{
return function (callable $handler) {
return function (CommandInterface $c, RequestInterface $r = null) use($handler) {
foreach (['Id', 'HostedZoneId', 'DelegationSetId'] as $clean) {
if ($c->hasParam($clean)) {
$c[$clean] = $this->cleanId($c[$clean]);
}
}
return $handler($c, $r);
};
};
}