index ?? null; if (isset($index)) { return "/$index/_settings"; } return "/_settings"; } public function getParamWhitelist(): array { return [ 'master_timeout', 'timeout', 'preserve_existing', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'cluster_manager_timeout' ]; } public function getMethod(): string { return 'PUT'; } public function setBody($body): PutSettings { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } protected function getParamDeprecation(): array { return ['master_timeout' => 'cluster_manager_timeout']; } }