<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BackOfficeUI.GiftVoucherTypeDefinitionExtended StructType
 * @subpackage Structs
 */
class BackOfficeUI_GiftVoucherTypeDefinitionExtended extends GiftVoucher_GiftVoucherDefinition
{
    /**
     * The VoucherTypeName
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\GlobalString
     */
    public $VoucherTypeName;
    /**
     * Constructor method for BackOfficeUI.GiftVoucherTypeDefinitionExtended
     * @uses BackOfficeUI_GiftVoucherTypeDefinitionExtended::setVoucherTypeName()
     * @param \patest\StructType\GlobalString $voucherTypeName
     */
    public function __construct(\patest\StructType\GlobalString $voucherTypeName = null)
    {
        $this
            ->setVoucherTypeName($voucherTypeName);
    }
    /**
     * Get VoucherTypeName 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 getVoucherTypeName()
    {
        return isset($this->VoucherTypeName) ? $this->VoucherTypeName : null;
    }
    /**
     * Set VoucherTypeName 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 $voucherTypeName
     * @return \patest\StructType\BackOfficeUI_GiftVoucherTypeDefinitionExtended
     */
    public function setVoucherTypeName(\patest\StructType\GlobalString $voucherTypeName = null)
    {
        if (is_null($voucherTypeName) || (is_array($voucherTypeName) && empty($voucherTypeName))) {
            unset($this->VoucherTypeName);
        } else {
            $this->VoucherTypeName = $voucherTypeName;
        }
        return $this;
    }
}
