<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for AccessControl.BarcodeInfo.NonTerminalEntity StructType
 * @subpackage Structs
 */
class AccessControl_BarcodeInfo_NonTerminalEntity extends AccessControl_BarcodeInfo_Base
{
    /**
     * The TicketInfo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\AccessControl_BarcodeInfo_Ticket
     */
    public $TicketInfo;
    /**
     * Constructor method for AccessControl.BarcodeInfo.NonTerminalEntity
     * @uses AccessControl_BarcodeInfo_NonTerminalEntity::setTicketInfo()
     * @param \patest\StructType\AccessControl_BarcodeInfo_Ticket $ticketInfo
     */
    public function __construct(\patest\StructType\AccessControl_BarcodeInfo_Ticket $ticketInfo = null)
    {
        $this
            ->setTicketInfo($ticketInfo);
    }
    /**
     * Get TicketInfo 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\AccessControl_BarcodeInfo_Ticket|null
     */
    public function getTicketInfo()
    {
        return isset($this->TicketInfo) ? $this->TicketInfo : null;
    }
    /**
     * Set TicketInfo 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\AccessControl_BarcodeInfo_Ticket $ticketInfo
     * @return \patest\StructType\AccessControl_BarcodeInfo_NonTerminalEntity
     */
    public function setTicketInfo(\patest\StructType\AccessControl_BarcodeInfo_Ticket $ticketInfo = null)
    {
        if (is_null($ticketInfo) || (is_array($ticketInfo) && empty($ticketInfo))) {
            unset($this->TicketInfo);
        } else {
            $this->TicketInfo = $ticketInfo;
        }
        return $this;
    }
}
