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

namespace Google\Ads\GoogleAds\V11\Common;

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

/**
 * The aggregated historical metrics for keyword plan keywords.
 *
 * Generated from protobuf message <code>google.ads.googleads.v11.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.v11.common.KeywordPlanDeviceSearches device_searches = 1;</code>
     */
    private $device_searches;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V11\Common\KeywordPlanDeviceSearches[]|\Google\Protobuf\Internal\RepeatedField $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\V11\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.v11.common.KeywordPlanDeviceSearches device_searches = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    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.v11.common.KeywordPlanDeviceSearches device_searches = 1;</code>
     * @param \Google\Ads\GoogleAds\V11\Common\KeywordPlanDeviceSearches[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceSearches($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V11\Common\KeywordPlanDeviceSearches::class);
        $this->device_searches = $arr;

        return $this;
    }

}

