/**
  * Creates a queue description object with specified XML string.
  *
  * @param string $queueDescriptionXml A XML based string describing
  * the queue. 
  * 
  * @return none
  */
 public static function create($queueDescriptionXml)
 {
     $queueDescription = new QueueDescription();
     $root = simplexml_load_string($queueDescriptionXml);
     $queueDescriptionArray = (array) $root;
     if (array_key_exists('LockDuration', $queueDescriptionArray)) {
         $queueDescription->setLockDuration((string) $queueDescriptionArray['LockDuration']);
     }
     if (array_key_exists('MaxSizeInMegabytes', $queueDescriptionArray)) {
         $queueDescription->setMaxSizeInMegabytes((int) $queueDescriptionArray['MaxSizeInMegabytes']);
     }
     if (array_key_exists('RequiresDuplicateDetection', $queueDescriptionArray)) {
         $queueDescription->setRequiresDuplicateDetection((bool) $queueDescriptionArray['RequiresDuplicateDetection']);
     }
     if (array_key_exists('RequiresSession', $queueDescriptionArray)) {
         $queueDescription->setRequiresSession((bool) $queueDescriptionArray['RequiresSession']);
     }
     if (array_key_exists('DefaultMessageTimeToLive', $queueDescriptionArray)) {
         $queueDescription->setDefaultMessageTimeToLive((string) $queueDescriptionArray['DefaultMessageTimeToLive']);
     }
     if (array_key_exists('DeadLetteringOnMessageExpiration', $queueDescriptionArray)) {
         $queueDescription->setDeadLetteringOnMessageExpiration((string) $queueDescriptionArray['DeadLetteringOnMessageExpiration']);
     }
     if (array_key_exists('DuplicateDetectionHistoryTimeWindow', $queueDescriptionArray)) {
         $queueDescription->setDuplicateDetectionHistoryTimeWindow((string) $queueDescriptionArray['DuplicateDetectionHistoryTimeWindow']);
     }
     if (array_key_exists('MaxDeliveryCount', $queueDescriptionArray)) {
         $queueDescription->setMaxDeliveryCount((int) $queueDescriptionArray['MaxDeliveryCount']);
     }
     if (array_key_exists('EnableBatchedOperations', $queueDescriptionArray)) {
         $queueDescription->setEnableBatchedOperations((bool) $queueDescriptionArray['EnableBatchedOperations']);
     }
     if (array_key_exists('SizeInBytes', $queueDescriptionArray)) {
         $queueDescription->setSizeInBytes((int) $queueDescriptionArray['SizeInBytes']);
     }
     if (array_key_exists('MessageCount', $queueDescriptionArray)) {
         $queueDescription->setMessageCount((int) $queueDescriptionArray['MessageCount']);
     }
     return $queueDescription;
 }
 /**
  * Sets the duplicate detection history time window.
  *
  * @param string $duplicateDetectionHistoryTimeWindow The duplicate
  * detection history time window.
  * 
  * @return none
  */
 public function setDuplicateDetectionHistoryTimeWindow($duplicateDetectionHistoryTimeWindow)
 {
     $this->_queueDescription->setDuplicateDetectionHistoryTimeWindow($duplicateDetectionHistoryTimeWindow);
 }
 /** 
  * @covers WindowsAzure\ServiceBus\Models\QueueDescription::getDuplicateDetectionHistoryTimeWindow
  * @covers WindowsAzure\ServiceBus\Models\QueueDescription::setDuplicateDetectionHistoryTimeWindow
  */
 public function testGetSetDuplicateDetectionHistoryTimeWindow()
 {
     // Setup
     $expected = 'testDuplicateDetectionHistoryTimeWindow';
     $queueDescription = new QueueDescription();
     // Test
     $queueDescription->setDuplicateDetectionHistoryTimeWindow($expected);
     $actual = $queueDescription->getDuplicateDetectionHistoryTimeWindow();
     // Assert
     $this->assertEquals($expected, $actual);
 }