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

namespace Google\Ads\GoogleAds\V24\Services;

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

/**
 * A list of audience attributes of a single dimension, including their overlap
 * with a primary attribute, returned as part of a
 * [GenerateAudienceOverlapInsightsResponse][google.ads.googleads.v24.services.GenerateAudienceOverlapInsightsResponse].
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.DimensionOverlapResult</code>
 */
class DimensionOverlapResult extends \Google\Protobuf\Internal\Message
{
    /**
     * The dimension of all the attributes in this section.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     */
    protected $dimension = 0;
    /**
     * The attributes and their overlap with the primary attribute.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.AudienceOverlapItem items = 2;</code>
     */
    private $items;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type int $dimension
     *           The dimension of all the attributes in this section.
     * @type \Google\Ads\GoogleAds\V24\Services\AudienceOverlapItem[] $items
     *           The attributes and their overlap with the primary attribute.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The dimension of all the attributes in this section.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     *
     * @return int
     */
    public function getDimension()
    {
        return $this->dimension;
    }

    /**
     * The dimension of all the attributes in this section.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension dimension = 1;</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setDimension($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V24\Enums\AudienceInsightsDimensionEnum\AudienceInsightsDimension::class);
        $this->dimension = $var;

        return $this;
    }

    /**
     * The attributes and their overlap with the primary attribute.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.AudienceOverlapItem items = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Services\AudienceOverlapItem>
     */
    public function getItems()
    {
        return $this->items;
    }

    /**
     * The attributes and their overlap with the primary attribute.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.AudienceOverlapItem items = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Services\AudienceOverlapItem[] $var
     * @return $this
     */
    public function setItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V24\Services\AudienceOverlapItem::class);
        $this->items = $arr;

        return $this;
    }

}

