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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * The type and list of products to aggregate benchmarks metrics over.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.ProductFilter</code>
 */
class ProductFilter extends \Google\Protobuf\Internal\Message
{
    protected $filter_settings;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V23\Services\ProductFilter\ProductList $product_list
     *           The list of products.
     *     @type \Google\Ads\GoogleAds\V23\Services\ProductFilter\MarketingObjectiveList $marketing_objective_list
     *           The list of marketing goals. Marketing objective is a broader product
     *           classification of products.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\BenchmarksService::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of products.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.ProductFilter.ProductList product_list = 1;</code>
     * @return \Google\Ads\GoogleAds\V23\Services\ProductFilter\ProductList|null
     */
    public function getProductList()
    {
        return $this->readOneof(1);
    }

    public function hasProductList()
    {
        return $this->hasOneof(1);
    }

    /**
     * The list of products.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.ProductFilter.ProductList product_list = 1;</code>
     * @param \Google\Ads\GoogleAds\V23\Services\ProductFilter\ProductList $var
     * @return $this
     */
    public function setProductList($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\ProductFilter\ProductList::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The list of marketing goals. Marketing objective is a broader product
     * classification of products.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.ProductFilter.MarketingObjectiveList marketing_objective_list = 2;</code>
     * @return \Google\Ads\GoogleAds\V23\Services\ProductFilter\MarketingObjectiveList|null
     */
    public function getMarketingObjectiveList()
    {
        return $this->readOneof(2);
    }

    public function hasMarketingObjectiveList()
    {
        return $this->hasOneof(2);
    }

    /**
     * The list of marketing goals. Marketing objective is a broader product
     * classification of products.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.ProductFilter.MarketingObjectiveList marketing_objective_list = 2;</code>
     * @param \Google\Ads\GoogleAds\V23\Services\ProductFilter\MarketingObjectiveList $var
     * @return $this
     */
    public function setMarketingObjectiveList($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\ProductFilter\MarketingObjectiveList::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getFilterSettings()
    {
        return $this->whichOneof("filter_settings");
    }

}

