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

namespace Google\Ads\GoogleAds\V24\Common;

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

/**
 * Lifecycle goal value settings.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.common.LifecycleGoalValueSettings</code>
 */
class LifecycleGoalValueSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Value of the lifecycle goal. For example, for customer acquisition goal,
     * value is the incremental conversion value for new customers who are not of
     * high value.
     *
     * Generated from protobuf field <code>optional double value = 1;</code>
     */
    protected $value = null;
    /**
     * High lifetime value of the lifecycle goal. For example, for customer
     * acquisition goal, high lifetime value is the incremental conversion value
     * for new customers who are of high value. High lifetime value should be
     * greater than value, if set.
     *
     * Generated from protobuf field <code>optional double high_lifetime_value = 2;</code>
     */
    protected $high_lifetime_value = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type float $value
     *           Value of the lifecycle goal. For example, for customer acquisition goal,
     *           value is the incremental conversion value for new customers who are not of
     *           high value.
     * @type float $high_lifetime_value
     *           High lifetime value of the lifecycle goal. For example, for customer
     *           acquisition goal, high lifetime value is the incremental conversion value
     *           for new customers who are of high value. High lifetime value should be
     *           greater than value, if set.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Common\LifecycleGoals::initOnce();
        parent::__construct($data);
    }

    /**
     * Value of the lifecycle goal. For example, for customer acquisition goal,
     * value is the incremental conversion value for new customers who are not of
     * high value.
     *
     * Generated from protobuf field <code>optional double value = 1;</code>
     *
     * @return float
     */
    public function getValue()
    {
        return isset($this->value) ? $this->value : 0.0;
    }

    public function hasValue()
    {
        return isset($this->value);
    }

    public function clearValue()
    {
        unset($this->value);
    }

    /**
     * Value of the lifecycle goal. For example, for customer acquisition goal,
     * value is the incremental conversion value for new customers who are not of
     * high value.
     *
     * Generated from protobuf field <code>optional double value = 1;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->value = $var;

        return $this;
    }

    /**
     * High lifetime value of the lifecycle goal. For example, for customer
     * acquisition goal, high lifetime value is the incremental conversion value
     * for new customers who are of high value. High lifetime value should be
     * greater than value, if set.
     *
     * Generated from protobuf field <code>optional double high_lifetime_value = 2;</code>
     *
     * @return float
     */
    public function getHighLifetimeValue()
    {
        return isset($this->high_lifetime_value) ? $this->high_lifetime_value : 0.0;
    }

    public function hasHighLifetimeValue()
    {
        return isset($this->high_lifetime_value);
    }

    public function clearHighLifetimeValue()
    {
        unset($this->high_lifetime_value);
    }

    /**
     * High lifetime value of the lifecycle goal. For example, for customer
     * acquisition goal, high lifetime value is the incremental conversion value
     * for new customers who are of high value. High lifetime value should be
     * greater than value, if set.
     *
     * Generated from protobuf field <code>optional double high_lifetime_value = 2;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setHighLifetimeValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->high_lifetime_value = $var;

        return $this;
    }

}

