index ?? null; if (isset($index)) { return "/$index/_mapping"; } throw new RuntimeException('Missing parameter for the endpoint indices.put_mapping'); } public function getParamWhitelist(): array { return [ 'timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'write_index_only', 'cluster_manager_timeout' ]; } public function getMethod(): string { return 'PUT'; } public function setBody($body): PutMapping { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } protected function getParamDeprecation(): array { return ['master_timeout' => 'cluster_manager_timeout']; } }