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

namespace Google\Ads\GoogleAds\V20\Services;

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

/**
 * A collection of audience attributes that describe an audience of viewers.
 * This is used to search for topics trending for the defined audience.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.services.SearchAudience</code>
 */
class SearchAudience extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Audience attributes that describe an audience of viewers. This is
     * used to search for topics trending for the defined audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.common.AudienceInsightsAttribute audience_attributes = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $audience_attributes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Ads\GoogleAds\V20\Common\AudienceInsightsAttribute>|\Google\Protobuf\Internal\RepeatedField $audience_attributes
     *           Required. Audience attributes that describe an audience of viewers. This is
     *           used to search for topics trending for the defined audience.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Audience attributes that describe an audience of viewers. This is
     * used to search for topics trending for the defined audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.common.AudienceInsightsAttribute audience_attributes = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAudienceAttributes()
    {
        return $this->audience_attributes;
    }

    /**
     * Required. Audience attributes that describe an audience of viewers. This is
     * used to search for topics trending for the defined audience.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v20.common.AudienceInsightsAttribute audience_attributes = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Ads\GoogleAds\V20\Common\AudienceInsightsAttribute>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAudienceAttributes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V20\Common\AudienceInsightsAttribute::class);
        $this->audience_attributes = $arr;

        return $this;
    }

}

