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

namespace Google\Ads\GoogleAds\V11\Services;

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

/**
 * The weekly time series forecast for the keyword plan campaign.
 *
 * Generated from protobuf message <code>google.ads.googleads.v11.services.KeywordPlanWeeklyTimeSeriesForecast</code>
 */
class KeywordPlanWeeklyTimeSeriesForecast extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the Keyword Plan campaign related to the forecast.
     * `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}`
     *
     * Generated from protobuf field <code>optional string keyword_plan_campaign = 1;</code>
     */
    protected $keyword_plan_campaign = null;
    /**
     * The forecasts for the Keyword Plan campaign at different max CPC bids.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v11.services.KeywordPlanWeeklyForecast weekly_forecasts = 2;</code>
     */
    private $weekly_forecasts;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $keyword_plan_campaign
     *           The resource name of the Keyword Plan campaign related to the forecast.
     *           `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}`
     *     @type \Google\Ads\GoogleAds\V11\Services\KeywordPlanWeeklyForecast[]|\Google\Protobuf\Internal\RepeatedField $weekly_forecasts
     *           The forecasts for the Keyword Plan campaign at different max CPC bids.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V11\Services\KeywordPlanService::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the Keyword Plan campaign related to the forecast.
     * `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}`
     *
     * Generated from protobuf field <code>optional string keyword_plan_campaign = 1;</code>
     * @return string
     */
    public function getKeywordPlanCampaign()
    {
        return isset($this->keyword_plan_campaign) ? $this->keyword_plan_campaign : '';
    }

    public function hasKeywordPlanCampaign()
    {
        return isset($this->keyword_plan_campaign);
    }

    public function clearKeywordPlanCampaign()
    {
        unset($this->keyword_plan_campaign);
    }

    /**
     * The resource name of the Keyword Plan campaign related to the forecast.
     * `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}`
     *
     * Generated from protobuf field <code>optional string keyword_plan_campaign = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKeywordPlanCampaign($var)
    {
        GPBUtil::checkString($var, True);
        $this->keyword_plan_campaign = $var;

        return $this;
    }

    /**
     * The forecasts for the Keyword Plan campaign at different max CPC bids.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v11.services.KeywordPlanWeeklyForecast weekly_forecasts = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWeeklyForecasts()
    {
        return $this->weekly_forecasts;
    }

    /**
     * The forecasts for the Keyword Plan campaign at different max CPC bids.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v11.services.KeywordPlanWeeklyForecast weekly_forecasts = 2;</code>
     * @param \Google\Ads\GoogleAds\V11\Services\KeywordPlanWeeklyForecast[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWeeklyForecasts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V11\Services\KeywordPlanWeeklyForecast::class);
        $this->weekly_forecasts = $arr;

        return $this;
    }

}

