repository ?? null; $snapshot = $this->snapshot ?? null; if (isset($repository) && isset($snapshot)) { return "/_snapshot/$repository/$snapshot"; } throw new RuntimeException('Missing parameter for the endpoint snapshot.get'); } public function getParamWhitelist(): array { return [ 'master_timeout', 'ignore_unavailable', 'index_details', 'include_repository', 'verbose' ]; } public function getMethod(): string { return 'GET'; } public function setRepository($repository): Get { if (isset($repository) !== true) { return $this; } $this->repository = $repository; return $this; } public function setSnapshot($snapshot): Get { if (isset($snapshot) !== true) { return $this; } if (is_array($snapshot) === true) { $snapshot = implode(",", $snapshot); } $this->snapshot = $snapshot; return $this; } }