<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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