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

namespace Google\Ads\GoogleAds\V23\Common;

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

/**
 * Dimension specifying users by their membership in other audience segments.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.AudienceSegmentDimension</code>
 */
class AudienceSegmentDimension extends \Google\Protobuf\Internal\Message
{
    /**
     * Included audience segments. Users are included if they belong to at least
     * one segment.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.AudienceSegment segments = 1;</code>
     */
    private $segments;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V23\Common\AudienceSegment[] $segments
     *           Included audience segments. Users are included if they belong to at least
     *           one segment.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\Audiences::initOnce();
        parent::__construct($data);
    }

    /**
     * Included audience segments. Users are included if they belong to at least
     * one segment.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.AudienceSegment segments = 1;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Common\AudienceSegment>
     */
    public function getSegments()
    {
        return $this->segments;
    }

    /**
     * Included audience segments. Users are included if they belong to at least
     * one segment.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.AudienceSegment segments = 1;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\AudienceSegment[] $var
     * @return $this
     */
    public function setSegments($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Common\AudienceSegment::class);
        $this->segments = $arr;

        return $this;
    }

}

