<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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