<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ExtraPromptElementAvailableProductsMerchandiseProductItem
 * StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ExtraPromptElementAvailableProductsMerchandiseProductItem
 * @subpackage Structs
 */
class ExtraPromptElementAvailableProductsMerchandiseProductItem extends ExtraPromptElementAvailableProductsItem
{
    /**
     * The AttributeTypes
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfKeyValueOfguidstring
     */
    public $AttributeTypes;
    /**
     * The MerchandiseItems
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfExtraPromptElementAvailableProductsMerchandiseItem
     */
    public $MerchandiseItems;
    /**
     * Constructor method for ExtraPromptElementAvailableProductsMerchandiseProductItem
     * @uses ExtraPromptElementAvailableProductsMerchandiseProductItem::setAttributeTypes()
     * @uses ExtraPromptElementAvailableProductsMerchandiseProductItem::setMerchandiseItems()
     * @param \patest\ArrayType\ArrayOfKeyValueOfguidstring $attributeTypes
     * @param \patest\ArrayType\ArrayOfExtraPromptElementAvailableProductsMerchandiseItem $merchandiseItems
     */
    public function __construct(\patest\ArrayType\ArrayOfKeyValueOfguidstring $attributeTypes = null, \patest\ArrayType\ArrayOfExtraPromptElementAvailableProductsMerchandiseItem $merchandiseItems = null)
    {
        $this
            ->setAttributeTypes($attributeTypes)
            ->setMerchandiseItems($merchandiseItems);
    }
    /**
     * Get AttributeTypes 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\ArrayOfKeyValueOfguidstring|null
     */
    public function getAttributeTypes()
    {
        return isset($this->AttributeTypes) ? $this->AttributeTypes : null;
    }
    /**
     * Set AttributeTypes 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\ArrayOfKeyValueOfguidstring $attributeTypes
     * @return \patest\StructType\ExtraPromptElementAvailableProductsMerchandiseProductItem
     */
    public function setAttributeTypes(\patest\ArrayType\ArrayOfKeyValueOfguidstring $attributeTypes = null)
    {
        if (is_null($attributeTypes) || (is_array($attributeTypes) && empty($attributeTypes))) {
            unset($this->AttributeTypes);
        } else {
            $this->AttributeTypes = $attributeTypes;
        }
        return $this;
    }
    /**
     * Get MerchandiseItems 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\ArrayOfExtraPromptElementAvailableProductsMerchandiseItem|null
     */
    public function getMerchandiseItems()
    {
        return isset($this->MerchandiseItems) ? $this->MerchandiseItems : null;
    }
    /**
     * Set MerchandiseItems 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\ArrayOfExtraPromptElementAvailableProductsMerchandiseItem $merchandiseItems
     * @return \patest\StructType\ExtraPromptElementAvailableProductsMerchandiseProductItem
     */
    public function setMerchandiseItems(\patest\ArrayType\ArrayOfExtraPromptElementAvailableProductsMerchandiseItem $merchandiseItems = null)
    {
        if (is_null($merchandiseItems) || (is_array($merchandiseItems) && empty($merchandiseItems))) {
            unset($this->MerchandiseItems);
        } else {
            $this->MerchandiseItems = $merchandiseItems;
        }
        return $this;
    }
}
