public function index($params = [], $optParams = [])
    {
        if ($optParams instanceof IndexParams) {
            $optParams = $optParams->toArray(true);
        }
        if (is_string($params)) {
            $params = ['cloudId' => $params];
        }

        return $this->sendRequest(['cloudId'], [
            'restAction' => 'index',
            'uri' => '/c/<cloudId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) use ($params) {
            $images = [];
            foreach ($response->data['items'] as $image) {
                if (!isset($image['cloudId'])) {
                    $image['cloudId'] = $this->client->getParam($params, 'cloudId');
                }
                $images[] = new Image($image);
            }

            return new Index([
                'models' => $images,
                'nextPageToken' => $response->data['nextPageToken'],
            ]);
        });
    }