public function validateForUsage($sourceObject, $propertiesToSkip = array())
 {
     parent::validateForUsage($sourceObject, $propertiesToSkip);
     if (isset($this->cuePointSubTypeEqual) && !isset($this->cuePointTypeIn)) {
         throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, $this->getFormattedPropertyNameWithClassName('cuePointSubTypeEqual'));
     }
 }
 public function validateForUsage($sourceObject, $propertiesToSkip = array())
 {
     parent::validateForUsage($sourceObject, $propertiesToSkip);
     $categoriesMatchOrIsNull = is_null($this->categoriesMatchOr);
     $categoryIdEqualIsNull = is_null($this->categoryIdEqual);
     $orderByIsNull = is_null($this->orderBy);
     if ($categoriesMatchOrIsNull && $categoryIdEqualIsNull) {
         // Leaving the condition here in order to emphasis that it is allowed
         // in order not to break backward-compatibility
     } else {
         if (!$categoriesMatchOrIsNull && !$categoryIdEqualIsNull) {
             throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_ALL_MUST_BE_NULL_BUT_ONE, "categoriesMatchOr / categoryIdEqual");
         } else {
             if (!$orderByIsNull && !$categoriesMatchOrIsNull) {
                 // categoriesMatchOr may yield a hierarchy of category entries, thus may not be used in conjunction with orderBy
                 throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_ALL_MUST_BE_NULL_BUT_ONE, "categoriesMatchOr / orderBy");
             }
         }
     }
 }