<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/targeting.proto

namespace Google\Ads\AdManager\V1;

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

/**
 * Browser Targeting.
 * Allows publishers to target/exclude a browser type (e.g. Chrome, Firefox,
 * Safari). For more information, see
 * https://support.google.com/admanager/answer/2884033 (Targeting types >
 * Browser).
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.BrowserTargeting</code>
 */
class BrowserTargeting extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. A list of browser resource names that should be
     * targeted/included.
     *
     * Generated from protobuf field <code>repeated string targeted_browsers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    private $targeted_browsers;
    /**
     * Optional. A list of browser resource names that should be excluded.
     *
     * Generated from protobuf field <code>repeated string excluded_browsers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    private $excluded_browsers;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $targeted_browsers
     *           Optional. A list of browser resource names that should be
     *           targeted/included.
     *     @type string[] $excluded_browsers
     *           Optional. A list of browser resource names that should be excluded.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. A list of browser resource names that should be
     * targeted/included.
     *
     * Generated from protobuf field <code>repeated string targeted_browsers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return RepeatedField<string>
     */
    public function getTargetedBrowsers()
    {
        return $this->targeted_browsers;
    }

    /**
     * Optional. A list of browser resource names that should be
     * targeted/included.
     *
     * Generated from protobuf field <code>repeated string targeted_browsers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string[] $var
     * @return $this
     */
    public function setTargetedBrowsers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->targeted_browsers = $arr;

        return $this;
    }

    /**
     * Optional. A list of browser resource names that should be excluded.
     *
     * Generated from protobuf field <code>repeated string excluded_browsers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return RepeatedField<string>
     */
    public function getExcludedBrowsers()
    {
        return $this->excluded_browsers;
    }

    /**
     * Optional. A list of browser resource names that should be excluded.
     *
     * Generated from protobuf field <code>repeated string excluded_browsers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string[] $var
     * @return $this
     */
    public function setExcludedBrowsers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->excluded_browsers = $arr;

        return $this;
    }

}

