<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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