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

namespace Google\Ads\GoogleAds\V23\Services\Incentive\Requirement;

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

/**
 * Spend requirements for an incentive.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.Incentive.Requirement.Spend</code>
 */
class Spend extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Amount in free spend that user will be granted after spending
     * target amount. Denominated in the currency of the country passed in the
     * get request.
     *
     * Generated from protobuf field <code>optional .google.type.Money award_amount = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $award_amount = null;
    /**
     * Required. Amount that user must spend to receive the award amount.
     * Denominated in the currency of the country passed in the get request.
     *
     * Generated from protobuf field <code>optional .google.type.Money required_amount = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $required_amount = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Type\Money $award_amount
     *           Required. Amount in free spend that user will be granted after spending
     *           target amount. Denominated in the currency of the country passed in the
     *           get request.
     *     @type \Google\Type\Money $required_amount
     *           Required. Amount that user must spend to receive the award amount.
     *           Denominated in the currency of the country passed in the get request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\IncentiveService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Amount in free spend that user will be granted after spending
     * target amount. Denominated in the currency of the country passed in the
     * get request.
     *
     * Generated from protobuf field <code>optional .google.type.Money award_amount = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Type\Money|null
     */
    public function getAwardAmount()
    {
        return $this->award_amount;
    }

    public function hasAwardAmount()
    {
        return isset($this->award_amount);
    }

    public function clearAwardAmount()
    {
        unset($this->award_amount);
    }

    /**
     * Required. Amount in free spend that user will be granted after spending
     * target amount. Denominated in the currency of the country passed in the
     * get request.
     *
     * Generated from protobuf field <code>optional .google.type.Money award_amount = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Type\Money $var
     * @return $this
     */
    public function setAwardAmount($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Money::class);
        $this->award_amount = $var;

        return $this;
    }

    /**
     * Required. Amount that user must spend to receive the award amount.
     * Denominated in the currency of the country passed in the get request.
     *
     * Generated from protobuf field <code>optional .google.type.Money required_amount = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Type\Money|null
     */
    public function getRequiredAmount()
    {
        return $this->required_amount;
    }

    public function hasRequiredAmount()
    {
        return isset($this->required_amount);
    }

    public function clearRequiredAmount()
    {
        unset($this->required_amount);
    }

    /**
     * Required. Amount that user must spend to receive the award amount.
     * Denominated in the currency of the country passed in the get request.
     *
     * Generated from protobuf field <code>optional .google.type.Money required_amount = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Type\Money $var
     * @return $this
     */
    public function setRequiredAmount($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Money::class);
        $this->required_amount = $var;

        return $this;
    }

}

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

