public function describeSnapshots(ListDataType $snapshotIdList = null, ListDataType $ownerList = null, SnapshotFilterList $filter = null, ListDataType $restorableByList = null, $nextToken = null, $maxResults = null)
{
$result = null;
$options = [];
if ($snapshotIdList !== null) {
$options = array_merge($options, $snapshotIdList->getQueryArrayBare('SnapshotId'));
}
if ($ownerList !== null) {
$options = array_merge($options, $ownerList->getQueryArrayBare('Owner'));
}
if ($restorableByList !== null) {
$options = array_merge($options, $restorableByList->getQueryArrayBare('RestorableBy'));
}
if ($filter !== null) {
$options = array_merge($options, $filter->getQueryArrayBare('Filter'));
}
if ($nextToken !== null) {
$options['NextToken'] = (string) $nextToken;
}
if ($maxResults !== null) {
$options['MaxResults'] = (int) $maxResults;
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
$response = null;
$result = new SnapshotList();
$result->setEc2($this->ec2);
$result->setRequestId((string) $sxml->requestId);
$result->setNextToken($this->exist($sxml->nextToken) ? (string) $sxml->nextToken : null);
if (!empty($sxml->snapshotSet->item)) {
foreach ($sxml->snapshotSet->item as $v) {
$item = $this->_loadSnapshotData($v);
$result->append($item);
unset($item);
}
}
}
return $result;
}