<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Ticketing.AwayGameTicketTotalsRow StructType
 * @subpackage Structs
 */
class Ticketing_AwayGameTicketTotalsRow extends AnyEntity
{
    /**
     * The GroupTicketsAllotted
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $GroupTicketsAllotted;
    /**
     * The GroupTicketsSold
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $GroupTicketsSold;
    /**
     * The TicketsAlloted
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $TicketsAlloted;
    /**
     * The TicketsRemaining
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $TicketsRemaining;
    /**
     * The TicketsSold
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $TicketsSold;
    /**
     * Constructor method for Ticketing.AwayGameTicketTotalsRow
     * @uses Ticketing_AwayGameTicketTotalsRow::setGroupTicketsAllotted()
     * @uses Ticketing_AwayGameTicketTotalsRow::setGroupTicketsSold()
     * @uses Ticketing_AwayGameTicketTotalsRow::setTicketsAlloted()
     * @uses Ticketing_AwayGameTicketTotalsRow::setTicketsRemaining()
     * @uses Ticketing_AwayGameTicketTotalsRow::setTicketsSold()
     * @param int $groupTicketsAllotted
     * @param int $groupTicketsSold
     * @param int $ticketsAlloted
     * @param int $ticketsRemaining
     * @param int $ticketsSold
     */
    public function __construct($groupTicketsAllotted = null, $groupTicketsSold = null, $ticketsAlloted = null, $ticketsRemaining = null, $ticketsSold = null)
    {
        $this
            ->setGroupTicketsAllotted($groupTicketsAllotted)
            ->setGroupTicketsSold($groupTicketsSold)
            ->setTicketsAlloted($ticketsAlloted)
            ->setTicketsRemaining($ticketsRemaining)
            ->setTicketsSold($ticketsSold);
    }
    /**
     * Get GroupTicketsAllotted 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 int|null
     */
    public function getGroupTicketsAllotted()
    {
        return isset($this->GroupTicketsAllotted) ? $this->GroupTicketsAllotted : null;
    }
    /**
     * Set GroupTicketsAllotted 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 int $groupTicketsAllotted
     * @return \patest\StructType\Ticketing_AwayGameTicketTotalsRow
     */
    public function setGroupTicketsAllotted($groupTicketsAllotted = null)
    {
        // validation for constraint: int
        if (!is_null($groupTicketsAllotted) && !(is_int($groupTicketsAllotted) || ctype_digit($groupTicketsAllotted))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($groupTicketsAllotted, true), gettype($groupTicketsAllotted)), __LINE__);
        }
        if (is_null($groupTicketsAllotted) || (is_array($groupTicketsAllotted) && empty($groupTicketsAllotted))) {
            unset($this->GroupTicketsAllotted);
        } else {
            $this->GroupTicketsAllotted = $groupTicketsAllotted;
        }
        return $this;
    }
    /**
     * Get GroupTicketsSold 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 int|null
     */
    public function getGroupTicketsSold()
    {
        return isset($this->GroupTicketsSold) ? $this->GroupTicketsSold : null;
    }
    /**
     * Set GroupTicketsSold 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 int $groupTicketsSold
     * @return \patest\StructType\Ticketing_AwayGameTicketTotalsRow
     */
    public function setGroupTicketsSold($groupTicketsSold = null)
    {
        // validation for constraint: int
        if (!is_null($groupTicketsSold) && !(is_int($groupTicketsSold) || ctype_digit($groupTicketsSold))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($groupTicketsSold, true), gettype($groupTicketsSold)), __LINE__);
        }
        if (is_null($groupTicketsSold) || (is_array($groupTicketsSold) && empty($groupTicketsSold))) {
            unset($this->GroupTicketsSold);
        } else {
            $this->GroupTicketsSold = $groupTicketsSold;
        }
        return $this;
    }
    /**
     * Get TicketsAlloted 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 int|null
     */
    public function getTicketsAlloted()
    {
        return isset($this->TicketsAlloted) ? $this->TicketsAlloted : null;
    }
    /**
     * Set TicketsAlloted 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 int $ticketsAlloted
     * @return \patest\StructType\Ticketing_AwayGameTicketTotalsRow
     */
    public function setTicketsAlloted($ticketsAlloted = null)
    {
        // validation for constraint: int
        if (!is_null($ticketsAlloted) && !(is_int($ticketsAlloted) || ctype_digit($ticketsAlloted))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($ticketsAlloted, true), gettype($ticketsAlloted)), __LINE__);
        }
        if (is_null($ticketsAlloted) || (is_array($ticketsAlloted) && empty($ticketsAlloted))) {
            unset($this->TicketsAlloted);
        } else {
            $this->TicketsAlloted = $ticketsAlloted;
        }
        return $this;
    }
    /**
     * Get TicketsRemaining 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 int|null
     */
    public function getTicketsRemaining()
    {
        return isset($this->TicketsRemaining) ? $this->TicketsRemaining : null;
    }
    /**
     * Set TicketsRemaining 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 int $ticketsRemaining
     * @return \patest\StructType\Ticketing_AwayGameTicketTotalsRow
     */
    public function setTicketsRemaining($ticketsRemaining = null)
    {
        // validation for constraint: int
        if (!is_null($ticketsRemaining) && !(is_int($ticketsRemaining) || ctype_digit($ticketsRemaining))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($ticketsRemaining, true), gettype($ticketsRemaining)), __LINE__);
        }
        if (is_null($ticketsRemaining) || (is_array($ticketsRemaining) && empty($ticketsRemaining))) {
            unset($this->TicketsRemaining);
        } else {
            $this->TicketsRemaining = $ticketsRemaining;
        }
        return $this;
    }
    /**
     * Get TicketsSold 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 int|null
     */
    public function getTicketsSold()
    {
        return isset($this->TicketsSold) ? $this->TicketsSold : null;
    }
    /**
     * Set TicketsSold 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 int $ticketsSold
     * @return \patest\StructType\Ticketing_AwayGameTicketTotalsRow
     */
    public function setTicketsSold($ticketsSold = null)
    {
        // validation for constraint: int
        if (!is_null($ticketsSold) && !(is_int($ticketsSold) || ctype_digit($ticketsSold))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($ticketsSold, true), gettype($ticketsSold)), __LINE__);
        }
        if (is_null($ticketsSold) || (is_array($ticketsSold) && empty($ticketsSold))) {
            unset($this->TicketsSold);
        } else {
            $this->TicketsSold = $ticketsSold;
        }
        return $this;
    }
}
