<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v23/common/keyword_plan_common.proto

namespace Google\Ads\GoogleAds\V23\Common;

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

/**
 * The aggregated historical metrics for keyword plan keywords.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.KeywordPlanAggregateMetricResults</code>
 */
class KeywordPlanAggregateMetricResults extends \Google\Protobuf\Internal\Message
{
    /**
     * The aggregate searches for all the keywords segmented by device
     * for the specified time.
     * Supports the following device types: MOBILE, TABLET, DESKTOP.
     * This is only set when KeywordPlanAggregateMetricTypeEnum.DEVICE is set
     * in the KeywordPlanAggregateMetrics field in the request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.KeywordPlanDeviceSearches device_searches = 1;</code>
     */
    private $device_searches;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V23\Common\KeywordPlanDeviceSearches[] $device_searches
     *           The aggregate searches for all the keywords segmented by device
     *           for the specified time.
     *           Supports the following device types: MOBILE, TABLET, DESKTOP.
     *           This is only set when KeywordPlanAggregateMetricTypeEnum.DEVICE is set
     *           in the KeywordPlanAggregateMetrics field in the request.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\KeywordPlanCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * The aggregate searches for all the keywords segmented by device
     * for the specified time.
     * Supports the following device types: MOBILE, TABLET, DESKTOP.
     * This is only set when KeywordPlanAggregateMetricTypeEnum.DEVICE is set
     * in the KeywordPlanAggregateMetrics field in the request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.KeywordPlanDeviceSearches device_searches = 1;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Common\KeywordPlanDeviceSearches>
     */
    public function getDeviceSearches()
    {
        return $this->device_searches;
    }

    /**
     * The aggregate searches for all the keywords segmented by device
     * for the specified time.
     * Supports the following device types: MOBILE, TABLET, DESKTOP.
     * This is only set when KeywordPlanAggregateMetricTypeEnum.DEVICE is set
     * in the KeywordPlanAggregateMetrics field in the request.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.KeywordPlanDeviceSearches device_searches = 1;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\KeywordPlanDeviceSearches[] $var
     * @return $this
     */
    public function setDeviceSearches($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Common\KeywordPlanDeviceSearches::class);
        $this->device_searches = $arr;

        return $this;
    }

}

