<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetPresales-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetPresales-Response
 * @subpackage Structs
 */
class GetPresales_Response extends AbstractStructBase
{
    /**
     * The Presales
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfTicketing_Presale
     */
    public $Presales;
    /**
     * Constructor method for GetPresales-Response
     * @uses GetPresales_Response::setPresales()
     * @param \patest\ArrayType\ArrayOfTicketing_Presale $presales
     */
    public function __construct(\patest\ArrayType\ArrayOfTicketing_Presale $presales = null)
    {
        $this
            ->setPresales($presales);
    }
    /**
     * Get Presales 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\ArrayOfTicketing_Presale|null
     */
    public function getPresales()
    {
        return isset($this->Presales) ? $this->Presales : null;
    }
    /**
     * Set Presales 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\ArrayOfTicketing_Presale $presales
     * @return \patest\StructType\GetPresales_Response
     */
    public function setPresales(\patest\ArrayType\ArrayOfTicketing_Presale $presales = null)
    {
        if (is_null($presales) || (is_array($presales) && empty($presales))) {
            unset($this->Presales);
        } else {
            $this->Presales = $presales;
        }
        return $this;
    }
}
