<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for MerchandiseCriteria StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:MerchandiseCriteria
 * @subpackage Structs
 */
class MerchandiseCriteria extends AbstractCriteria
{
    /**
     * The BarCode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\SinglePropertyCriteriaOfstring
     */
    public $BarCode;
    /**
     * The CategoryId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\SinglePropertyCriteriaOfguid
     */
    public $CategoryId;
    /**
     * The ItemTypeId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\SinglePropertyCriteriaOfguid
     */
    public $ItemTypeId;
    /**
     * The MerchandiseId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\SinglePropertyCriteriaOfguid
     */
    public $MerchandiseId;
    /**
     * The MerchandiseProductItemId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\SinglePropertyCriteriaOfguid
     */
    public $MerchandiseProductItemId;
    /**
     * Constructor method for MerchandiseCriteria
     * @uses MerchandiseCriteria::setBarCode()
     * @uses MerchandiseCriteria::setCategoryId()
     * @uses MerchandiseCriteria::setItemTypeId()
     * @uses MerchandiseCriteria::setMerchandiseId()
     * @uses MerchandiseCriteria::setMerchandiseProductItemId()
     * @param \patest\StructType\SinglePropertyCriteriaOfstring $barCode
     * @param \patest\StructType\SinglePropertyCriteriaOfguid $categoryId
     * @param \patest\StructType\SinglePropertyCriteriaOfguid $itemTypeId
     * @param \patest\StructType\SinglePropertyCriteriaOfguid $merchandiseId
     * @param \patest\StructType\SinglePropertyCriteriaOfguid $merchandiseProductItemId
     */
    public function __construct(\patest\StructType\SinglePropertyCriteriaOfstring $barCode = null, \patest\StructType\SinglePropertyCriteriaOfguid $categoryId = null, \patest\StructType\SinglePropertyCriteriaOfguid $itemTypeId = null, \patest\StructType\SinglePropertyCriteriaOfguid $merchandiseId = null, \patest\StructType\SinglePropertyCriteriaOfguid $merchandiseProductItemId = null)
    {
        $this
            ->setBarCode($barCode)
            ->setCategoryId($categoryId)
            ->setItemTypeId($itemTypeId)
            ->setMerchandiseId($merchandiseId)
            ->setMerchandiseProductItemId($merchandiseProductItemId);
    }
    /**
     * Get BarCode 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\SinglePropertyCriteriaOfstring|null
     */
    public function getBarCode()
    {
        return isset($this->BarCode) ? $this->BarCode : null;
    }
    /**
     * Set BarCode 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\SinglePropertyCriteriaOfstring $barCode
     * @return \patest\StructType\MerchandiseCriteria
     */
    public function setBarCode(\patest\StructType\SinglePropertyCriteriaOfstring $barCode = null)
    {
        if (is_null($barCode) || (is_array($barCode) && empty($barCode))) {
            unset($this->BarCode);
        } else {
            $this->BarCode = $barCode;
        }
        return $this;
    }
    /**
     * Get CategoryId 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\SinglePropertyCriteriaOfguid|null
     */
    public function getCategoryId()
    {
        return isset($this->CategoryId) ? $this->CategoryId : null;
    }
    /**
     * Set CategoryId 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\SinglePropertyCriteriaOfguid $categoryId
     * @return \patest\StructType\MerchandiseCriteria
     */
    public function setCategoryId(\patest\StructType\SinglePropertyCriteriaOfguid $categoryId = null)
    {
        if (is_null($categoryId) || (is_array($categoryId) && empty($categoryId))) {
            unset($this->CategoryId);
        } else {
            $this->CategoryId = $categoryId;
        }
        return $this;
    }
    /**
     * Get ItemTypeId 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\SinglePropertyCriteriaOfguid|null
     */
    public function getItemTypeId()
    {
        return isset($this->ItemTypeId) ? $this->ItemTypeId : null;
    }
    /**
     * Set ItemTypeId 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\SinglePropertyCriteriaOfguid $itemTypeId
     * @return \patest\StructType\MerchandiseCriteria
     */
    public function setItemTypeId(\patest\StructType\SinglePropertyCriteriaOfguid $itemTypeId = null)
    {
        if (is_null($itemTypeId) || (is_array($itemTypeId) && empty($itemTypeId))) {
            unset($this->ItemTypeId);
        } else {
            $this->ItemTypeId = $itemTypeId;
        }
        return $this;
    }
    /**
     * Get MerchandiseId 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\SinglePropertyCriteriaOfguid|null
     */
    public function getMerchandiseId()
    {
        return isset($this->MerchandiseId) ? $this->MerchandiseId : null;
    }
    /**
     * Set MerchandiseId 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\SinglePropertyCriteriaOfguid $merchandiseId
     * @return \patest\StructType\MerchandiseCriteria
     */
    public function setMerchandiseId(\patest\StructType\SinglePropertyCriteriaOfguid $merchandiseId = null)
    {
        if (is_null($merchandiseId) || (is_array($merchandiseId) && empty($merchandiseId))) {
            unset($this->MerchandiseId);
        } else {
            $this->MerchandiseId = $merchandiseId;
        }
        return $this;
    }
    /**
     * Get MerchandiseProductItemId 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\SinglePropertyCriteriaOfguid|null
     */
    public function getMerchandiseProductItemId()
    {
        return isset($this->MerchandiseProductItemId) ? $this->MerchandiseProductItemId : null;
    }
    /**
     * Set MerchandiseProductItemId 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\SinglePropertyCriteriaOfguid $merchandiseProductItemId
     * @return \patest\StructType\MerchandiseCriteria
     */
    public function setMerchandiseProductItemId(\patest\StructType\SinglePropertyCriteriaOfguid $merchandiseProductItemId = null)
    {
        if (is_null($merchandiseProductItemId) || (is_array($merchandiseProductItemId) && empty($merchandiseProductItemId))) {
            unset($this->MerchandiseProductItemId);
        } else {
            $this->MerchandiseProductItemId = $merchandiseProductItemId;
        }
        return $this;
    }
}
