/**
  * Creates a new instance of the SnsNotificationMetadata
  * object, initialized from the Message
  * 
  * @param message              $message                    message for SNS
  * @param NotificationMetadata $parentNotificationMetadata parent message if 
  *                                                         applicable otherwise 
  *                                                         null
  * 
  * @throws OffAmazonPaymentsNotifications_InvalidMessageException invalid message
  * 
  * @return void
  */
 public function __construct(Message $message, NotificationMetadata $parentNotificationMetadata = null)
 {
     $this->_timestamp = $message->getMandatoryField("Timestamp");
     $this->_topicArn = $message->getMandatoryField("TopicArn");
     $this->_messageId = $message->getMandatoryField("MessageId");
     parent::__construct($parentNotificationMetadata);
 }
 /**
  * Creates a new instance of the IPNNotificationMetadata
  * object, initialized from the Message
  * 
  * @param message                                             $message                    message for IPN
  * @param OffAmazonPaymentsNotifications_NotificationMetadata $parentNotificationMetadata parent message if 
  *                                                                                        applicable otherwise 
  *                                                                                        null
  * 
  * @throws OffAmazonPaymentsNotifications_InvalidMessageException invalid message
  * 
  * @return void
  */
 public function __construct(Message $message, OffAmazonPaymentsNotifications_NotificationMetadata $parentNotificationMetadata = null)
 {
     $this->_timestamp = $message->getMandatoryField("Timestamp");
     $this->_releaseEnvironment = $message->getMandatoryField("ReleaseEnvironment");
     $this->_notificationReferenceId = $message->getMandatoryField("NotificationReferenceId");
     parent::__construct($parentNotificationMetadata);
 }