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

namespace Google\Ads\GoogleAds\V24\Resources\Campaign;

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

/**
 * The setting for controlling Dynamic Search Ads (DSA).
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.resources.Campaign.DynamicSearchAdsSetting</code>
 */
class DynamicSearchAdsSetting extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Internet domain name that this setting represents, for
     * example, "google.com" or "www.google.com".
     *
     * Generated from protobuf field <code>string domain_name = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $domain_name = '';
    /**
     * Required. The language code specifying the language of the domain, for
     * example, "en".
     *
     * Generated from protobuf field <code>string language_code = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $language_code = '';
    /**
     * Whether the campaign uses advertiser supplied URLs exclusively.
     *
     * Generated from protobuf field <code>optional bool use_supplied_urls_only = 8;</code>
     */
    protected $use_supplied_urls_only = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $domain_name
     *           Required. The Internet domain name that this setting represents, for
     *           example, "google.com" or "www.google.com".
     * @type string $language_code
     *           Required. The language code specifying the language of the domain, for
     *           example, "en".
     * @type bool $use_supplied_urls_only
     *           Whether the campaign uses advertiser supplied URLs exclusively.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Resources\Campaign::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The Internet domain name that this setting represents, for
     * example, "google.com" or "www.google.com".
     *
     * Generated from protobuf field <code>string domain_name = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return string
     */
    public function getDomainName()
    {
        return $this->domain_name;
    }

    /**
     * Required. The Internet domain name that this setting represents, for
     * example, "google.com" or "www.google.com".
     *
     * Generated from protobuf field <code>string domain_name = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setDomainName($var)
    {
        GPBUtil::checkString($var, true);
        $this->domain_name = $var;

        return $this;
    }

    /**
     * Required. The language code specifying the language of the domain, for
     * example, "en".
     *
     * Generated from protobuf field <code>string language_code = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * Required. The language code specifying the language of the domain, for
     * example, "en".
     *
     * Generated from protobuf field <code>string language_code = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, true);
        $this->language_code = $var;

        return $this;
    }

    /**
     * Whether the campaign uses advertiser supplied URLs exclusively.
     *
     * Generated from protobuf field <code>optional bool use_supplied_urls_only = 8;</code>
     *
     * @return bool
     */
    public function getUseSuppliedUrlsOnly()
    {
        return isset($this->use_supplied_urls_only) ? $this->use_supplied_urls_only : false;
    }

    public function hasUseSuppliedUrlsOnly()
    {
        return isset($this->use_supplied_urls_only);
    }

    public function clearUseSuppliedUrlsOnly()
    {
        unset($this->use_supplied_urls_only);
    }

    /**
     * Whether the campaign uses advertiser supplied URLs exclusively.
     *
     * Generated from protobuf field <code>optional bool use_supplied_urls_only = 8;</code>
     *
     * @param  bool $var
     * @return $this
     */
    public function setUseSuppliedUrlsOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->use_supplied_urls_only = $var;

        return $this;
    }

}

