<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Ticketing.EventScanningRule StructType
 * @subpackage Structs
 */
class Ticketing_EventScanningRule extends Ticketing_Event
{
    /**
     * The ScanningRule
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Ticketing_ScanningRuleForEvent
     */
    public $ScanningRule;
    /**
     * Constructor method for Ticketing.EventScanningRule
     * @uses Ticketing_EventScanningRule::setScanningRule()
     * @param \patest\StructType\Ticketing_ScanningRuleForEvent $scanningRule
     */
    public function __construct(\patest\StructType\Ticketing_ScanningRuleForEvent $scanningRule = null)
    {
        $this
            ->setScanningRule($scanningRule);
    }
    /**
     * Get ScanningRule value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\StructType\Ticketing_ScanningRuleForEvent|null
     */
    public function getScanningRule()
    {
        return isset($this->ScanningRule) ? $this->ScanningRule : null;
    }
    /**
     * Set ScanningRule value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\StructType\Ticketing_ScanningRuleForEvent $scanningRule
     * @return \patest\StructType\Ticketing_EventScanningRule
     */
    public function setScanningRule(\patest\StructType\Ticketing_ScanningRuleForEvent $scanningRule = null)
    {
        if (is_null($scanningRule) || (is_array($scanningRule) && empty($scanningRule))) {
            unset($this->ScanningRule);
        } else {
            $this->ScanningRule = $scanningRule;
        }
        return $this;
    }
}
