index ?? null; $block = $this->block ?? null; if (isset($index) && isset($block)) { return "/$index/_block/$block"; } throw new RuntimeException('Missing parameter for the endpoint indices.add_block'); } public function getParamWhitelist(): array { return [ 'timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards' ]; } public function getMethod(): string { return 'PUT'; } public function setBlock($block): AddBlock { if (isset($block) !== true) { return $this; } $this->block = $block; return $this; } }