<?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;

/**
 * Response message for
 * [AudienceInsightsService.GenerateAudienceOverlapInsights][google.ads.googleads.v24.services.AudienceInsightsService.GenerateAudienceOverlapInsights].
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.GenerateAudienceOverlapInsightsResponse</code>
 */
class GenerateAudienceOverlapInsightsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Metadata for the primary attribute, including potential YouTube reach.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.AudienceInsightsAttributeMetadata primary_attribute_metadata = 3;</code>
     */
    protected $primary_attribute_metadata = null;
    /**
     * Lists of attributes and their overlap with the primary attribute, one list
     * per requested dimension.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.DimensionOverlapResult dimension_results = 2;</code>
     */
    private $dimension_results;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata $primary_attribute_metadata
     *           Metadata for the primary attribute, including potential YouTube reach.
     * @type \Google\Ads\GoogleAds\V24\Services\DimensionOverlapResult[] $dimension_results
     *           Lists of attributes and their overlap with the primary attribute, one list
     *           per requested dimension.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Metadata for the primary attribute, including potential YouTube reach.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.AudienceInsightsAttributeMetadata primary_attribute_metadata = 3;</code>
     *
     * @return \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata|null
     */
    public function getPrimaryAttributeMetadata()
    {
        return $this->primary_attribute_metadata;
    }

    public function hasPrimaryAttributeMetadata()
    {
        return isset($this->primary_attribute_metadata);
    }

    public function clearPrimaryAttributeMetadata()
    {
        unset($this->primary_attribute_metadata);
    }

    /**
     * Metadata for the primary attribute, including potential YouTube reach.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.common.AudienceInsightsAttributeMetadata primary_attribute_metadata = 3;</code>
     *
     * @param  \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata $var
     * @return $this
     */
    public function setPrimaryAttributeMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V24\Common\AudienceInsightsAttributeMetadata::class);
        $this->primary_attribute_metadata = $var;

        return $this;
    }

    /**
     * Lists of attributes and their overlap with the primary attribute, one list
     * per requested dimension.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v24.services.DimensionOverlapResult dimension_results = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V24\Services\DimensionOverlapResult>
     */
    public function getDimensionResults()
    {
        return $this->dimension_results;
    }

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

        return $this;
    }

}

