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

namespace Google\Ads\GoogleAds\V9\Resources;

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

/**
 * Settings for configuring Smart campaigns.
 *
 * Generated from protobuf message <code>google.ads.googleads.v9.resources.SmartCampaignSetting</code>
 */
class SmartCampaignSetting extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The resource name of the Smart campaign setting.
     * Smart campaign setting resource names have the form:
     * `customers/{customer_id}/smartCampaignSettings/{campaign_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Output only. The campaign to which these settings apply.
     *
     * Generated from protobuf field <code>string campaign = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $campaign = '';
    /**
     * Phone number and country code.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.resources.SmartCampaignSetting.PhoneNumber phone_number = 3;</code>
     */
    protected $phone_number = null;
    /**
     * Landing page url given by user for this Campaign.
     *
     * Generated from protobuf field <code>string final_url = 4;</code>
     */
    protected $final_url = '';
    /**
     * The ISO-639-1 language code to advertise in.
     *
     * Generated from protobuf field <code>string advertising_language_code = 7;</code>
     */
    protected $advertising_language_code = '';
    protected $business_setting;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Immutable. The resource name of the Smart campaign setting.
     *           Smart campaign setting resource names have the form:
     *           `customers/{customer_id}/smartCampaignSettings/{campaign_id}`
     *     @type string $campaign
     *           Output only. The campaign to which these settings apply.
     *     @type \Google\Ads\GoogleAds\V9\Resources\SmartCampaignSetting\PhoneNumber $phone_number
     *           Phone number and country code.
     *     @type string $final_url
     *           Landing page url given by user for this Campaign.
     *     @type string $advertising_language_code
     *           The ISO-639-1 language code to advertise in.
     *     @type string $business_name
     *           The name of the business.
     *     @type int|string $business_location_id
     *           The ID of the Business Profile location.
     *           The location ID can be fetched by Business Profile API with its form:
     *           accounts/{accountId}/locations/{locationId}. The last {locationId}
     *           component from the Business Profile API represents the
     *           business_location_id. See the [Business Profile API]
     *           (https://developers.google.com/my-business/reference/rest/v4/accounts.locations)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V9\Resources\SmartCampaignSetting::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The resource name of the Smart campaign setting.
     * Smart campaign setting resource names have the form:
     * `customers/{customer_id}/smartCampaignSettings/{campaign_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Immutable. The resource name of the Smart campaign setting.
     * Smart campaign setting resource names have the form:
     * `customers/{customer_id}/smartCampaignSettings/{campaign_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Output only. The campaign to which these settings apply.
     *
     * Generated from protobuf field <code>string campaign = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getCampaign()
    {
        return $this->campaign;
    }

    /**
     * Output only. The campaign to which these settings apply.
     *
     * Generated from protobuf field <code>string campaign = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setCampaign($var)
    {
        GPBUtil::checkString($var, True);
        $this->campaign = $var;

        return $this;
    }

    /**
     * Phone number and country code.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.resources.SmartCampaignSetting.PhoneNumber phone_number = 3;</code>
     * @return \Google\Ads\GoogleAds\V9\Resources\SmartCampaignSetting\PhoneNumber|null
     */
    public function getPhoneNumber()
    {
        return $this->phone_number;
    }

    public function hasPhoneNumber()
    {
        return isset($this->phone_number);
    }

    public function clearPhoneNumber()
    {
        unset($this->phone_number);
    }

    /**
     * Phone number and country code.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v9.resources.SmartCampaignSetting.PhoneNumber phone_number = 3;</code>
     * @param \Google\Ads\GoogleAds\V9\Resources\SmartCampaignSetting\PhoneNumber $var
     * @return $this
     */
    public function setPhoneNumber($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V9\Resources\SmartCampaignSetting\PhoneNumber::class);
        $this->phone_number = $var;

        return $this;
    }

    /**
     * Landing page url given by user for this Campaign.
     *
     * Generated from protobuf field <code>string final_url = 4;</code>
     * @return string
     */
    public function getFinalUrl()
    {
        return $this->final_url;
    }

    /**
     * Landing page url given by user for this Campaign.
     *
     * Generated from protobuf field <code>string final_url = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setFinalUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->final_url = $var;

        return $this;
    }

    /**
     * The ISO-639-1 language code to advertise in.
     *
     * Generated from protobuf field <code>string advertising_language_code = 7;</code>
     * @return string
     */
    public function getAdvertisingLanguageCode()
    {
        return $this->advertising_language_code;
    }

    /**
     * The ISO-639-1 language code to advertise in.
     *
     * Generated from protobuf field <code>string advertising_language_code = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setAdvertisingLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->advertising_language_code = $var;

        return $this;
    }

    /**
     * The name of the business.
     *
     * Generated from protobuf field <code>string business_name = 5;</code>
     * @return string
     */
    public function getBusinessName()
    {
        return $this->readOneof(5);
    }

    public function hasBusinessName()
    {
        return $this->hasOneof(5);
    }

    /**
     * The name of the business.
     *
     * Generated from protobuf field <code>string business_name = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setBusinessName($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * The ID of the Business Profile location.
     * The location ID can be fetched by Business Profile API with its form:
     * accounts/{accountId}/locations/{locationId}. The last {locationId}
     * component from the Business Profile API represents the
     * business_location_id. See the [Business Profile API]
     * (https://developers.google.com/my-business/reference/rest/v4/accounts.locations)
     *
     * Generated from protobuf field <code>int64 business_location_id = 6;</code>
     * @return int|string
     */
    public function getBusinessLocationId()
    {
        return $this->readOneof(6);
    }

    public function hasBusinessLocationId()
    {
        return $this->hasOneof(6);
    }

    /**
     * The ID of the Business Profile location.
     * The location ID can be fetched by Business Profile API with its form:
     * accounts/{accountId}/locations/{locationId}. The last {locationId}
     * component from the Business Profile API represents the
     * business_location_id. See the [Business Profile API]
     * (https://developers.google.com/my-business/reference/rest/v4/accounts.locations)
     *
     * Generated from protobuf field <code>int64 business_location_id = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBusinessLocationId($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(6, $var);

        return $this;
    }

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

}

