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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * The targeting for which traffic metrics will be reported.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.PlannableTargeting</code>
 */
class PlannableTargeting extends \Google\Protobuf\Internal\Message
{
    /**
     * Allowed plannable age ranges for the product for which metrics will be
     * reported. Actual targeting is computed by mapping this age range onto
     * standard Google common.AgeRangeInfo values.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;</code>
     */
    private $age_ranges;
    /**
     * Targetable genders for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.GenderInfo genders = 2;</code>
     */
    private $genders;
    /**
     * Targetable devices for the ad product.
     * TABLET device targeting is automatically applied to reported metrics
     * when MOBILE targeting is selected for CPM_MASTHEAD,
     * GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.DeviceInfo devices = 3;</code>
     */
    private $devices;
    /**
     * Targetable networks for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;</code>
     */
    private $networks;
    /**
     * Targetable YouTube Select Lineups for the ad product. This field is
     * deprecated in V23_2 and will eventually be removed. Use
     * youtube_select_lineup_targeting instead.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.YouTubeSelectLineUp youtube_select_lineups = 5;</code>
     */
    private $youtube_select_lineups;
    /**
     * Targetable YouTube Select Lineups for the ad product.
     * This field replaces the deprecated `youtube_select_lineups` field.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.YouTubeSelectLineUpTargeting youtube_select_lineup_targeting = 7;</code>
     */
    protected $youtube_select_lineup_targeting = null;
    /**
     * Targetable surface combinations for the ad product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurfaceTargetingCombinations surface_targeting = 6;</code>
     */
    protected $surface_targeting = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type int[] $age_ranges
     *           Allowed plannable age ranges for the product for which metrics will be
     *           reported. Actual targeting is computed by mapping this age range onto
     *           standard Google common.AgeRangeInfo values.
     * @type \Google\Ads\GoogleAds\V23\Common\GenderInfo[] $genders
     *           Targetable genders for the ad product.
     * @type \Google\Ads\GoogleAds\V23\Common\DeviceInfo[] $devices
     *           Targetable devices for the ad product.
     *           TABLET device targeting is automatically applied to reported metrics
     *           when MOBILE targeting is selected for CPM_MASTHEAD,
     *           GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
     * @type int[] $networks
     *           Targetable networks for the ad product.
     * @type \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUp[] $youtube_select_lineups
     *           Targetable YouTube Select Lineups for the ad product. This field is
     *           deprecated in V23_2 and will eventually be removed. Use
     *           youtube_select_lineup_targeting instead.
     * @type \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUpTargeting $youtube_select_lineup_targeting
     *           Targetable YouTube Select Lineups for the ad product.
     *           This field replaces the deprecated `youtube_select_lineups` field.
     * @type \Google\Ads\GoogleAds\V23\Services\SurfaceTargetingCombinations $surface_targeting
     *           Targetable surface combinations for the ad product.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\ReachPlanService::initOnce();
        parent::__construct($data);
    }

    /**
     * Allowed plannable age ranges for the product for which metrics will be
     * reported. Actual targeting is computed by mapping this age range onto
     * standard Google common.AgeRangeInfo values.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;</code>
     *
     * @return RepeatedField<int>
     */
    public function getAgeRanges()
    {
        return $this->age_ranges;
    }

    /**
     * Allowed plannable age ranges for the product for which metrics will be
     * reported. Actual targeting is computed by mapping this age range onto
     * standard Google common.AgeRangeInfo values.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;</code>
     *
     * @param  int[] $var
     * @return $this
     */
    public function setAgeRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\GoogleAds\V23\Enums\ReachPlanAgeRangeEnum\ReachPlanAgeRange::class);
        $this->age_ranges = $arr;

        return $this;
    }

    /**
     * Targetable genders for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.GenderInfo genders = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Common\GenderInfo>
     */
    public function getGenders()
    {
        return $this->genders;
    }

    /**
     * Targetable genders for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.GenderInfo genders = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\GenderInfo[] $var
     * @return $this
     */
    public function setGenders($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Common\GenderInfo::class);
        $this->genders = $arr;

        return $this;
    }

    /**
     * Targetable devices for the ad product.
     * TABLET device targeting is automatically applied to reported metrics
     * when MOBILE targeting is selected for CPM_MASTHEAD,
     * GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.DeviceInfo devices = 3;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Common\DeviceInfo>
     */
    public function getDevices()
    {
        return $this->devices;
    }

    /**
     * Targetable devices for the ad product.
     * TABLET device targeting is automatically applied to reported metrics
     * when MOBILE targeting is selected for CPM_MASTHEAD,
     * GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.common.DeviceInfo devices = 3;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Common\DeviceInfo[] $var
     * @return $this
     */
    public function setDevices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Common\DeviceInfo::class);
        $this->devices = $arr;

        return $this;
    }

    /**
     * Targetable networks for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;</code>
     *
     * @return RepeatedField<int>
     */
    public function getNetworks()
    {
        return $this->networks;
    }

    /**
     * Targetable networks for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;</code>
     *
     * @param  int[] $var
     * @return $this
     */
    public function setNetworks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\GoogleAds\V23\Enums\ReachPlanNetworkEnum\ReachPlanNetwork::class);
        $this->networks = $arr;

        return $this;
    }

    /**
     * Targetable YouTube Select Lineups for the ad product. This field is
     * deprecated in V23_2 and will eventually be removed. Use
     * youtube_select_lineup_targeting instead.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.YouTubeSelectLineUp youtube_select_lineups = 5;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUp>
     */
    public function getYoutubeSelectLineups()
    {
        return $this->youtube_select_lineups;
    }

    /**
     * Targetable YouTube Select Lineups for the ad product. This field is
     * deprecated in V23_2 and will eventually be removed. Use
     * youtube_select_lineup_targeting instead.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.YouTubeSelectLineUp youtube_select_lineups = 5;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUp[] $var
     * @return $this
     */
    public function setYoutubeSelectLineups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUp::class);
        $this->youtube_select_lineups = $arr;

        return $this;
    }

    /**
     * Targetable YouTube Select Lineups for the ad product.
     * This field replaces the deprecated `youtube_select_lineups` field.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.YouTubeSelectLineUpTargeting youtube_select_lineup_targeting = 7;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUpTargeting|null
     */
    public function getYoutubeSelectLineupTargeting()
    {
        return $this->youtube_select_lineup_targeting;
    }

    public function hasYoutubeSelectLineupTargeting()
    {
        return isset($this->youtube_select_lineup_targeting);
    }

    public function clearYoutubeSelectLineupTargeting()
    {
        unset($this->youtube_select_lineup_targeting);
    }

    /**
     * Targetable YouTube Select Lineups for the ad product.
     * This field replaces the deprecated `youtube_select_lineups` field.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.YouTubeSelectLineUpTargeting youtube_select_lineup_targeting = 7;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUpTargeting $var
     * @return $this
     */
    public function setYoutubeSelectLineupTargeting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\YouTubeSelectLineUpTargeting::class);
        $this->youtube_select_lineup_targeting = $var;

        return $this;
    }

    /**
     * Targetable surface combinations for the ad product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurfaceTargetingCombinations surface_targeting = 6;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Services\SurfaceTargetingCombinations|null
     */
    public function getSurfaceTargeting()
    {
        return $this->surface_targeting;
    }

    public function hasSurfaceTargeting()
    {
        return isset($this->surface_targeting);
    }

    public function clearSurfaceTargeting()
    {
        unset($this->surface_targeting);
    }

    /**
     * Targetable surface combinations for the ad product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurfaceTargetingCombinations surface_targeting = 6;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\SurfaceTargetingCombinations $var
     * @return $this
     */
    public function setSurfaceTargeting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\SurfaceTargetingCombinations::class);
        $this->surface_targeting = $var;

        return $this;
    }

}

