job_id ?? null; if (isset($job_id)) { return "/_ml/anomaly_detectors/$job_id/_forecast"; } throw new RuntimeException('Missing parameter for the endpoint ml.forecast'); } public function getParamWhitelist(): array { return [ 'duration', 'expires_in', 'max_model_memory' ]; } public function getMethod(): string { return 'POST'; } public function setJobId($job_id): Forecast { if (isset($job_id) !== true) { return $this; } $this->job_id = $job_id; return $this; } }