public function __construct(\SimpleXMLElement $xml = null)
 {
     parent::__construct($xml);
     if (is_null($xml)) {
         return;
     }
     $this->format = (string) $xml->format;
     $this->subject = (string) $xml->subject;
     $this->body = (string) $xml->body;
     $this->fromEmail = (string) $xml->fromEmail;
     $this->fromName = (string) $xml->fromName;
     if (!empty($xml->to)) {
         $this->to = \Kaltura\Client\ParseUtils::unmarshalObject($xml->to, "KalturaEmailNotificationRecipientProvider");
     }
     if (!empty($xml->cc)) {
         $this->cc = \Kaltura\Client\ParseUtils::unmarshalObject($xml->cc, "KalturaEmailNotificationRecipientProvider");
     }
     if (!empty($xml->bcc)) {
         $this->bcc = \Kaltura\Client\ParseUtils::unmarshalObject($xml->bcc, "KalturaEmailNotificationRecipientProvider");
     }
     if (!empty($xml->replyTo)) {
         $this->replyTo = \Kaltura\Client\ParseUtils::unmarshalObject($xml->replyTo, "KalturaEmailNotificationRecipientProvider");
     }
     if (count($xml->priority)) {
         $this->priority = (int) $xml->priority;
     }
     $this->confirmReadingTo = (string) $xml->confirmReadingTo;
     $this->hostname = (string) $xml->hostname;
     $this->messageID = (string) $xml->messageID;
     if (empty($xml->customHeaders)) {
         $this->customHeaders = array();
     } else {
         $this->customHeaders = \Kaltura\Client\ParseUtils::unmarshalArray($xml->customHeaders, "KalturaKeyValue");
     }
 }
 public function __construct(\SimpleXMLElement $xml = null)
 {
     parent::__construct($xml);
     if (is_null($xml)) {
         return;
     }
     $this->url = (string) $xml->url;
     if (count($xml->method)) {
         $this->method = (int) $xml->method;
     }
     if (!empty($xml->data)) {
         $this->data = \Kaltura\Client\ParseUtils::unmarshalObject($xml->data, "KalturaHttpNotificationData");
     }
     if (count($xml->timeout)) {
         $this->timeout = (int) $xml->timeout;
     }
     if (count($xml->connectTimeout)) {
         $this->connectTimeout = (int) $xml->connectTimeout;
     }
     $this->username = (string) $xml->username;
     $this->password = (string) $xml->password;
     if (count($xml->authenticationMethod)) {
         $this->authenticationMethod = (int) $xml->authenticationMethod;
     }
     if (count($xml->sslVersion)) {
         $this->sslVersion = (int) $xml->sslVersion;
     }
     $this->sslCertificate = (string) $xml->sslCertificate;
     $this->sslCertificateType = (string) $xml->sslCertificateType;
     $this->sslCertificatePassword = (string) $xml->sslCertificatePassword;
     $this->sslEngine = (string) $xml->sslEngine;
     $this->sslEngineDefault = (string) $xml->sslEngineDefault;
     $this->sslKeyType = (string) $xml->sslKeyType;
     $this->sslKey = (string) $xml->sslKey;
     $this->sslKeyPassword = (string) $xml->sslKeyPassword;
     if (empty($xml->customHeaders)) {
         $this->customHeaders = array();
     } else {
         $this->customHeaders = \Kaltura\Client\ParseUtils::unmarshalArray($xml->customHeaders, "KalturaKeyValue");
     }
 }
 /**
  * Update an existing event notification template object
  * 	 
  * 
  * @return \Kaltura\Client\Plugin\EventNotification\Type\EventNotificationTemplate
  */
 function update($id, \Kaltura\Client\Plugin\EventNotification\Type\EventNotificationTemplate $eventNotificationTemplate)
 {
     $kparams = array();
     $this->client->addParam($kparams, "id", $id);
     $this->client->addParam($kparams, "eventNotificationTemplate", $eventNotificationTemplate->toParams());
     $this->client->queueServiceActionCall("eventnotification_eventnotificationtemplate", "update", "KalturaEventNotificationTemplate", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = \Kaltura\Client\ParseUtils::unmarshalObject($resultXmlObject->result, "KalturaEventNotificationTemplate");
     $this->client->validateObjectType($resultObject, "\\Kaltura\\Client\\Plugin\\EventNotification\\Type\\EventNotificationTemplate");
     return $resultObject;
 }