<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ValidateAndAddBundleToBasketResponse StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ValidateAndAddBundleToBasketResponse
 * @subpackage Structs
 */
class ValidateAndAddBundleToBasketResponse extends ExtensibleDataContract
{
    /**
     * The AddResponse
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\AddBundleToBasket_Response
     */
    public $AddResponse;
    /**
     * The RequiredAdditionalInfoByProduct
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfKeyValueOfguidBundleRequiredAdditionalInfohpjoQDea
     */
    public $RequiredAdditionalInfoByProduct;
    /**
     * The ValidationFailure
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfBundleValidationFailureInformation
     */
    public $ValidationFailure;
    /**
     * Constructor method for ValidateAndAddBundleToBasketResponse
     * @uses ValidateAndAddBundleToBasketResponse::setAddResponse()
     * @uses ValidateAndAddBundleToBasketResponse::setRequiredAdditionalInfoByProduct()
     * @uses ValidateAndAddBundleToBasketResponse::setValidationFailure()
     * @param \patest\StructType\AddBundleToBasket_Response $addResponse
     * @param \patest\ArrayType\ArrayOfKeyValueOfguidBundleRequiredAdditionalInfohpjoQDea $requiredAdditionalInfoByProduct
     * @param \patest\ArrayType\ArrayOfBundleValidationFailureInformation $validationFailure
     */
    public function __construct(\patest\StructType\AddBundleToBasket_Response $addResponse = null, \patest\ArrayType\ArrayOfKeyValueOfguidBundleRequiredAdditionalInfohpjoQDea $requiredAdditionalInfoByProduct = null, \patest\ArrayType\ArrayOfBundleValidationFailureInformation $validationFailure = null)
    {
        $this
            ->setAddResponse($addResponse)
            ->setRequiredAdditionalInfoByProduct($requiredAdditionalInfoByProduct)
            ->setValidationFailure($validationFailure);
    }
    /**
     * Get AddResponse 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\AddBundleToBasket_Response|null
     */
    public function getAddResponse()
    {
        return isset($this->AddResponse) ? $this->AddResponse : null;
    }
    /**
     * Set AddResponse 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\AddBundleToBasket_Response $addResponse
     * @return \patest\StructType\ValidateAndAddBundleToBasketResponse
     */
    public function setAddResponse(\patest\StructType\AddBundleToBasket_Response $addResponse = null)
    {
        if (is_null($addResponse) || (is_array($addResponse) && empty($addResponse))) {
            unset($this->AddResponse);
        } else {
            $this->AddResponse = $addResponse;
        }
        return $this;
    }
    /**
     * Get RequiredAdditionalInfoByProduct 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\ArrayOfKeyValueOfguidBundleRequiredAdditionalInfohpjoQDea|null
     */
    public function getRequiredAdditionalInfoByProduct()
    {
        return isset($this->RequiredAdditionalInfoByProduct) ? $this->RequiredAdditionalInfoByProduct : null;
    }
    /**
     * Set RequiredAdditionalInfoByProduct 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\ArrayOfKeyValueOfguidBundleRequiredAdditionalInfohpjoQDea $requiredAdditionalInfoByProduct
     * @return \patest\StructType\ValidateAndAddBundleToBasketResponse
     */
    public function setRequiredAdditionalInfoByProduct(\patest\ArrayType\ArrayOfKeyValueOfguidBundleRequiredAdditionalInfohpjoQDea $requiredAdditionalInfoByProduct = null)
    {
        if (is_null($requiredAdditionalInfoByProduct) || (is_array($requiredAdditionalInfoByProduct) && empty($requiredAdditionalInfoByProduct))) {
            unset($this->RequiredAdditionalInfoByProduct);
        } else {
            $this->RequiredAdditionalInfoByProduct = $requiredAdditionalInfoByProduct;
        }
        return $this;
    }
    /**
     * Get ValidationFailure 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\ArrayOfBundleValidationFailureInformation|null
     */
    public function getValidationFailure()
    {
        return isset($this->ValidationFailure) ? $this->ValidationFailure : null;
    }
    /**
     * Set ValidationFailure 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\ArrayOfBundleValidationFailureInformation $validationFailure
     * @return \patest\StructType\ValidateAndAddBundleToBasketResponse
     */
    public function setValidationFailure(\patest\ArrayType\ArrayOfBundleValidationFailureInformation $validationFailure = null)
    {
        if (is_null($validationFailure) || (is_array($validationFailure) && empty($validationFailure))) {
            unset($this->ValidationFailure);
        } else {
            $this->ValidationFailure = $validationFailure;
        }
        return $this;
    }
}
