<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v20/resources/ad_group.proto

namespace Google\Ads\GoogleAds\V20\Resources\AdGroup;

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

/**
 * Settings for Demand Gen ad groups.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.resources.AdGroup.DemandGenAdGroupSettings</code>
 */
class DemandGenAdGroupSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Channel controls for Demand Gen ad groups.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls channel_controls = 1;</code>
     */
    protected $channel_controls = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V20\Resources\AdGroup\DemandGenAdGroupSettings\DemandGenChannelControls $channel_controls
     *           Channel controls for Demand Gen ad groups.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Resources\AdGroup::initOnce();
        parent::__construct($data);
    }

    /**
     * Channel controls for Demand Gen ad groups.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls channel_controls = 1;</code>
     * @return \Google\Ads\GoogleAds\V20\Resources\AdGroup\DemandGenAdGroupSettings\DemandGenChannelControls|null
     */
    public function getChannelControls()
    {
        return $this->channel_controls;
    }

    public function hasChannelControls()
    {
        return isset($this->channel_controls);
    }

    public function clearChannelControls()
    {
        unset($this->channel_controls);
    }

    /**
     * Channel controls for Demand Gen ad groups.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v20.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls channel_controls = 1;</code>
     * @param \Google\Ads\GoogleAds\V20\Resources\AdGroup\DemandGenAdGroupSettings\DemandGenChannelControls $var
     * @return $this
     */
    public function setChannelControls($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V20\Resources\AdGroup\DemandGenAdGroupSettings\DemandGenChannelControls::class);
        $this->channel_controls = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DemandGenAdGroupSettings::class, \Google\Ads\GoogleAds\V20\Resources\AdGroup_DemandGenAdGroupSettings::class);

