<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetAvailableRestrictions-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetAvailableRestrictions-Response
 * @subpackage Structs
 */
class GetAvailableRestrictions_Response extends ExtensibleDataContract
{
    /**
     * The Restrictions
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfRestrictionDescription
     */
    public $Restrictions;
    /**
     * Constructor method for GetAvailableRestrictions-Response
     * @uses GetAvailableRestrictions_Response::setRestrictions()
     * @param \patest\ArrayType\ArrayOfRestrictionDescription $restrictions
     */
    public function __construct(\patest\ArrayType\ArrayOfRestrictionDescription $restrictions = null)
    {
        $this
            ->setRestrictions($restrictions);
    }
    /**
     * Get Restrictions 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\ArrayOfRestrictionDescription|null
     */
    public function getRestrictions()
    {
        return isset($this->Restrictions) ? $this->Restrictions : null;
    }
    /**
     * Set Restrictions 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\ArrayOfRestrictionDescription $restrictions
     * @return \patest\StructType\GetAvailableRestrictions_Response
     */
    public function setRestrictions(\patest\ArrayType\ArrayOfRestrictionDescription $restrictions = null)
    {
        if (is_null($restrictions) || (is_array($restrictions) && empty($restrictions))) {
            unset($this->Restrictions);
        } else {
            $this->Restrictions = $restrictions;
        }
        return $this;
    }
}
