id ?? null; if (isset($id)) { return "/_ingest/pipeline/$id/_simulate"; } return "/_ingest/pipeline/_simulate"; } public function getParamWhitelist(): array { return [ 'verbose' ]; } public function getMethod(): string { return isset($this->body) ? 'POST' : 'GET'; } public function setBody($body): Simulate { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } }