public function describeSubnets(ListDataType $subnetIdList = null, SubnetFilterList $filter = null)
{
$result = null;
$options = array();
if ($subnetIdList !== null) {
$options = array_merge($options, $subnetIdList->getQueryArrayBare('SubnetId'));
}
if ($filter !== null) {
$options = array_merge($options, $filter->getQueryArrayBare('Filter'));
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
$response = null;
$result = new SubnetList();
$result->setEc2($this->ec2);
$result->setRequestId((string) $sxml->requestId);
if (isset($sxml->subnetSet->item)) {
foreach ($sxml->subnetSet->item as $v) {
$item = $this->_loadSubnetData($v);
$result->append($item);
unset($item);
}
}
}
return $result;
}