<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetProductDescription-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetProductDescription-Response
 * @subpackage Structs
 */
class GetProductDescription_Response extends ExtensibleDataContract
{
    /**
     * The AddOns
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfMerchandise_AddOnType
     */
    public $AddOns;
    /**
     * The MerchandiseItems
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfMerchandiseDescription
     */
    public $MerchandiseItems;
    /**
     * The Product
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Merchandise_Product
     */
    public $Product;
    /**
     * Constructor method for GetProductDescription-Response
     * @uses GetProductDescription_Response::setAddOns()
     * @uses GetProductDescription_Response::setMerchandiseItems()
     * @uses GetProductDescription_Response::setProduct()
     * @param \patest\ArrayType\ArrayOfMerchandise_AddOnType $addOns
     * @param \patest\ArrayType\ArrayOfMerchandiseDescription $merchandiseItems
     * @param \patest\StructType\Merchandise_Product $product
     */
    public function __construct(\patest\ArrayType\ArrayOfMerchandise_AddOnType $addOns = null, \patest\ArrayType\ArrayOfMerchandiseDescription $merchandiseItems = null, \patest\StructType\Merchandise_Product $product = null)
    {
        $this
            ->setAddOns($addOns)
            ->setMerchandiseItems($merchandiseItems)
            ->setProduct($product);
    }
    /**
     * Get AddOns 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\ArrayOfMerchandise_AddOnType|null
     */
    public function getAddOns()
    {
        return isset($this->AddOns) ? $this->AddOns : null;
    }
    /**
     * Set AddOns 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\ArrayOfMerchandise_AddOnType $addOns
     * @return \patest\StructType\GetProductDescription_Response
     */
    public function setAddOns(\patest\ArrayType\ArrayOfMerchandise_AddOnType $addOns = null)
    {
        if (is_null($addOns) || (is_array($addOns) && empty($addOns))) {
            unset($this->AddOns);
        } else {
            $this->AddOns = $addOns;
        }
        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\ArrayOfMerchandiseDescription|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\ArrayOfMerchandiseDescription $merchandiseItems
     * @return \patest\StructType\GetProductDescription_Response
     */
    public function setMerchandiseItems(\patest\ArrayType\ArrayOfMerchandiseDescription $merchandiseItems = null)
    {
        if (is_null($merchandiseItems) || (is_array($merchandiseItems) && empty($merchandiseItems))) {
            unset($this->MerchandiseItems);
        } else {
            $this->MerchandiseItems = $merchandiseItems;
        }
        return $this;
    }
    /**
     * Get Product 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\Merchandise_Product|null
     */
    public function getProduct()
    {
        return isset($this->Product) ? $this->Product : null;
    }
    /**
     * Set Product 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\Merchandise_Product $product
     * @return \patest\StructType\GetProductDescription_Response
     */
    public function setProduct(\patest\StructType\Merchandise_Product $product = null)
    {
        if (is_null($product) || (is_array($product) && empty($product))) {
            unset($this->Product);
        } else {
            $this->Product = $product;
        }
        return $this;
    }
}
