<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for NewHospitalitySubscriptionsRequestDetails StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:NewHospitalitySubscriptionsRequestDetails
 * @subpackage Structs
 */
class NewHospitalitySubscriptionsRequestDetails extends HospitalitySubscriptionsRequestDetailsBase
{
    /**
     * The RequestDetails
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\AddSubscriptionsToBasketRequest
     */
    public $RequestDetails;
    /**
     * Constructor method for NewHospitalitySubscriptionsRequestDetails
     * @uses NewHospitalitySubscriptionsRequestDetails::setRequestDetails()
     * @param \patest\StructType\AddSubscriptionsToBasketRequest $requestDetails
     */
    public function __construct(\patest\StructType\AddSubscriptionsToBasketRequest $requestDetails = null)
    {
        $this
            ->setRequestDetails($requestDetails);
    }
    /**
     * Get RequestDetails 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\AddSubscriptionsToBasketRequest|null
     */
    public function getRequestDetails()
    {
        return isset($this->RequestDetails) ? $this->RequestDetails : null;
    }
    /**
     * Set RequestDetails 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\AddSubscriptionsToBasketRequest $requestDetails
     * @return \patest\StructType\NewHospitalitySubscriptionsRequestDetails
     */
    public function setRequestDetails(\patest\StructType\AddSubscriptionsToBasketRequest $requestDetails = null)
    {
        if (is_null($requestDetails) || (is_array($requestDetails) && empty($requestDetails))) {
            unset($this->RequestDetails);
        } else {
            $this->RequestDetails = $requestDetails;
        }
        return $this;
    }
}
