<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for EventTicketAndConfiguration StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:EventTicketAndConfiguration
 * @subpackage Structs
 */
class EventTicketAndConfiguration extends AbstractStructBase
{
    /**
     * The Ticket
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\EventTicketsTicketWithVersionsAndPurchasers
     */
    public $Ticket;
    /**
     * The TicketHistory
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfEventTicketsTicketWithVersionsAndPurchasers
     */
    public $TicketHistory;
    /**
     * The TicketViewConfiguration
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\TicketViewConfiguration
     */
    public $TicketViewConfiguration;
    /**
     * Constructor method for EventTicketAndConfiguration
     * @uses EventTicketAndConfiguration::setTicket()
     * @uses EventTicketAndConfiguration::setTicketHistory()
     * @uses EventTicketAndConfiguration::setTicketViewConfiguration()
     * @param \patest\StructType\EventTicketsTicketWithVersionsAndPurchasers $ticket
     * @param \patest\ArrayType\ArrayOfEventTicketsTicketWithVersionsAndPurchasers $ticketHistory
     * @param \patest\StructType\TicketViewConfiguration $ticketViewConfiguration
     */
    public function __construct(\patest\StructType\EventTicketsTicketWithVersionsAndPurchasers $ticket = null, \patest\ArrayType\ArrayOfEventTicketsTicketWithVersionsAndPurchasers $ticketHistory = null, \patest\StructType\TicketViewConfiguration $ticketViewConfiguration = null)
    {
        $this
            ->setTicket($ticket)
            ->setTicketHistory($ticketHistory)
            ->setTicketViewConfiguration($ticketViewConfiguration);
    }
    /**
     * Get Ticket 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\EventTicketsTicketWithVersionsAndPurchasers|null
     */
    public function getTicket()
    {
        return isset($this->Ticket) ? $this->Ticket : null;
    }
    /**
     * Set Ticket 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\EventTicketsTicketWithVersionsAndPurchasers $ticket
     * @return \patest\StructType\EventTicketAndConfiguration
     */
    public function setTicket(\patest\StructType\EventTicketsTicketWithVersionsAndPurchasers $ticket = null)
    {
        if (is_null($ticket) || (is_array($ticket) && empty($ticket))) {
            unset($this->Ticket);
        } else {
            $this->Ticket = $ticket;
        }
        return $this;
    }
    /**
     * Get TicketHistory 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\ArrayType\ArrayOfEventTicketsTicketWithVersionsAndPurchasers|null
     */
    public function getTicketHistory()
    {
        return isset($this->TicketHistory) ? $this->TicketHistory : null;
    }
    /**
     * Set TicketHistory 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\ArrayType\ArrayOfEventTicketsTicketWithVersionsAndPurchasers $ticketHistory
     * @return \patest\StructType\EventTicketAndConfiguration
     */
    public function setTicketHistory(\patest\ArrayType\ArrayOfEventTicketsTicketWithVersionsAndPurchasers $ticketHistory = null)
    {
        if (is_null($ticketHistory) || (is_array($ticketHistory) && empty($ticketHistory))) {
            unset($this->TicketHistory);
        } else {
            $this->TicketHistory = $ticketHistory;
        }
        return $this;
    }
    /**
     * Get TicketViewConfiguration 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\TicketViewConfiguration|null
     */
    public function getTicketViewConfiguration()
    {
        return isset($this->TicketViewConfiguration) ? $this->TicketViewConfiguration : null;
    }
    /**
     * Set TicketViewConfiguration 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\TicketViewConfiguration $ticketViewConfiguration
     * @return \patest\StructType\EventTicketAndConfiguration
     */
    public function setTicketViewConfiguration(\patest\StructType\TicketViewConfiguration $ticketViewConfiguration = null)
    {
        if (is_null($ticketViewConfiguration) || (is_array($ticketViewConfiguration) && empty($ticketViewConfiguration))) {
            unset($this->TicketViewConfiguration);
        } else {
            $this->TicketViewConfiguration = $ticketViewConfiguration;
        }
        return $this;
    }
}
