job_id ?? null; if (isset($job_id)) { return "/_ml/anomaly_detectors/$job_id"; } throw new RuntimeException('Missing parameter for the endpoint ml.put_job'); } public function getParamWhitelist(): array { return [ 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards' ]; } public function getMethod(): string { return 'PUT'; } public function setBody($body): PutJob { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } public function setJobId($job_id): PutJob { if (isset($job_id) !== true) { return $this; } $this->job_id = $job_id; return $this; } }