<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v20/services/audience_insights_service.proto

namespace Google\Ads\GoogleAds\V20\Services;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Response message for
 * [AudienceInsightsService.ListInsightsEligibleDates][google.ads.googleads.v20.services.AudienceInsightsService.ListInsightsEligibleDates].
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.services.ListInsightsEligibleDatesResponse</code>
 */
class ListInsightsEligibleDatesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The months for which AudienceInsights data is currently
     * available, each represented as a string in the form "YYYY-MM".
     *
     * Generated from protobuf field <code>repeated string data_months = 1;</code>
     */
    private $data_months;
    /**
     * The actual dates covered by the "last 30 days" date range that will be used
     * implicitly for
     * [AudienceInsightsService.GenerateAudienceCompositionInsights][google.ads.googleads.v20.services.AudienceInsightsService.GenerateAudienceCompositionInsights]
     * requests that have no data_month set.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.common.DateRange last_thirty_days = 2;</code>
     */
    protected $last_thirty_days = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $data_months
     *           The months for which AudienceInsights data is currently
     *           available, each represented as a string in the form "YYYY-MM".
     *     @type \Google\Ads\GoogleAds\V20\Common\DateRange $last_thirty_days
     *           The actual dates covered by the "last 30 days" date range that will be used
     *           implicitly for
     *           [AudienceInsightsService.GenerateAudienceCompositionInsights][google.ads.googleads.v20.services.AudienceInsightsService.GenerateAudienceCompositionInsights]
     *           requests that have no data_month set.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The months for which AudienceInsights data is currently
     * available, each represented as a string in the form "YYYY-MM".
     *
     * Generated from protobuf field <code>repeated string data_months = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDataMonths()
    {
        return $this->data_months;
    }

    /**
     * The months for which AudienceInsights data is currently
     * available, each represented as a string in the form "YYYY-MM".
     *
     * Generated from protobuf field <code>repeated string data_months = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDataMonths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->data_months = $arr;

        return $this;
    }

    /**
     * The actual dates covered by the "last 30 days" date range that will be used
     * implicitly for
     * [AudienceInsightsService.GenerateAudienceCompositionInsights][google.ads.googleads.v20.services.AudienceInsightsService.GenerateAudienceCompositionInsights]
     * requests that have no data_month set.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.common.DateRange last_thirty_days = 2;</code>
     * @return \Google\Ads\GoogleAds\V20\Common\DateRange|null
     */
    public function getLastThirtyDays()
    {
        return $this->last_thirty_days;
    }

    public function hasLastThirtyDays()
    {
        return isset($this->last_thirty_days);
    }

    public function clearLastThirtyDays()
    {
        unset($this->last_thirty_days);
    }

    /**
     * The actual dates covered by the "last 30 days" date range that will be used
     * implicitly for
     * [AudienceInsightsService.GenerateAudienceCompositionInsights][google.ads.googleads.v20.services.AudienceInsightsService.GenerateAudienceCompositionInsights]
     * requests that have no data_month set.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.common.DateRange last_thirty_days = 2;</code>
     * @param \Google\Ads\GoogleAds\V20\Common\DateRange $var
     * @return $this
     */
    public function setLastThirtyDays($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V20\Common\DateRange::class);
        $this->last_thirty_days = $var;

        return $this;
    }

}

