<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RoomRate StructType
 * @package Dg
 * @subpackage Structs
 */
class DgRoomRate extends DgRoomRateType
{
    /**
     * The AdvanceBookingRestriction
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgAdvanceBookingRestriction
     */
    public $AdvanceBookingRestriction;
    /**
     * The Restrictions
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\ArrayType\DgArrayOfRoomStayTypeRoomRatesRoomRateRestriction
     */
    public $Restrictions;
    /**
     * Constructor method for RoomRate
     * @uses DgRoomRate::setAdvanceBookingRestriction()
     * @uses DgRoomRate::setRestrictions()
     * @param \dgsoft\StructType\DgAdvanceBookingRestriction $advanceBookingRestriction
     * @param \dgsoft\ArrayType\DgArrayOfRoomStayTypeRoomRatesRoomRateRestriction $restrictions
     */
    public function __construct(\dgsoft\StructType\DgAdvanceBookingRestriction $advanceBookingRestriction = null, \dgsoft\ArrayType\DgArrayOfRoomStayTypeRoomRatesRoomRateRestriction $restrictions = null)
    {
        $this
            ->setAdvanceBookingRestriction($advanceBookingRestriction)
            ->setRestrictions($restrictions);
    }
    /**
     * Get AdvanceBookingRestriction value
     * @return \dgsoft\StructType\DgAdvanceBookingRestriction|null
     */
    public function getAdvanceBookingRestriction()
    {
        return $this->AdvanceBookingRestriction;
    }
    /**
     * Set AdvanceBookingRestriction value
     * @param \dgsoft\StructType\DgAdvanceBookingRestriction $advanceBookingRestriction
     * @return \dgsoft\StructType\DgRoomRate
     */
    public function setAdvanceBookingRestriction(\dgsoft\StructType\DgAdvanceBookingRestriction $advanceBookingRestriction = null)
    {
        $this->AdvanceBookingRestriction = $advanceBookingRestriction;
        return $this;
    }
    /**
     * Get Restrictions value
     * @return \dgsoft\ArrayType\DgArrayOfRoomStayTypeRoomRatesRoomRateRestriction|null
     */
    public function getRestrictions()
    {
        return $this->Restrictions;
    }
    /**
     * Set Restrictions value
     * @param \dgsoft\ArrayType\DgArrayOfRoomStayTypeRoomRatesRoomRateRestriction $restrictions
     * @return \dgsoft\StructType\DgRoomRate
     */
    public function setRestrictions(\dgsoft\ArrayType\DgArrayOfRoomStayTypeRoomRatesRoomRateRestriction $restrictions = null)
    {
        $this->Restrictions = $restrictions;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \dgsoft\StructType\DgRoomRate
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
