id) !== true) { throw new RuntimeException( 'id is required for put_script' ); } $id = $this->id; $context = $this->context ?? null; if (isset($context)) { return "/_scripts/$id/$context"; } return "/_scripts/$id"; } public function getParamWhitelist(): array { return [ 'timeout', 'master_timeout', 'context', 'cluster_manager_timeout' ]; } public function getMethod(): string { return 'PUT'; } public function setBody($body): PutScript { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } public function setContext($context): PutScript { if (isset($context) !== true) { return $this; } $this->context = $context; return $this; } protected function getParamDeprecation(): array { return ['master_timeout' => 'cluster_manager_timeout']; } }