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

namespace Google\Ads\GoogleAds\V25\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.v25.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.v25.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.v25.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.v25.common.DeviceInfo devices = 3;</code>
     */
    private $devices;
    /**
     * Targetable networks for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;</code>
     */
    private $networks;
    /**
     * Targetable parental statuses for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.ParentalStatusInfo parental_statuses = 8;</code>
     */
    private $parental_statuses;
    /**
     * 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.v25.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.v25.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\V25\Common\GenderInfo[] $genders
     *           Targetable genders for the ad product.
     *     @type \Google\Ads\GoogleAds\V25\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\V25\Common\ParentalStatusInfo[] $parental_statuses
     *           Targetable parental statuses for the ad product.
     *     @type \Google\Ads\GoogleAds\V25\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\V25\Services\SurfaceTargetingCombinations $surface_targeting
     *           Targetable surface combinations for the ad product.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\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.v25.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.v25.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\V25\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.v25.common.GenderInfo genders = 2;</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\Common\GenderInfo>
     */
    public function getGenders()
    {
        return $this->genders;
    }

    /**
     * Targetable genders for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.GenderInfo genders = 2;</code>
     * @param \Google\Ads\GoogleAds\V25\Common\GenderInfo[] $var
     * @return $this
     */
    public function setGenders($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\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.v25.common.DeviceInfo devices = 3;</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\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.v25.common.DeviceInfo devices = 3;</code>
     * @param \Google\Ads\GoogleAds\V25\Common\DeviceInfo[] $var
     * @return $this
     */
    public function setDevices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\Common\DeviceInfo::class);
        $this->devices = $arr;

        return $this;
    }

    /**
     * Targetable networks for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.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.v25.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\V25\Enums\ReachPlanNetworkEnum\ReachPlanNetwork::class);
        $this->networks = $arr;

        return $this;
    }

    /**
     * Targetable parental statuses for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.ParentalStatusInfo parental_statuses = 8;</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\Common\ParentalStatusInfo>
     */
    public function getParentalStatuses()
    {
        return $this->parental_statuses;
    }

    /**
     * Targetable parental statuses for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.ParentalStatusInfo parental_statuses = 8;</code>
     * @param \Google\Ads\GoogleAds\V25\Common\ParentalStatusInfo[] $var
     * @return $this
     */
    public function setParentalStatuses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\Common\ParentalStatusInfo::class);
        $this->parental_statuses = $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.v25.services.YouTubeSelectLineUpTargeting youtube_select_lineup_targeting = 7;</code>
     * @return \Google\Ads\GoogleAds\V25\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.v25.services.YouTubeSelectLineUpTargeting youtube_select_lineup_targeting = 7;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\YouTubeSelectLineUpTargeting $var
     * @return $this
     */
    public function setYoutubeSelectLineupTargeting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\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.v25.services.SurfaceTargetingCombinations surface_targeting = 6;</code>
     * @return \Google\Ads\GoogleAds\V25\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.v25.services.SurfaceTargetingCombinations surface_targeting = 6;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\SurfaceTargetingCombinations $var
     * @return $this
     */
    public function setSurfaceTargeting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\SurfaceTargetingCombinations::class);
        $this->surface_targeting = $var;

        return $this;
    }

}

