/**
  * @covers MicrosoftAzure\Storage\Common\Internal\Validate::isDate
  */
 public function testIsDateWithNonDate()
 {
     $this->setExpectedException(get_class(new InvalidArgumentTypeException('DateTime')));
     Validate::isDate('not date');
 }
 /**
  * Sets blob lastModified.
  *
  * @param \DateTime $lastModified value.
  *
  * @return none.
  */
 public function setLastModified($lastModified)
 {
     Validate::isDate($lastModified);
     $this->_lastModified = $lastModified;
 }
 /**
  * Returns an access condition such that an operation will be performed only if
  * the resource has not been modified since the specified time.
  * <p>
  * Setting this access condition modifies the request to include the HTTP 
  * <i>If-Unmodified-Since</i> conditional header. If this access condition is
  * set, the operation is performed only if the resource has not been modified 
  * since the specified time.
  * <p>
  * For more information, see
  * <a href= 'http://go.microsoft.com/fwlink/?LinkID=224642&clcid=0x409'>
  * Specifying Conditional Headers for Blob Service Operations</a>.
  *
  * @param \DateTime $lastModified date that represents the last-modified
  * time to check for the resource.
  *
  * @return \MicrosoftAzure\Storage\Blob\Models\AccessCondition
  */
 public static function ifNotModifiedSince($lastModified)
 {
     Validate::isDate($lastModified);
     return new AccessCondition(Resources::IF_UNMODIFIED_SINCE, $lastModified);
 }
 /**
  * Sets expiry.
  *
  * @param \DateTime $expiry value.
  * 
  * @return none.
  */
 public function setExpiry($expiry)
 {
     Validate::isDate($expiry);
     $this->_expiry = $expiry;
 }
 /**
  * Sets timeNextVisible field.
  * 
  * @param \DateTime $timeNextVisible A UTC date/time value that represents when 
  * the message will be visible on the queue.
  * 
  * @return none.
  */
 public function setTimeNextVisible($timeNextVisible)
 {
     Validate::isDate($timeNextVisible);
     $this->_timeNextVisible = $timeNextVisible;
 }
 /**
  * Adds new signed modifier
  * 
  * @param string    $id         a unique id for this modifier
  * @param \DateTime $start      The time at which the Shared Access Signature
  * becomes valid. If omitted, start time for this call is assumed to be
  * the time when the Blob service receives the request.
  * @param \DateTime $expiry     The time at which the Shared Access Signature
  * becomes invalid. This field may be omitted if it has been specified as
  * part of a container-level access policy.
  * @param string    $permission The permissions associated with the Shared
  * Access Signature. The user is restricted to operations allowed by the
  * permissions. Valid permissions values are read (r), write (w), delete (d) and
  * list (l).
  * 
  * @return none.
  * 
  * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh508996.aspx
  */
 public function addSignedIdentifier($id, $start, $expiry, $permission)
 {
     Validate::isString($id, 'id');
     Validate::isDate($start);
     Validate::isDate($expiry);
     Validate::isString($permission, 'permission');
     $accessPolicy = new AccessPolicy();
     $accessPolicy->setStart($start);
     $accessPolicy->setExpiry($expiry);
     $accessPolicy->setPermission($permission);
     $signedIdentifier = new SignedIdentifier();
     $signedIdentifier->setId($id);
     $signedIdentifier->setAccessPolicy($accessPolicy);
     $this->_signedIdentifiers[] = $signedIdentifier;
 }