job_id ?? null; if (isset($job_id)) { return "/_ml/anomaly_detectors/$job_id/results/overall_buckets"; } throw new RuntimeException('Missing parameter for the endpoint ml.get_overall_buckets'); } public function getParamWhitelist(): array { return [ 'top_n', 'bucket_span', 'overall_score', 'exclude_interim', 'start', 'end', 'allow_no_match', 'allow_no_jobs' ]; } public function getMethod(): string { return isset($this->body) ? 'POST' : 'GET'; } public function setBody($body): GetOverallBuckets { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } public function setJobId($job_id): GetOverallBuckets { if (isset($job_id) !== true) { return $this; } $this->job_id = $job_id; return $this; } }