<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizAction.Merchandise.Stocktaking.Request StructType
 * @subpackage Structs
 */
class BizAction_Merchandise_Stocktaking_Request extends AnyEntity
{
    /**
     * The StocktakingItems
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfMerchandise_StocktakingItem
     */
    public $StocktakingItems;
    /**
     * Constructor method for BizAction.Merchandise.Stocktaking.Request
     * @uses BizAction_Merchandise_Stocktaking_Request::setStocktakingItems()
     * @param \patest\StructType\RecordSetOfMerchandise_StocktakingItem $stocktakingItems
     */
    public function __construct(\patest\StructType\RecordSetOfMerchandise_StocktakingItem $stocktakingItems = null)
    {
        $this
            ->setStocktakingItems($stocktakingItems);
    }
    /**
     * Get StocktakingItems 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\RecordSetOfMerchandise_StocktakingItem|null
     */
    public function getStocktakingItems()
    {
        return isset($this->StocktakingItems) ? $this->StocktakingItems : null;
    }
    /**
     * Set StocktakingItems 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\RecordSetOfMerchandise_StocktakingItem $stocktakingItems
     * @return \patest\StructType\BizAction_Merchandise_Stocktaking_Request
     */
    public function setStocktakingItems(\patest\StructType\RecordSetOfMerchandise_StocktakingItem $stocktakingItems = null)
    {
        if (is_null($stocktakingItems) || (is_array($stocktakingItems) && empty($stocktakingItems))) {
            unset($this->StocktakingItems);
        } else {
            $this->StocktakingItems = $stocktakingItems;
        }
        return $this;
    }
}
