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

namespace Google\Ads\GoogleAds\V16\Services;

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

/**
 * The surface targeting combinations available for an ad product.
 *
 * Generated from protobuf message <code>google.ads.googleads.v16.services.SurfaceTargetingCombinations</code>
 */
class SurfaceTargetingCombinations extends \Google\Protobuf\Internal\Message
{
    /**
     * Default surface targeting applied to the ad product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.services.SurfaceTargeting default_targeting = 1;</code>
     */
    protected $default_targeting = null;
    /**
     * Available surface target combinations for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v16.services.SurfaceTargeting available_targeting_combinations = 2;</code>
     */
    private $available_targeting_combinations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V16\Services\SurfaceTargeting $default_targeting
     *           Default surface targeting applied to the ad product.
     *     @type array<\Google\Ads\GoogleAds\V16\Services\SurfaceTargeting>|\Google\Protobuf\Internal\RepeatedField $available_targeting_combinations
     *           Available surface target combinations for the ad product.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V16\Services\ReachPlanService::initOnce();
        parent::__construct($data);
    }

    /**
     * Default surface targeting applied to the ad product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.services.SurfaceTargeting default_targeting = 1;</code>
     * @return \Google\Ads\GoogleAds\V16\Services\SurfaceTargeting|null
     */
    public function getDefaultTargeting()
    {
        return $this->default_targeting;
    }

    public function hasDefaultTargeting()
    {
        return isset($this->default_targeting);
    }

    public function clearDefaultTargeting()
    {
        unset($this->default_targeting);
    }

    /**
     * Default surface targeting applied to the ad product.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v16.services.SurfaceTargeting default_targeting = 1;</code>
     * @param \Google\Ads\GoogleAds\V16\Services\SurfaceTargeting $var
     * @return $this
     */
    public function setDefaultTargeting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V16\Services\SurfaceTargeting::class);
        $this->default_targeting = $var;

        return $this;
    }

    /**
     * Available surface target combinations for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v16.services.SurfaceTargeting available_targeting_combinations = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAvailableTargetingCombinations()
    {
        return $this->available_targeting_combinations;
    }

    /**
     * Available surface target combinations for the ad product.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v16.services.SurfaceTargeting available_targeting_combinations = 2;</code>
     * @param array<\Google\Ads\GoogleAds\V16\Services\SurfaceTargeting>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAvailableTargetingCombinations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V16\Services\SurfaceTargeting::class);
        $this->available_targeting_combinations = $arr;

        return $this;
    }

}

