protected function _loadNetworkInterfaceData(\SimpleXMLElement $v)
{
$item = null;
if ($this->exist($v)) {
$newtorkInterfaceId = (string) $v->networkInterfaceId;
$item = $this->ec2->getEntityManagerEnabled() ? $this->ec2->networkInterface->get($newtorkInterfaceId) : null;
if ($item === null) {
$item = new NetworkInterfaceData();
$item->setEc2($this->ec2);
$bAttach = true;
} else {
$item->resetObject();
$bAttach = false;
}
$item->networkInterfaceId = $newtorkInterfaceId;
$item->availabilityZone = $this->exist($v->availabilityZone) ? (string) $v->availabilityZone : null;
$item->description = $this->exist($v->description) ? (string) $v->description : null;
$item->macAddress = (string) $v->macAddress;
$item->ownerId = (string) $v->ownerId;
$item->privateDnsName = $this->exist($v->privateDnsName) ? (string) $v->privateDnsName : null;
$item->privateIpAddress = (string) $v->privateIpAddress;
$item->requesterId = $this->exist($v->requesterId) ? (string) $v->requesterId : null;
$item->requesterManaged = $this->exist($v->requesterManaged) ? (string) $v->requesterManaged : null;
$item->sourceDestCheck = (string) $v->sourceDestCheck == 'true';
$item->status = (string) $v->status;
$item->subnetId = $this->exist($v->subnetId) ? (string) $v->subnetId : null;
$item->vpcId = $this->exist($v->vpcId) ? (string) $v->vpcId : null;
$item->setAssociation($this->_loadNetworkInterfaceAssociationData($v->association))->setAttachment($this->_loadNetworkInterfaceAttachmentData($v->attachment))->setGroupSet($this->_loadGroupList($v->groupSet))->setTagSet($this->_loadResourceTagSetList($v->tagSet))->setPrivateIpAddressesSet($this->_loadListByName('NetworkInterfacePrivateIpAddressesSet', $v->privateIpAddressesSet));
if ($bAttach && $this->ec2->getEntityManagerEnabled()) {
$this->getEntityManager()->attach($item);
}
}
return $item;
}