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

namespace Google\Ads\GoogleAds\V23\Common\CampaignGoalSettings;

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

/**
 * Retention campaign goal settings.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.CampaignGoalSettings.CampaignRetentionGoalSettings</code>
 */
class CampaignRetentionGoalSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Retention goal campaign specific value settings.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.CustomerLifecycleOptimizationValueSettings value_settings_override = 1;</code>
     */
    protected $value_settings_override = null;
    /**
     * Retention goal optimization mode for this campaign.
     * Defaults to TARGET_ALL. Only customers on the allowlist can set
     * target_option.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.CustomerLifecycleOptimizationModeEnum.CustomerLifecycleOptimizationMode target_option = 2;</code>
     */
    protected $target_option = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V23\Common\CustomerLifecycleOptimizationValueSettings $value_settings_override
     *           Retention goal campaign specific value settings.
     *     @type int $target_option
     *           Retention goal optimization mode for this campaign.
     *           Defaults to TARGET_ALL. Only customers on the allowlist can set
     *           target_option.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\CampaignGoalSettings::initOnce();
        parent::__construct($data);
    }

    /**
     * Retention goal campaign specific value settings.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.CustomerLifecycleOptimizationValueSettings value_settings_override = 1;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\CustomerLifecycleOptimizationValueSettings|null
     */
    public function getValueSettingsOverride()
    {
        return $this->value_settings_override;
    }

    public function hasValueSettingsOverride()
    {
        return isset($this->value_settings_override);
    }

    public function clearValueSettingsOverride()
    {
        unset($this->value_settings_override);
    }

    /**
     * Retention goal campaign specific value settings.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.CustomerLifecycleOptimizationValueSettings value_settings_override = 1;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\CustomerLifecycleOptimizationValueSettings $var
     * @return $this
     */
    public function setValueSettingsOverride($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\CustomerLifecycleOptimizationValueSettings::class);
        $this->value_settings_override = $var;

        return $this;
    }

    /**
     * Retention goal optimization mode for this campaign.
     * Defaults to TARGET_ALL. Only customers on the allowlist can set
     * target_option.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.CustomerLifecycleOptimizationModeEnum.CustomerLifecycleOptimizationMode target_option = 2;</code>
     * @return int
     */
    public function getTargetOption()
    {
        return $this->target_option;
    }

    /**
     * Retention goal optimization mode for this campaign.
     * Defaults to TARGET_ALL. Only customers on the allowlist can set
     * target_option.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.CustomerLifecycleOptimizationModeEnum.CustomerLifecycleOptimizationMode target_option = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setTargetOption($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\CustomerLifecycleOptimizationModeEnum\CustomerLifecycleOptimizationMode::class);
        $this->target_option = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CampaignRetentionGoalSettings::class, \Google\Ads\GoogleAds\V23\Common\CampaignGoalSettings_CampaignRetentionGoalSettings::class);

