class Kaltura::KalturaRule

Attributes

actions[RW]

Actions to be performed by the player in case the rule is fulfilled

code[RW]

Code to be thrown to the player in case the rule is fulfilled

conditions[RW]

Conditions to validate the rule

contexts[RW]

Indicates what contexts should be tested by this rule

description[RW]

Short Rule Description

force_admin_validation[RW]

Indicates if we should force ks validation for admin ks users as well

message[RW]

Message to be thrown to the player in case the rule is fulfilled

rule_data[RW]

Rule Custom Data to allow saving rule specific information

stop_processing[RW]

Indicates that this rule is enough and no need to continue checking the rest of the rules

Public Instance Methods

force_admin_validation=(val) click to toggle source
# File lib/kaltura_types.rb, line 227
def force_admin_validation=(val)
        @force_admin_validation = val.to_i
end
from_xml(xml_element) click to toggle source
Calls superclass method Kaltura::KalturaObjectBase#from_xml
# File lib/kaltura_types.rb, line 231
def from_xml(xml_element)
        super
        if xml_element.elements['description'] != nil
                self.description = xml_element.elements['description'].text
        end
        if xml_element.elements['ruleData'] != nil
                self.rule_data = xml_element.elements['ruleData'].text
        end
        if xml_element.elements['message'] != nil
                self.message = xml_element.elements['message'].text
        end
        if xml_element.elements['code'] != nil
                self.code = xml_element.elements['code'].text
        end
        if xml_element.elements['actions'] != nil
                self.actions = KalturaClientBase.object_from_xml(xml_element.elements['actions'], 'KalturaRuleAction')
        end
        if xml_element.elements['conditions'] != nil
                self.conditions = KalturaClientBase.object_from_xml(xml_element.elements['conditions'], 'KalturaCondition')
        end
        if xml_element.elements['contexts'] != nil
                self.contexts = KalturaClientBase.object_from_xml(xml_element.elements['contexts'], 'KalturaContextTypeHolder')
        end
        if xml_element.elements['stopProcessing'] != nil
                self.stop_processing = xml_element.elements['stopProcessing'].text
        end
        if xml_element.elements['forceAdminValidation'] != nil
                self.force_admin_validation = xml_element.elements['forceAdminValidation'].text
        end
end
stop_processing=(val) click to toggle source
# File lib/kaltura_types.rb, line 224
def stop_processing=(val)
        @stop_processing = to_b(val)
end